Import Upstream version 5.92.0
This commit is contained in:
commit
91f19c9cfc
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,5 @@
|
||||||
|
#clang-format
|
||||||
|
053b5b7091bbf13ed4886ced16fae8d3e5341564
|
||||||
|
99f4d448bc9a5fe69b2a2c30fcbe36b1e7c732c9
|
||||||
|
#clang-tidy
|
||||||
|
632f4e346d5417cef6aeb76de690297647f6d6c7
|
|
@ -0,0 +1,28 @@
|
||||||
|
# Ignore the following files
|
||||||
|
*~
|
||||||
|
*.[oa]
|
||||||
|
*.diff
|
||||||
|
*.kate-swp
|
||||||
|
*.kdev4
|
||||||
|
.kdev_include_paths
|
||||||
|
*.kdevelop.pcs
|
||||||
|
*.moc
|
||||||
|
*.moc.cpp
|
||||||
|
*.orig
|
||||||
|
*.user
|
||||||
|
.*.swp
|
||||||
|
.swp.*
|
||||||
|
Doxyfile
|
||||||
|
Makefile
|
||||||
|
avail
|
||||||
|
random_seed
|
||||||
|
/build*/
|
||||||
|
CMakeLists.txt.user*
|
||||||
|
*.unc-backup*
|
||||||
|
.cmake/
|
||||||
|
/.clang-format
|
||||||
|
/compile_commands.json
|
||||||
|
.clangd
|
||||||
|
.idea
|
||||||
|
/cmake-build*
|
||||||
|
.cache
|
|
@ -0,0 +1,6 @@
|
||||||
|
# SPDX-FileCopyrightText: 2020 Volker Krause <vkrause@kde.org>
|
||||||
|
# SPDX-License-Identifier: CC0-1.0
|
||||||
|
|
||||||
|
include:
|
||||||
|
- https://invent.kde.org/sysadmin/ci-utilities/raw/master/gitlab-templates/linux.yml
|
||||||
|
- https://invent.kde.org/sysadmin/ci-utilities/raw/master/gitlab-templates/linux-qt6.yml
|
|
@ -0,0 +1,7 @@
|
||||||
|
Dependencies:
|
||||||
|
- 'on': ['Linux']
|
||||||
|
'require':
|
||||||
|
'frameworks/extra-cmake-modules': '@same'
|
||||||
|
|
||||||
|
Options:
|
||||||
|
test-before-installing: True
|
|
@ -0,0 +1,94 @@
|
||||||
|
cmake_minimum_required(VERSION 3.16)
|
||||||
|
|
||||||
|
set(KF_VERSION "5.92.0") # handled by release scripts
|
||||||
|
project(ModemManagerQt VERSION ${KF_VERSION})
|
||||||
|
|
||||||
|
include(FeatureSummary)
|
||||||
|
find_package(ECM 5.92.0 NO_MODULE)
|
||||||
|
set_package_properties(ECM PROPERTIES TYPE REQUIRED DESCRIPTION "Extra CMake Modules." URL "https://commits.kde.org/extra-cmake-modules")
|
||||||
|
feature_summary(WHAT REQUIRED_PACKAGES_NOT_FOUND FATAL_ON_MISSING_REQUIRED_PACKAGES)
|
||||||
|
|
||||||
|
|
||||||
|
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake ${ECM_MODULE_PATH})
|
||||||
|
|
||||||
|
find_package(ModemManager 1.0 REQUIRED)
|
||||||
|
|
||||||
|
include(KDEInstallDirs)
|
||||||
|
include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE)
|
||||||
|
include(KDECMakeSettings)
|
||||||
|
include(KDEGitCommitHooks)
|
||||||
|
|
||||||
|
set(REQUIRED_QT_VERSION 5.15.2)
|
||||||
|
find_package(Qt${QT_MAJOR_VERSION} ${REQUIRED_QT_VERSION} REQUIRED Core DBus Xml)
|
||||||
|
|
||||||
|
add_definitions(${QT_DEFINITIONS})
|
||||||
|
|
||||||
|
remove_definitions(-DQT_NO_FOREACH) # set by KDEFrameworkCompilerSettings
|
||||||
|
|
||||||
|
include(GenerateExportHeader)
|
||||||
|
|
||||||
|
include(ECMSetupVersion)
|
||||||
|
include(ECMGenerateHeaders)
|
||||||
|
include(ECMAddQch)
|
||||||
|
include(ECMQtDeclareLoggingCategory)
|
||||||
|
|
||||||
|
option(BUILD_QCH "Build API documentation in QCH format (for e.g. Qt Assistant, Qt Creator & KDevelop)" OFF)
|
||||||
|
add_feature_info(QCH ${BUILD_QCH} "API documentation in QCH format (for e.g. Qt Assistant, Qt Creator & KDevelop)")
|
||||||
|
|
||||||
|
ecm_setup_version(PROJECT VARIABLE_PREFIX MODEMMANAGERQT
|
||||||
|
VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/modemmanagerqt_version.h"
|
||||||
|
PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KF5ModemManagerQtConfigVersion.cmake"
|
||||||
|
SOVERSION 6)
|
||||||
|
add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x050f02)
|
||||||
|
# Enable unit testing
|
||||||
|
if (BUILD_TESTING)
|
||||||
|
add_subdirectory(src/fakemodem)
|
||||||
|
add_subdirectory(autotests)
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
################## examples ################################
|
||||||
|
option(BUILD_EXAMPLES "Build example applications" FALSE)
|
||||||
|
if (BUILD_EXAMPLES)
|
||||||
|
add_subdirectory(examples)
|
||||||
|
endif(BUILD_EXAMPLES)
|
||||||
|
|
||||||
|
add_subdirectory(src)
|
||||||
|
|
||||||
|
# create a Config.cmake and a ConfigVersion.cmake file and install them
|
||||||
|
set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/KF5ModemManagerQt")
|
||||||
|
|
||||||
|
if (BUILD_QCH)
|
||||||
|
ecm_install_qch_export(
|
||||||
|
TARGETS KF5ModemManagerQt_QCH
|
||||||
|
FILE KF5ModemManagerQtQchTargets.cmake
|
||||||
|
DESTINATION "${CMAKECONFIG_INSTALL_DIR}"
|
||||||
|
COMPONENT Devel
|
||||||
|
)
|
||||||
|
set(PACKAGE_INCLUDE_QCHTARGETS "include(\"\${CMAKE_CURRENT_LIST_DIR}/KF5ModemManagerQtQchTargets.cmake\")")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
include(CMakePackageConfigHelpers)
|
||||||
|
|
||||||
|
configure_package_config_file(
|
||||||
|
"${CMAKE_CURRENT_SOURCE_DIR}/KF5ModemManagerQtConfig.cmake.in"
|
||||||
|
"${CMAKE_CURRENT_BINARY_DIR}/KF5ModemManagerQtConfig.cmake"
|
||||||
|
INSTALL_DESTINATION ${CMAKECONFIG_INSTALL_DIR}
|
||||||
|
)
|
||||||
|
|
||||||
|
install(FILES
|
||||||
|
"${CMAKE_CURRENT_BINARY_DIR}/KF5ModemManagerQtConfig.cmake"
|
||||||
|
"${CMAKE_CURRENT_BINARY_DIR}/KF5ModemManagerQtConfigVersion.cmake"
|
||||||
|
DESTINATION "${CMAKECONFIG_INSTALL_DIR}"
|
||||||
|
COMPONENT Devel
|
||||||
|
)
|
||||||
|
|
||||||
|
install(EXPORT KF5ModemManagerQtTargets DESTINATION "${CMAKECONFIG_INSTALL_DIR}" FILE KF5ModemManagerQtTargets.cmake NAMESPACE KF5:: )
|
||||||
|
|
||||||
|
install(FILES
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/modemmanagerqt_version.h
|
||||||
|
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF}/ModemManagerQt COMPONENT Devel
|
||||||
|
)
|
||||||
|
|
||||||
|
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
|
||||||
|
|
||||||
|
kde_configure_git_pre_commit_hook(CHECKS CLANG_FORMAT)
|
|
@ -0,0 +1,9 @@
|
||||||
|
@PACKAGE_INIT@
|
||||||
|
|
||||||
|
include(CMakeFindDependencyMacro)
|
||||||
|
find_dependency(Qt@QT_MAJOR_VERSION@Core @REQUIRED_QT_VERSION@)
|
||||||
|
find_dependency(Qt@QT_MAJOR_VERSION@DBus @REQUIRED_QT_VERSION@)
|
||||||
|
|
||||||
|
|
||||||
|
include("${CMAKE_CURRENT_LIST_DIR}/KF5ModemManagerQtTargets.cmake")
|
||||||
|
@PACKAGE_INCLUDE_QCHTARGETS@
|
|
@ -0,0 +1,26 @@
|
||||||
|
Copyright (c) <year> <owner>. All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without modification,
|
||||||
|
are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
1. Redistributions of source code must retain the above copyright notice,
|
||||||
|
this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||||
|
this list of conditions and the following disclaimer in the documentation
|
||||||
|
and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
3. Neither the name of the copyright holder nor the names of its contributors
|
||||||
|
may be used to endorse or promote products derived from this software without
|
||||||
|
specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||||
|
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
|
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||||
|
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||||
|
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||||
|
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
|
||||||
|
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
@ -0,0 +1,121 @@
|
||||||
|
Creative Commons Legal Code
|
||||||
|
|
||||||
|
CC0 1.0 Universal
|
||||||
|
|
||||||
|
CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
|
||||||
|
LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
|
||||||
|
ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
|
||||||
|
INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
|
||||||
|
REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
|
||||||
|
PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
|
||||||
|
THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED
|
||||||
|
HEREUNDER.
|
||||||
|
|
||||||
|
Statement of Purpose
|
||||||
|
|
||||||
|
The laws of most jurisdictions throughout the world automatically confer
|
||||||
|
exclusive Copyright and Related Rights (defined below) upon the creator
|
||||||
|
and subsequent owner(s) (each and all, an "owner") of an original work of
|
||||||
|
authorship and/or a database (each, a "Work").
|
||||||
|
|
||||||
|
Certain owners wish to permanently relinquish those rights to a Work for
|
||||||
|
the purpose of contributing to a commons of creative, cultural and
|
||||||
|
scientific works ("Commons") that the public can reliably and without fear
|
||||||
|
of later claims of infringement build upon, modify, incorporate in other
|
||||||
|
works, reuse and redistribute as freely as possible in any form whatsoever
|
||||||
|
and for any purposes, including without limitation commercial purposes.
|
||||||
|
These owners may contribute to the Commons to promote the ideal of a free
|
||||||
|
culture and the further production of creative, cultural and scientific
|
||||||
|
works, or to gain reputation or greater distribution for their Work in
|
||||||
|
part through the use and efforts of others.
|
||||||
|
|
||||||
|
For these and/or other purposes and motivations, and without any
|
||||||
|
expectation of additional consideration or compensation, the person
|
||||||
|
associating CC0 with a Work (the "Affirmer"), to the extent that he or she
|
||||||
|
is an owner of Copyright and Related Rights in the Work, voluntarily
|
||||||
|
elects to apply CC0 to the Work and publicly distribute the Work under its
|
||||||
|
terms, with knowledge of his or her Copyright and Related Rights in the
|
||||||
|
Work and the meaning and intended legal effect of CC0 on those rights.
|
||||||
|
|
||||||
|
1. Copyright and Related Rights. A Work made available under CC0 may be
|
||||||
|
protected by copyright and related or neighboring rights ("Copyright and
|
||||||
|
Related Rights"). Copyright and Related Rights include, but are not
|
||||||
|
limited to, the following:
|
||||||
|
|
||||||
|
i. the right to reproduce, adapt, distribute, perform, display,
|
||||||
|
communicate, and translate a Work;
|
||||||
|
ii. moral rights retained by the original author(s) and/or performer(s);
|
||||||
|
iii. publicity and privacy rights pertaining to a person's image or
|
||||||
|
likeness depicted in a Work;
|
||||||
|
iv. rights protecting against unfair competition in regards to a Work,
|
||||||
|
subject to the limitations in paragraph 4(a), below;
|
||||||
|
v. rights protecting the extraction, dissemination, use and reuse of data
|
||||||
|
in a Work;
|
||||||
|
vi. database rights (such as those arising under Directive 96/9/EC of the
|
||||||
|
European Parliament and of the Council of 11 March 1996 on the legal
|
||||||
|
protection of databases, and under any national implementation
|
||||||
|
thereof, including any amended or successor version of such
|
||||||
|
directive); and
|
||||||
|
vii. other similar, equivalent or corresponding rights throughout the
|
||||||
|
world based on applicable law or treaty, and any national
|
||||||
|
implementations thereof.
|
||||||
|
|
||||||
|
2. Waiver. To the greatest extent permitted by, but not in contravention
|
||||||
|
of, applicable law, Affirmer hereby overtly, fully, permanently,
|
||||||
|
irrevocably and unconditionally waives, abandons, and surrenders all of
|
||||||
|
Affirmer's Copyright and Related Rights and associated claims and causes
|
||||||
|
of action, whether now known or unknown (including existing as well as
|
||||||
|
future claims and causes of action), in the Work (i) in all territories
|
||||||
|
worldwide, (ii) for the maximum duration provided by applicable law or
|
||||||
|
treaty (including future time extensions), (iii) in any current or future
|
||||||
|
medium and for any number of copies, and (iv) for any purpose whatsoever,
|
||||||
|
including without limitation commercial, advertising or promotional
|
||||||
|
purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
|
||||||
|
member of the public at large and to the detriment of Affirmer's heirs and
|
||||||
|
successors, fully intending that such Waiver shall not be subject to
|
||||||
|
revocation, rescission, cancellation, termination, or any other legal or
|
||||||
|
equitable action to disrupt the quiet enjoyment of the Work by the public
|
||||||
|
as contemplated by Affirmer's express Statement of Purpose.
|
||||||
|
|
||||||
|
3. Public License Fallback. Should any part of the Waiver for any reason
|
||||||
|
be judged legally invalid or ineffective under applicable law, then the
|
||||||
|
Waiver shall be preserved to the maximum extent permitted taking into
|
||||||
|
account Affirmer's express Statement of Purpose. In addition, to the
|
||||||
|
extent the Waiver is so judged Affirmer hereby grants to each affected
|
||||||
|
person a royalty-free, non transferable, non sublicensable, non exclusive,
|
||||||
|
irrevocable and unconditional license to exercise Affirmer's Copyright and
|
||||||
|
Related Rights in the Work (i) in all territories worldwide, (ii) for the
|
||||||
|
maximum duration provided by applicable law or treaty (including future
|
||||||
|
time extensions), (iii) in any current or future medium and for any number
|
||||||
|
of copies, and (iv) for any purpose whatsoever, including without
|
||||||
|
limitation commercial, advertising or promotional purposes (the
|
||||||
|
"License"). The License shall be deemed effective as of the date CC0 was
|
||||||
|
applied by Affirmer to the Work. Should any part of the License for any
|
||||||
|
reason be judged legally invalid or ineffective under applicable law, such
|
||||||
|
partial invalidity or ineffectiveness shall not invalidate the remainder
|
||||||
|
of the License, and in such case Affirmer hereby affirms that he or she
|
||||||
|
will not (i) exercise any of his or her remaining Copyright and Related
|
||||||
|
Rights in the Work or (ii) assert any associated claims and causes of
|
||||||
|
action with respect to the Work, in either case contrary to Affirmer's
|
||||||
|
express Statement of Purpose.
|
||||||
|
|
||||||
|
4. Limitations and Disclaimers.
|
||||||
|
|
||||||
|
a. No trademark or patent rights held by Affirmer are waived, abandoned,
|
||||||
|
surrendered, licensed or otherwise affected by this document.
|
||||||
|
b. Affirmer offers the Work as-is and makes no representations or
|
||||||
|
warranties of any kind concerning the Work, express, implied,
|
||||||
|
statutory or otherwise, including without limitation warranties of
|
||||||
|
title, merchantability, fitness for a particular purpose, non
|
||||||
|
infringement, or the absence of latent or other defects, accuracy, or
|
||||||
|
the present or absence of errors, whether or not discoverable, all to
|
||||||
|
the greatest extent permissible under applicable law.
|
||||||
|
c. Affirmer disclaims responsibility for clearing rights of other persons
|
||||||
|
that may apply to the Work or any use thereof, including without
|
||||||
|
limitation any person's Copyright and Related Rights in the Work.
|
||||||
|
Further, Affirmer disclaims responsibility for obtaining any necessary
|
||||||
|
consents, permissions or other rights required for any use of the
|
||||||
|
Work.
|
||||||
|
d. Affirmer understands and acknowledges that Creative Commons is not a
|
||||||
|
party to this document and has no duty or obligation with respect to
|
||||||
|
this CC0 or use of the Work.
|
|
@ -0,0 +1,319 @@
|
||||||
|
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.
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
<one line to give the program's name and an idea of what it does.>
|
||||||
|
|
||||||
|
Copyright (C)< yyyy> <name of author>
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
<signature of Ty Coon >, 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.
|
|
@ -0,0 +1,625 @@
|
||||||
|
GNU GENERAL PUBLIC LICENSE
|
||||||
|
|
||||||
|
Version 3, 29 June 2007
|
||||||
|
|
||||||
|
Copyright © 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||||
|
|
||||||
|
Everyone is permitted to copy and distribute verbatim copies of this license
|
||||||
|
document, but changing it is not allowed.
|
||||||
|
|
||||||
|
Preamble
|
||||||
|
|
||||||
|
The GNU General Public License is a free, copyleft license for software and
|
||||||
|
other kinds of works.
|
||||||
|
|
||||||
|
The licenses for most software and other practical works are designed to take
|
||||||
|
away your freedom to share and change the works. By contrast, the GNU General
|
||||||
|
Public License is intended to guarantee your freedom to share and change all
|
||||||
|
versions of a program--to make sure it remains free software for all its users.
|
||||||
|
We, the Free Software Foundation, use the GNU General Public License for most
|
||||||
|
of our software; it applies also to any other work released this way by its
|
||||||
|
authors. 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 them 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 prevent others from denying you these rights
|
||||||
|
or asking you to surrender the rights. Therefore, you have certain responsibilities
|
||||||
|
if you distribute copies of the software, or if you modify it: responsibilities
|
||||||
|
to respect the freedom of others.
|
||||||
|
|
||||||
|
For example, if you distribute copies of such a program, whether gratis or
|
||||||
|
for a fee, you must pass on to the recipients the same freedoms that you received.
|
||||||
|
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.
|
||||||
|
|
||||||
|
Developers that use the GNU GPL protect your rights with two steps: (1) assert
|
||||||
|
copyright on the software, and (2) offer you this License giving you legal
|
||||||
|
permission to copy, distribute and/or modify it.
|
||||||
|
|
||||||
|
For the developers' and authors' protection, the GPL clearly explains that
|
||||||
|
there is no warranty for this free software. For both users' and authors'
|
||||||
|
sake, the GPL requires that modified versions be marked as changed, so that
|
||||||
|
their problems will not be attributed erroneously to authors of previous versions.
|
||||||
|
|
||||||
|
Some devices are designed to deny users access to install or run modified
|
||||||
|
versions of the software inside them, although the manufacturer can do so.
|
||||||
|
This is fundamentally incompatible with the aim of protecting users' freedom
|
||||||
|
to change the software. The systematic pattern of such abuse occurs in the
|
||||||
|
area of products for individuals to use, which is precisely where it is most
|
||||||
|
unacceptable. Therefore, we have designed this version of the GPL to prohibit
|
||||||
|
the practice for those products. If such problems arise substantially in other
|
||||||
|
domains, we stand ready to extend this provision to those domains in future
|
||||||
|
versions of the GPL, as needed to protect the freedom of users.
|
||||||
|
|
||||||
|
Finally, every program is threatened constantly by software patents. States
|
||||||
|
should not allow patents to restrict development and use of software on general-purpose
|
||||||
|
computers, but in those that do, we wish to avoid the special danger that
|
||||||
|
patents applied to a free program could make it effectively proprietary. To
|
||||||
|
prevent this, the GPL assures that patents cannot be used to render the program
|
||||||
|
non-free.
|
||||||
|
|
||||||
|
The precise terms and conditions for copying, distribution and modification
|
||||||
|
follow.
|
||||||
|
|
||||||
|
TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
0. Definitions.
|
||||||
|
|
||||||
|
"This License" refers to version 3 of the GNU General Public License.
|
||||||
|
|
||||||
|
"Copyright" also means copyright-like laws that apply to other kinds of works,
|
||||||
|
such as semiconductor masks.
|
||||||
|
|
||||||
|
"The Program" refers to any copyrightable work licensed under this License.
|
||||||
|
Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals
|
||||||
|
or organizations.
|
||||||
|
|
||||||
|
To "modify" a work means to copy from or adapt all or part of the work in
|
||||||
|
a fashion requiring copyright permission, other than the making of an exact
|
||||||
|
copy. The resulting work is called a "modified version" of the earlier work
|
||||||
|
or a work "based on" the earlier work.
|
||||||
|
|
||||||
|
A "covered work" means either the unmodified Program or a work based on the
|
||||||
|
Program.
|
||||||
|
|
||||||
|
To "propagate" a work means to do anything with it that, without permission,
|
||||||
|
would make you directly or secondarily liable for infringement under applicable
|
||||||
|
copyright law, except executing it on a computer or modifying a private copy.
|
||||||
|
Propagation includes copying, distribution (with or without modification),
|
||||||
|
making available to the public, and in some countries other activities as
|
||||||
|
well.
|
||||||
|
|
||||||
|
To "convey" a work means any kind of propagation that enables other parties
|
||||||
|
to make or receive copies. Mere interaction with a user through a computer
|
||||||
|
network, with no transfer of a copy, is not conveying.
|
||||||
|
|
||||||
|
An interactive user interface displays "Appropriate Legal Notices" to the
|
||||||
|
extent that it includes a convenient and prominently visible feature that
|
||||||
|
(1) displays an appropriate copyright notice, and (2) tells the user that
|
||||||
|
there is no warranty for the work (except to the extent that warranties are
|
||||||
|
provided), that licensees may convey the work under this License, and how
|
||||||
|
to view a copy of this License. If the interface presents a list of user commands
|
||||||
|
or options, such as a menu, a prominent item in the list meets this criterion.
|
||||||
|
|
||||||
|
1. Source Code.
|
||||||
|
|
||||||
|
The "source code" for a work means the preferred form of the work for making
|
||||||
|
modifications to it. "Object code" means any non-source form of a work.
|
||||||
|
|
||||||
|
A "Standard Interface" means an interface that either is an official standard
|
||||||
|
defined by a recognized standards body, or, in the case of interfaces specified
|
||||||
|
for a particular programming language, one that is widely used among developers
|
||||||
|
working in that language.
|
||||||
|
|
||||||
|
The "System Libraries" of an executable work include anything, other than
|
||||||
|
the work as a whole, that (a) is included in the normal form of packaging
|
||||||
|
a Major Component, but which is not part of that Major Component, and (b)
|
||||||
|
serves only to enable use of the work with that Major Component, or to implement
|
||||||
|
a Standard Interface for which an implementation is available to the public
|
||||||
|
in source code form. A "Major Component", in this context, means a major essential
|
||||||
|
component (kernel, window system, and so on) of the specific operating system
|
||||||
|
(if any) on which the executable work runs, or a compiler used to produce
|
||||||
|
the work, or an object code interpreter used to run it.
|
||||||
|
|
||||||
|
The "Corresponding Source" for a work in object code form means all the source
|
||||||
|
code needed to generate, install, and (for an executable work) run the object
|
||||||
|
code and to modify the work, including scripts to control those activities.
|
||||||
|
However, it does not include the work's System Libraries, or general-purpose
|
||||||
|
tools or generally available free programs which are used unmodified in performing
|
||||||
|
those activities but which are not part of the work. For example, Corresponding
|
||||||
|
Source includes interface definition files associated with source files for
|
||||||
|
the work, and the source code for shared libraries and dynamically linked
|
||||||
|
subprograms that the work is specifically designed to require, such as by
|
||||||
|
intimate data communication or control flow between those subprograms and
|
||||||
|
other parts of the work.
|
||||||
|
|
||||||
|
The Corresponding Source need not include anything that users can regenerate
|
||||||
|
automatically from other parts of the Corresponding Source.
|
||||||
|
|
||||||
|
The Corresponding Source for a work in source code form is that same work.
|
||||||
|
|
||||||
|
2. Basic Permissions.
|
||||||
|
|
||||||
|
All rights granted under this License are granted for the term of copyright
|
||||||
|
on the Program, and are irrevocable provided the stated conditions are met.
|
||||||
|
This License explicitly affirms your unlimited permission to run the unmodified
|
||||||
|
Program. The output from running a covered work is covered by this License
|
||||||
|
only if the output, given its content, constitutes a covered work. This License
|
||||||
|
acknowledges your rights of fair use or other equivalent, as provided by copyright
|
||||||
|
law.
|
||||||
|
|
||||||
|
You may make, run and propagate covered works that you do not convey, without
|
||||||
|
conditions so long as your license otherwise remains in force. You may convey
|
||||||
|
covered works to others for the sole purpose of having them make modifications
|
||||||
|
exclusively for you, or provide you with facilities for running those works,
|
||||||
|
provided that you comply with the terms of this License in conveying all material
|
||||||
|
for which you do not control copyright. Those thus making or running the covered
|
||||||
|
works for you must do so exclusively on your behalf, under your direction
|
||||||
|
and control, on terms that prohibit them from making any copies of your copyrighted
|
||||||
|
material outside their relationship with you.
|
||||||
|
|
||||||
|
Conveying under any other circumstances is permitted solely under the conditions
|
||||||
|
stated below. Sublicensing is not allowed; section 10 makes it unnecessary.
|
||||||
|
|
||||||
|
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||||
|
|
||||||
|
No covered work shall be deemed part of an effective technological measure
|
||||||
|
under any applicable law fulfilling obligations under article 11 of the WIPO
|
||||||
|
copyright treaty adopted on 20 December 1996, or similar laws prohibiting
|
||||||
|
or restricting circumvention of such measures.
|
||||||
|
|
||||||
|
When you convey a covered work, you waive any legal power to forbid circumvention
|
||||||
|
of technological measures to the extent such circumvention is effected by
|
||||||
|
exercising rights under this License with respect to the covered work, and
|
||||||
|
you disclaim any intention to limit operation or modification of the work
|
||||||
|
as a means of enforcing, against the work's users, your or third parties'
|
||||||
|
legal rights to forbid circumvention of technological measures.
|
||||||
|
|
||||||
|
4. Conveying Verbatim Copies.
|
||||||
|
|
||||||
|
You may convey 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; keep intact all notices stating
|
||||||
|
that this License and any non-permissive terms added in accord with section
|
||||||
|
7 apply to the code; keep intact all notices of the absence of any warranty;
|
||||||
|
and give all recipients a copy of this License along with the Program.
|
||||||
|
|
||||||
|
You may charge any price or no price for each copy that you convey, and you
|
||||||
|
may offer support or warranty protection for a fee.
|
||||||
|
|
||||||
|
5. Conveying Modified Source Versions.
|
||||||
|
|
||||||
|
You may convey a work based on the Program, or the modifications to produce
|
||||||
|
it from the Program, in the form of source code under the terms of section
|
||||||
|
4, provided that you also meet all of these conditions:
|
||||||
|
|
||||||
|
a) The work must carry prominent notices stating that you modified it, and
|
||||||
|
giving a relevant date.
|
||||||
|
|
||||||
|
b) The work must carry prominent notices stating that it is released under
|
||||||
|
this License and any conditions added under section 7. This requirement modifies
|
||||||
|
the requirement in section 4 to "keep intact all notices".
|
||||||
|
|
||||||
|
c) You must license the entire work, as a whole, under this License to anyone
|
||||||
|
who comes into possession of a copy. This License will therefore apply, along
|
||||||
|
with any applicable section 7 additional terms, to the whole of the work,
|
||||||
|
and all its parts, regardless of how they are packaged. This License gives
|
||||||
|
no permission to license the work in any other way, but it does not invalidate
|
||||||
|
such permission if you have separately received it.
|
||||||
|
|
||||||
|
d) If the work has interactive user interfaces, each must display Appropriate
|
||||||
|
Legal Notices; however, if the Program has interactive interfaces that do
|
||||||
|
not display Appropriate Legal Notices, your work need not make them do so.
|
||||||
|
|
||||||
|
A compilation of a covered work with other separate and independent works,
|
||||||
|
which are not by their nature extensions of the covered work, and which are
|
||||||
|
not combined with it such as to form a larger program, in or on a volume of
|
||||||
|
a storage or distribution medium, is called an "aggregate" if the compilation
|
||||||
|
and its resulting copyright are not used to limit the access or legal rights
|
||||||
|
of the compilation's users beyond what the individual works permit. Inclusion
|
||||||
|
of a covered work in an aggregate does not cause this License to apply to
|
||||||
|
the other parts of the aggregate.
|
||||||
|
|
||||||
|
6. Conveying Non-Source Forms.
|
||||||
|
|
||||||
|
You may convey a covered work in object code form under the terms of sections
|
||||||
|
4 and 5, provided that you also convey the machine-readable Corresponding
|
||||||
|
Source under the terms of this License, in one of these ways:
|
||||||
|
|
||||||
|
a) Convey the object code in, or embodied in, a physical product (including
|
||||||
|
a physical distribution medium), accompanied by the Corresponding Source fixed
|
||||||
|
on a durable physical medium customarily used for software interchange.
|
||||||
|
|
||||||
|
b) Convey the object code in, or embodied in, a physical product (including
|
||||||
|
a physical distribution medium), accompanied by a written offer, valid for
|
||||||
|
at least three years and valid for as long as you offer spare parts or customer
|
||||||
|
support for that product model, to give anyone who possesses the object code
|
||||||
|
either (1) a copy of the Corresponding Source for all the software in the
|
||||||
|
product that is covered by this License, on a durable physical medium customarily
|
||||||
|
used for software interchange, for a price no more than your reasonable cost
|
||||||
|
of physically performing this conveying of source, or (2) access to copy the
|
||||||
|
Corresponding Source from a network server at no charge.
|
||||||
|
|
||||||
|
c) Convey individual copies of the object code with a copy of the written
|
||||||
|
offer to provide the Corresponding Source. This alternative is allowed only
|
||||||
|
occasionally and noncommercially, and only if you received the object code
|
||||||
|
with such an offer, in accord with subsection 6b.
|
||||||
|
|
||||||
|
d) Convey the object code by offering access from a designated place (gratis
|
||||||
|
or for a charge), and offer equivalent access to the Corresponding Source
|
||||||
|
in the same way through the same place at no further charge. You need not
|
||||||
|
require recipients to copy the Corresponding Source along with the object
|
||||||
|
code. If the place to copy the object code is a network server, the Corresponding
|
||||||
|
Source may be on a different server (operated by you or a third party) that
|
||||||
|
supports equivalent copying facilities, provided you maintain clear directions
|
||||||
|
next to the object code saying where to find the Corresponding Source. Regardless
|
||||||
|
of what server hosts the Corresponding Source, you remain obligated to ensure
|
||||||
|
that it is available for as long as needed to satisfy these requirements.
|
||||||
|
|
||||||
|
e) Convey the object code using peer-to-peer transmission, provided you inform
|
||||||
|
other peers where the object code and Corresponding Source of the work are
|
||||||
|
being offered to the general public at no charge under subsection 6d.
|
||||||
|
|
||||||
|
A separable portion of the object code, whose source code is excluded from
|
||||||
|
the Corresponding Source as a System Library, need not be included in conveying
|
||||||
|
the object code work.
|
||||||
|
|
||||||
|
A "User Product" is either (1) a "consumer product", which means any tangible
|
||||||
|
personal property which is normally used for personal, family, or household
|
||||||
|
purposes, or (2) anything designed or sold for incorporation into a dwelling.
|
||||||
|
In determining whether a product is a consumer product, doubtful cases shall
|
||||||
|
be resolved in favor of coverage. For a particular product received by a particular
|
||||||
|
user, "normally used" refers to a typical or common use of that class of product,
|
||||||
|
regardless of the status of the particular user or of the way in which the
|
||||||
|
particular user actually uses, or expects or is expected to use, the product.
|
||||||
|
A product is a consumer product regardless of whether the product has substantial
|
||||||
|
commercial, industrial or non-consumer uses, unless such uses represent the
|
||||||
|
only significant mode of use of the product.
|
||||||
|
|
||||||
|
"Installation Information" for a User Product means any methods, procedures,
|
||||||
|
authorization keys, or other information required to install and execute modified
|
||||||
|
versions of a covered work in that User Product from a modified version of
|
||||||
|
its Corresponding Source. The information must suffice to ensure that the
|
||||||
|
continued functioning of the modified object code is in no case prevented
|
||||||
|
or interfered with solely because modification has been made.
|
||||||
|
|
||||||
|
If you convey an object code work under this section in, or with, or specifically
|
||||||
|
for use in, a User Product, and the conveying occurs as part of a transaction
|
||||||
|
in which the right of possession and use of the User Product is transferred
|
||||||
|
to the recipient in perpetuity or for a fixed term (regardless of how the
|
||||||
|
transaction is characterized), the Corresponding Source conveyed under this
|
||||||
|
section must be accompanied by the Installation Information. But this requirement
|
||||||
|
does not apply if neither you nor any third party retains the ability to install
|
||||||
|
modified object code on the User Product (for example, the work has been installed
|
||||||
|
in ROM).
|
||||||
|
|
||||||
|
The requirement to provide Installation Information does not include a requirement
|
||||||
|
to continue to provide support service, warranty, or updates for a work that
|
||||||
|
has been modified or installed by the recipient, or for the User Product in
|
||||||
|
which it has been modified or installed. Access to a network may be denied
|
||||||
|
when the modification itself materially and adversely affects the operation
|
||||||
|
of the network or violates the rules and protocols for communication across
|
||||||
|
the network.
|
||||||
|
|
||||||
|
Corresponding Source conveyed, and Installation Information provided, in accord
|
||||||
|
with this section must be in a format that is publicly documented (and with
|
||||||
|
an implementation available to the public in source code form), and must require
|
||||||
|
no special password or key for unpacking, reading or copying.
|
||||||
|
|
||||||
|
7. Additional Terms.
|
||||||
|
|
||||||
|
"Additional permissions" are terms that supplement the terms of this License
|
||||||
|
by making exceptions from one or more of its conditions. Additional permissions
|
||||||
|
that are applicable to the entire Program shall be treated as though they
|
||||||
|
were included in this License, to the extent that they are valid under applicable
|
||||||
|
law. If additional permissions apply only to part of the Program, that part
|
||||||
|
may be used separately under those permissions, but the entire Program remains
|
||||||
|
governed by this License without regard to the additional permissions.
|
||||||
|
|
||||||
|
When you convey a copy of a covered work, you may at your option remove any
|
||||||
|
additional permissions from that copy, or from any part of it. (Additional
|
||||||
|
permissions may be written to require their own removal in certain cases when
|
||||||
|
you modify the work.) You may place additional permissions on material, added
|
||||||
|
by you to a covered work, for which you have or can give appropriate copyright
|
||||||
|
permission.
|
||||||
|
|
||||||
|
Notwithstanding any other provision of this License, for material you add
|
||||||
|
to a covered work, you may (if authorized by the copyright holders of that
|
||||||
|
material) supplement the terms of this License with terms:
|
||||||
|
|
||||||
|
a) Disclaiming warranty or limiting liability differently from the terms of
|
||||||
|
sections 15 and 16 of this License; or
|
||||||
|
|
||||||
|
b) Requiring preservation of specified reasonable legal notices or author
|
||||||
|
attributions in that material or in the Appropriate Legal Notices displayed
|
||||||
|
by works containing it; or
|
||||||
|
|
||||||
|
c) Prohibiting misrepresentation of the origin of that material, or requiring
|
||||||
|
that modified versions of such material be marked in reasonable ways as different
|
||||||
|
from the original version; or
|
||||||
|
|
||||||
|
d) Limiting the use for publicity purposes of names of licensors or authors
|
||||||
|
of the material; or
|
||||||
|
|
||||||
|
e) Declining to grant rights under trademark law for use of some trade names,
|
||||||
|
trademarks, or service marks; or
|
||||||
|
|
||||||
|
f) Requiring indemnification of licensors and authors of that material by
|
||||||
|
anyone who conveys the material (or modified versions of it) with contractual
|
||||||
|
assumptions of liability to the recipient, for any liability that these contractual
|
||||||
|
assumptions directly impose on those licensors and authors.
|
||||||
|
|
||||||
|
All other non-permissive additional terms are considered "further restrictions"
|
||||||
|
within the meaning of section 10. If the Program as you received it, or any
|
||||||
|
part of it, contains a notice stating that it is governed by this License
|
||||||
|
along with a term that is a further restriction, you may remove that term.
|
||||||
|
If a license document contains a further restriction but permits relicensing
|
||||||
|
or conveying under this License, you may add to a covered work material governed
|
||||||
|
by the terms of that license document, provided that the further restriction
|
||||||
|
does not survive such relicensing or conveying.
|
||||||
|
|
||||||
|
If you add terms to a covered work in accord with this section, you must place,
|
||||||
|
in the relevant source files, a statement of the additional terms that apply
|
||||||
|
to those files, or a notice indicating where to find the applicable terms.
|
||||||
|
|
||||||
|
Additional terms, permissive or non-permissive, may be stated in the form
|
||||||
|
of a separately written license, or stated as exceptions; the above requirements
|
||||||
|
apply either way.
|
||||||
|
|
||||||
|
8. Termination.
|
||||||
|
|
||||||
|
You may not propagate or modify a covered work except as expressly provided
|
||||||
|
under this License. Any attempt otherwise to propagate or modify it is void,
|
||||||
|
and will automatically terminate your rights under this License (including
|
||||||
|
any patent licenses granted under the third paragraph of section 11).
|
||||||
|
|
||||||
|
However, if you cease all violation of this License, then your license from
|
||||||
|
a particular copyright holder is reinstated (a) provisionally, unless and
|
||||||
|
until the copyright holder explicitly and finally terminates your license,
|
||||||
|
and (b) permanently, if the copyright holder fails to notify you of the violation
|
||||||
|
by some reasonable means prior to 60 days after the cessation.
|
||||||
|
|
||||||
|
Moreover, your license from a particular copyright holder is reinstated permanently
|
||||||
|
if the copyright holder notifies you of the violation by some reasonable means,
|
||||||
|
this is the first time you have received notice of violation of this License
|
||||||
|
(for any work) from that copyright holder, and you cure the violation prior
|
||||||
|
to 30 days after your receipt of the notice.
|
||||||
|
|
||||||
|
Termination of your rights under this section does not terminate the licenses
|
||||||
|
of parties who have received copies or rights from you under this License.
|
||||||
|
If your rights have been terminated and not permanently reinstated, you do
|
||||||
|
not qualify to receive new licenses for the same material under section 10.
|
||||||
|
|
||||||
|
9. Acceptance Not Required for Having Copies.
|
||||||
|
|
||||||
|
You are not required to accept this License in order to receive or run a copy
|
||||||
|
of the Program. Ancillary propagation of a covered work occurring solely as
|
||||||
|
a consequence of using peer-to-peer transmission to receive a copy likewise
|
||||||
|
does not require acceptance. However, nothing other than this License grants
|
||||||
|
you permission to propagate or modify any covered work. These actions infringe
|
||||||
|
copyright if you do not accept this License. Therefore, by modifying or propagating
|
||||||
|
a covered work, you indicate your acceptance of this License to do so.
|
||||||
|
|
||||||
|
10. Automatic Licensing of Downstream Recipients.
|
||||||
|
|
||||||
|
Each time you convey a covered work, the recipient automatically receives
|
||||||
|
a license from the original licensors, to run, modify and propagate that work,
|
||||||
|
subject to this License. You are not responsible for enforcing compliance
|
||||||
|
by third parties with this License.
|
||||||
|
|
||||||
|
An "entity transaction" is a transaction transferring control of an organization,
|
||||||
|
or substantially all assets of one, or subdividing an organization, or merging
|
||||||
|
organizations. If propagation of a covered work results from an entity transaction,
|
||||||
|
each party to that transaction who receives a copy of the work also receives
|
||||||
|
whatever licenses to the work the party's predecessor in interest had or could
|
||||||
|
give under the previous paragraph, plus a right to possession of the Corresponding
|
||||||
|
Source of the work from the predecessor in interest, if the predecessor has
|
||||||
|
it or can get it with reasonable efforts.
|
||||||
|
|
||||||
|
You may not impose any further restrictions on the exercise of the rights
|
||||||
|
granted or affirmed under this License. For example, you may not impose a
|
||||||
|
license fee, royalty, or other charge for exercise of rights granted under
|
||||||
|
this License, and you may not initiate litigation (including a cross-claim
|
||||||
|
or counterclaim in a lawsuit) alleging that any patent claim is infringed
|
||||||
|
by making, using, selling, offering for sale, or importing the Program or
|
||||||
|
any portion of it.
|
||||||
|
|
||||||
|
11. Patents.
|
||||||
|
|
||||||
|
A "contributor" is a copyright holder who authorizes use under this License
|
||||||
|
of the Program or a work on which the Program is based. The work thus licensed
|
||||||
|
is called the contributor's "contributor version".
|
||||||
|
|
||||||
|
A contributor's "essential patent claims" are all patent claims owned or controlled
|
||||||
|
by the contributor, whether already acquired or hereafter acquired, that would
|
||||||
|
be infringed by some manner, permitted by this License, of making, using,
|
||||||
|
or selling its contributor version, but do not include claims that would be
|
||||||
|
infringed only as a consequence of further modification of the contributor
|
||||||
|
version. For purposes of this definition, "control" includes the right to
|
||||||
|
grant patent sublicenses in a manner consistent with the requirements of this
|
||||||
|
License.
|
||||||
|
|
||||||
|
Each contributor grants you a non-exclusive, worldwide, royalty-free patent
|
||||||
|
license under the contributor's essential patent claims, to make, use, sell,
|
||||||
|
offer for sale, import and otherwise run, modify and propagate the contents
|
||||||
|
of its contributor version.
|
||||||
|
|
||||||
|
In the following three paragraphs, a "patent license" is any express agreement
|
||||||
|
or commitment, however denominated, not to enforce a patent (such as an express
|
||||||
|
permission to practice a patent or covenant not to sue for patent infringement).
|
||||||
|
To "grant" such a patent license to a party means to make such an agreement
|
||||||
|
or commitment not to enforce a patent against the party.
|
||||||
|
|
||||||
|
If you convey a covered work, knowingly relying on a patent license, and the
|
||||||
|
Corresponding Source of the work is not available for anyone to copy, free
|
||||||
|
of charge and under the terms of this License, through a publicly available
|
||||||
|
network server or other readily accessible means, then you must either (1)
|
||||||
|
cause the Corresponding Source to be so available, or (2) arrange to deprive
|
||||||
|
yourself of the benefit of the patent license for this particular work, or
|
||||||
|
(3) arrange, in a manner consistent with the requirements of this License,
|
||||||
|
to extend the patent license to downstream recipients. "Knowingly relying"
|
||||||
|
means you have actual knowledge that, but for the patent license, your conveying
|
||||||
|
the covered work in a country, or your recipient's use of the covered work
|
||||||
|
in a country, would infringe one or more identifiable patents in that country
|
||||||
|
that you have reason to believe are valid.
|
||||||
|
|
||||||
|
If, pursuant to or in connection with a single transaction or arrangement,
|
||||||
|
you convey, or propagate by procuring conveyance of, a covered work, and grant
|
||||||
|
a patent license to some of the parties receiving the covered work authorizing
|
||||||
|
them to use, propagate, modify or convey a specific copy of the covered work,
|
||||||
|
then the patent license you grant is automatically extended to all recipients
|
||||||
|
of the covered work and works based on it.
|
||||||
|
|
||||||
|
A patent license is "discriminatory" if it does not include within the scope
|
||||||
|
of its coverage, prohibits the exercise of, or is conditioned on the non-exercise
|
||||||
|
of one or more of the rights that are specifically granted under this License.
|
||||||
|
You may not convey a covered work if you are a party to an arrangement with
|
||||||
|
a third party that is in the business of distributing software, under which
|
||||||
|
you make payment to the third party based on the extent of your activity of
|
||||||
|
conveying the work, and under which the third party grants, to any of the
|
||||||
|
parties who would receive the covered work from you, a discriminatory patent
|
||||||
|
license (a) in connection with copies of the covered work conveyed by you
|
||||||
|
(or copies made from those copies), or (b) primarily for and in connection
|
||||||
|
with specific products or compilations that contain the covered work, unless
|
||||||
|
you entered into that arrangement, or that patent license was granted, prior
|
||||||
|
to 28 March 2007.
|
||||||
|
|
||||||
|
Nothing in this License shall be construed as excluding or limiting any implied
|
||||||
|
license or other defenses to infringement that may otherwise be available
|
||||||
|
to you under applicable patent law.
|
||||||
|
|
||||||
|
12. No Surrender of Others' Freedom.
|
||||||
|
|
||||||
|
If 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 convey a covered work so as
|
||||||
|
to satisfy simultaneously your obligations under this License and any other
|
||||||
|
pertinent obligations, then as a consequence you may not convey it at all.
|
||||||
|
For example, if you agree to terms that obligate you to collect a royalty
|
||||||
|
for further conveying from those to whom you convey the Program, the only
|
||||||
|
way you could satisfy both those terms and this License would be to refrain
|
||||||
|
entirely from conveying the Program.
|
||||||
|
|
||||||
|
13. Use with the GNU Affero General Public License.
|
||||||
|
|
||||||
|
Notwithstanding any other provision of this License, you have permission to
|
||||||
|
link or combine any covered work with a work licensed under version 3 of the
|
||||||
|
GNU Affero General Public License into a single combined work, and to convey
|
||||||
|
the resulting work. The terms of this License will continue to apply to the
|
||||||
|
part which is the covered work, but the special requirements of the GNU Affero
|
||||||
|
General Public License, section 13, concerning interaction through a network
|
||||||
|
will apply to the combination as such.
|
||||||
|
|
||||||
|
14. Revised Versions of this License.
|
||||||
|
|
||||||
|
The Free Software Foundation may publish revised and/or new versions of the
|
||||||
|
GNU 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
|
||||||
|
that a certain numbered version of the GNU General Public License "or any
|
||||||
|
later version" applies to it, you have the option of following the terms and
|
||||||
|
conditions either of that numbered version or of any later version published
|
||||||
|
by the Free Software Foundation. If the Program does not specify a version
|
||||||
|
number of the GNU General Public License, you may choose any version ever
|
||||||
|
published by the Free Software Foundation.
|
||||||
|
|
||||||
|
If the Program specifies that a proxy can decide which future versions of
|
||||||
|
the GNU General Public License can be used, that proxy's public statement
|
||||||
|
of acceptance of a version permanently authorizes you to choose that version
|
||||||
|
for the Program.
|
||||||
|
|
||||||
|
Later license versions may give you additional or different permissions. However,
|
||||||
|
no additional obligations are imposed on any author or copyright holder as
|
||||||
|
a result of your choosing to follow a later version.
|
||||||
|
|
||||||
|
15. Disclaimer of Warranty.
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
16. Limitation of Liability.
|
||||||
|
|
||||||
|
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL
|
||||||
|
ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 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.
|
||||||
|
|
||||||
|
17. Interpretation of Sections 15 and 16.
|
||||||
|
|
||||||
|
If the disclaimer of warranty and limitation of liability provided above cannot
|
||||||
|
be given local legal effect according to their terms, reviewing courts shall
|
||||||
|
apply local law that most closely approximates an absolute waiver of all civil
|
||||||
|
liability in connection with the Program, unless a warranty or assumption
|
||||||
|
of liability accompanies a copy of the Program in return for a fee. 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 state the exclusion
|
||||||
|
of warranty; and each file should have at least the "copyright" line and a
|
||||||
|
pointer to where the full notice is found.
|
||||||
|
|
||||||
|
<one line to give the program's name and a brief idea of what it does.>
|
||||||
|
|
||||||
|
Copyright (C) <year> <name of author>
|
||||||
|
|
||||||
|
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 3 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 <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
Also add information on how to contact you by electronic and paper mail.
|
||||||
|
|
||||||
|
If the program does terminal interaction, make it output a short notice like
|
||||||
|
this when it starts in an interactive mode:
|
||||||
|
|
||||||
|
<program> Copyright (C) <year> <name of author>
|
||||||
|
|
||||||
|
This program 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, your program's commands might
|
||||||
|
be different; for a GUI interface, you would use an "about box".
|
||||||
|
|
||||||
|
You should also get your employer (if you work as a programmer) or school,
|
||||||
|
if any, to sign a "copyright disclaimer" for the program, if necessary. For
|
||||||
|
more information on this, and how to apply and follow the GNU GPL, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
The GNU 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. But first, please read <https://www.gnu.org/
|
||||||
|
licenses /why-not-lgpl.html>.
|
|
@ -0,0 +1,467 @@
|
||||||
|
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.
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
< one line to give the library's name and an idea of what it does. >
|
||||||
|
|
||||||
|
Copyright (C) < year > < name of author >
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
< signature of Ty Coon > , 1 April 1990
|
||||||
|
|
||||||
|
Ty Coon, President of Vice
|
||||||
|
|
||||||
|
That's all there is to it!
|
|
@ -0,0 +1,163 @@
|
||||||
|
GNU LESSER GENERAL PUBLIC LICENSE
|
||||||
|
|
||||||
|
Version 3, 29 June 2007
|
||||||
|
|
||||||
|
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||||
|
|
||||||
|
Everyone is permitted to copy and distribute verbatim copies of this license
|
||||||
|
document, but changing it is not allowed.
|
||||||
|
|
||||||
|
This version of the GNU Lesser General Public License incorporates the terms
|
||||||
|
and conditions of version 3 of the GNU General Public License, supplemented
|
||||||
|
by the additional permissions listed below.
|
||||||
|
|
||||||
|
0. Additional Definitions.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
As used herein, "this License" refers to version 3 of the GNU Lesser General
|
||||||
|
Public License, and the "GNU GPL" refers to version 3 of the GNU General Public
|
||||||
|
License.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
"The Library" refers to a covered work governed by this License, other than
|
||||||
|
an Application or a Combined Work as defined below.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
An "Application" is any work that makes use of an interface provided by the
|
||||||
|
Library, but which is not otherwise based on the Library. Defining a subclass
|
||||||
|
of a class defined by the Library is deemed a mode of using an interface provided
|
||||||
|
by the Library.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
A "Combined Work" is a work produced by combining or linking an Application
|
||||||
|
with the Library. The particular version of the Library with which the Combined
|
||||||
|
Work was made is also called the "Linked Version".
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
The "Minimal Corresponding Source" for a Combined Work means the Corresponding
|
||||||
|
Source for the Combined Work, excluding any source code for portions of the
|
||||||
|
Combined Work that, considered in isolation, are based on the Application,
|
||||||
|
and not on the Linked Version.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
The "Corresponding Application Code" for a Combined Work means the object
|
||||||
|
code and/or source code for the Application, including any data and utility
|
||||||
|
programs needed for reproducing the Combined Work from the Application, but
|
||||||
|
excluding the System Libraries of the Combined Work.
|
||||||
|
|
||||||
|
1. Exception to Section 3 of the GNU GPL.
|
||||||
|
|
||||||
|
You may convey a covered work under sections 3 and 4 of this License without
|
||||||
|
being bound by section 3 of the GNU GPL.
|
||||||
|
|
||||||
|
2. Conveying Modified Versions.
|
||||||
|
|
||||||
|
If you modify a copy of the Library, and, in your modifications, a facility
|
||||||
|
refers to a function or data to be supplied by an Application that uses the
|
||||||
|
facility (other than as an argument passed when the facility is invoked),
|
||||||
|
then you may convey a copy of the modified version:
|
||||||
|
|
||||||
|
a) under this License, provided that you make a good faith effort to ensure
|
||||||
|
that, in the event an Application does not supply the function or data, the
|
||||||
|
facility still operates, and performs whatever part of its purpose remains
|
||||||
|
meaningful, or
|
||||||
|
|
||||||
|
b) under the GNU GPL, with none of the additional permissions of this License
|
||||||
|
applicable to that copy.
|
||||||
|
|
||||||
|
3. Object Code Incorporating Material from Library Header Files.
|
||||||
|
|
||||||
|
The object code form of an Application may incorporate material from a header
|
||||||
|
file that is part of the Library. You may convey such object code under terms
|
||||||
|
of your choice, provided that, if the incorporated material is not limited
|
||||||
|
to numerical parameters, data structure layouts and accessors, or small macros,
|
||||||
|
inline functions and templates (ten or fewer lines in length), you do both
|
||||||
|
of the following:
|
||||||
|
|
||||||
|
a) Give prominent notice with each copy of the object code that the Library
|
||||||
|
is used in it and that the Library and its use are covered by this License.
|
||||||
|
|
||||||
|
b) Accompany the object code with a copy of the GNU GPL and this license document.
|
||||||
|
|
||||||
|
4. Combined Works.
|
||||||
|
|
||||||
|
You may convey a Combined Work under terms of your choice that, taken together,
|
||||||
|
effectively do not restrict modification of the portions of the Library contained
|
||||||
|
in the Combined Work and reverse engineering for debugging such modifications,
|
||||||
|
if you also do each of the following:
|
||||||
|
|
||||||
|
a) Give prominent notice with each copy of the Combined Work that the Library
|
||||||
|
is used in it and that the Library and its use are covered by this License.
|
||||||
|
|
||||||
|
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
||||||
|
document.
|
||||||
|
|
||||||
|
c) For a Combined Work that displays copyright notices during execution, include
|
||||||
|
the copyright notice for the Library among these notices, as well as a reference
|
||||||
|
directing the user to the copies of the GNU GPL and this license document.
|
||||||
|
|
||||||
|
d) Do one of the following:
|
||||||
|
|
||||||
|
0) Convey the Minimal Corresponding Source under the terms of this License,
|
||||||
|
and the Corresponding Application Code in a form suitable for, and under terms
|
||||||
|
that permit, the user to recombine or relink the Application with a modified
|
||||||
|
version of the Linked Version to produce a modified Combined Work, in the
|
||||||
|
manner specified by section 6 of the GNU GPL for conveying Corresponding Source.
|
||||||
|
|
||||||
|
1) Use a suitable shared library mechanism for linking with the Library. A
|
||||||
|
suitable mechanism is one that (a) uses at run time a copy of the Library
|
||||||
|
already present on the user's computer system, and (b) will operate properly
|
||||||
|
with a modified version of the Library that is interface-compatible with the
|
||||||
|
Linked Version.
|
||||||
|
|
||||||
|
e) Provide Installation Information, but only if you would otherwise be required
|
||||||
|
to provide such information under section 6 of the GNU GPL, and only to the
|
||||||
|
extent that such information is necessary to install and execute a modified
|
||||||
|
version of the Combined Work produced by recombining or relinking the Application
|
||||||
|
with a modified version of the Linked Version. (If you use option 4d0, the
|
||||||
|
Installation Information must accompany the Minimal Corresponding Source and
|
||||||
|
Corresponding Application Code. If you use option 4d1, you must provide the
|
||||||
|
Installation Information in the manner specified by section 6 of the GNU GPL
|
||||||
|
for conveying Corresponding Source.)
|
||||||
|
|
||||||
|
5. Combined Libraries.
|
||||||
|
|
||||||
|
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 that are
|
||||||
|
not Applications and are not covered by this License, and convey such a combined
|
||||||
|
library under terms of your choice, if you do both of the following:
|
||||||
|
|
||||||
|
a) Accompany the combined library with a copy of the same work based on the
|
||||||
|
Library, uncombined with any other library facilities, conveyed under the
|
||||||
|
terms of this License.
|
||||||
|
|
||||||
|
b) Give prominent notice with the combined library that part of it is a work
|
||||||
|
based on the Library, and explaining where to find the accompanying uncombined
|
||||||
|
form of the same work.
|
||||||
|
|
||||||
|
6. Revised Versions of the GNU Lesser General Public License.
|
||||||
|
|
||||||
|
The Free Software Foundation may publish revised and/or new versions of the
|
||||||
|
GNU 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 as you
|
||||||
|
received it specifies that a certain numbered version of the GNU Lesser General
|
||||||
|
Public License "or any later version" applies to it, you have the option of
|
||||||
|
following the terms and conditions either of that published version or of
|
||||||
|
any later version published by the Free Software Foundation. If the Library
|
||||||
|
as you received it does not specify a version number of the GNU Lesser General
|
||||||
|
Public License, you may choose any version of the GNU Lesser General Public
|
||||||
|
License ever published by the Free Software Foundation.
|
||||||
|
|
||||||
|
If the Library as you received it specifies that a proxy can decide whether
|
||||||
|
future versions of the GNU Lesser General Public License shall apply, that
|
||||||
|
proxy's public statement of acceptance of any version is permanent authorization
|
||||||
|
for you to choose that version for the Library.
|
|
@ -0,0 +1,12 @@
|
||||||
|
This library 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 3 of
|
||||||
|
the license or (at your option) at any later version that is
|
||||||
|
accepted by the membership of KDE e.V. (or its successor
|
||||||
|
approved by the membership of KDE e.V.), which shall act as a
|
||||||
|
proxy as defined in Section 14 of version 3 of the license.
|
||||||
|
|
||||||
|
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.
|
|
@ -0,0 +1,12 @@
|
||||||
|
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 3 of the license or (at your option) any later version
|
||||||
|
that is accepted by the membership of KDE e.V. (or its successor
|
||||||
|
approved by the membership of KDE e.V.), which shall act as a
|
||||||
|
proxy as defined in Section 6 of version 3 of the license.
|
||||||
|
|
||||||
|
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.
|
|
@ -0,0 +1,177 @@
|
||||||
|
Modem Manager (MM) specification: https://developer.gnome.org/ModemManager/unstable/ref-dbus.html
|
||||||
|
|
||||||
|
// TODO - UPDATE
|
||||||
|
Requirements
|
||||||
|
============
|
||||||
|
Backend tested using git versions of NetworkManager and ModemManager as of May 16, 2010. To verify which interfaces ModemManager and your modem supports do:
|
||||||
|
|
||||||
|
dbus-send --system --print-reply --dest=org.freedesktop.ModemManager1 /org/freedesktop/ModemManager1 org.freedesktop.DBus.Introspectable.Introspect
|
||||||
|
|
||||||
|
dbus-send --system --print-reply --dest=org.freedesktop.ModemManager1 /org/freedesktop/ModemManager1/Modems/<modem number> org.freedesktop.DBus.Introspectable.Introspect
|
||||||
|
|
||||||
|
where:
|
||||||
|
<modem number> is returned by dbus-send --system --print-reply --dest=org.freedesktop.ModemManager1 /org/freedesktop/ModemManager1 org.freedesktop.ModemManager1.EnumerateDevices
|
||||||
|
|
||||||
|
I had to add the uni() method to NetworkManager backend because most MM methods requires a path that looks like /org/freedesktop/ModemManager1/Modems/<modem number>. uni() return such path, so it is the easier way to find a MM object from a NM object.
|
||||||
|
|
||||||
|
Implementation
|
||||||
|
==============
|
||||||
|
The backend organizes MM interfaces as follow:
|
||||||
|
|
||||||
|
→ class ModemManager
|
||||||
|
org.freedesktop.ModemManager1
|
||||||
|
|
||||||
|
→ class ModemDevice
|
||||||
|
- doesn't have an interface on dbus, represents /org/freedesktop/ModemManager1/Modems/<modem number>
|
||||||
|
- contains all the interfaces below
|
||||||
|
|
||||||
|
→ class Modem
|
||||||
|
org.freedesktop.ModemManager1.Modem
|
||||||
|
org.freedesktop.ModemManager1.Modem.Simple
|
||||||
|
|
||||||
|
→ class Modem3gpp inherits from Interface
|
||||||
|
org.freedesktop.ModemManager1.Modem.Modem3gpp
|
||||||
|
|
||||||
|
→ class Modem3gppUssd inherits from Interface
|
||||||
|
org.freedesktop.ModemManager1.Modem.Modem3gpp.Ussd
|
||||||
|
|
||||||
|
→ class ModemCdma inherits from Interface
|
||||||
|
org.freedesktop.ModemManager1.Modem.ModemCdma
|
||||||
|
|
||||||
|
→ class ModemLocation inherits from Interface
|
||||||
|
org.freedesktop.ModemManager1.Modem.Location
|
||||||
|
|
||||||
|
→ class ModemMessaging inherits from Interface
|
||||||
|
org.freedesktop.ModemManager1.Modem.Messaging
|
||||||
|
|
||||||
|
→ class ModemTime inherits from Interface
|
||||||
|
org.freedesktop.ModemManager1.Modem.Time
|
||||||
|
|
||||||
|
// TODO - missing
|
||||||
|
→ class ModemFirmware inherits from Interface
|
||||||
|
org.freedesktop.ModemManager1.Modem.Firmware
|
||||||
|
|
||||||
|
→ class ModemContacts inherits from Interface
|
||||||
|
org.freedesktop.ModemManager1.Modem.Contacts
|
||||||
|
|
||||||
|
→ class Bearer
|
||||||
|
org.freedesktop.ModemManager1.Bearer
|
||||||
|
|
||||||
|
→ class Sim
|
||||||
|
org.freedesktop.ModemManager1.Sim
|
||||||
|
|
||||||
|
→ class Sms
|
||||||
|
org.freedesktop.ModemManager1.Sms
|
||||||
|
|
||||||
|
// TODO - needs to update to mach the new ModemManager
|
||||||
|
|
||||||
|
Current Implementation Status
|
||||||
|
============================
|
||||||
|
org.freedesktop.ModemManager1
|
||||||
|
- fully implemented
|
||||||
|
- still needs testing: signals DeviceAdded and DeviceRemoved
|
||||||
|
|
||||||
|
org.freedesktop.DBus.Properties
|
||||||
|
- fully implemented and tested
|
||||||
|
|
||||||
|
org.freedesktop.ModemManager1.Modem
|
||||||
|
- fully implemented, needs more testing
|
||||||
|
- modem MD300 does not supports: method GetIP4Config
|
||||||
|
|
||||||
|
org.freedesktop.ModemManager1.Modem.Simple
|
||||||
|
- fully implemented, needs more testing
|
||||||
|
|
||||||
|
org.freedesktop.ModemManager1.Modem.Location
|
||||||
|
- fully implemented, not tested yet
|
||||||
|
- modem MD300 does not support this interface (it is not listed when calling org.freedesktop.DBus.Introspectable.Introspect)
|
||||||
|
|
||||||
|
org.freedesktop.ModemManager1.Modem.Cdma
|
||||||
|
- fully implemented, not tested yet
|
||||||
|
- modem MD300 does not support this interface
|
||||||
|
|
||||||
|
org.freedesktop.ModemManager1.Modem.3gpp
|
||||||
|
- fully implemented and tested
|
||||||
|
|
||||||
|
org.freedesktop.ModemManager1.Modem.Gsm.Card
|
||||||
|
- fully implemented, needs more testing
|
||||||
|
|
||||||
|
org.freedesktop.ModemManager1.Modem.Gsm.Contacts
|
||||||
|
- fully implemented, not tested yet
|
||||||
|
- modem MD300 does not support this interface
|
||||||
|
|
||||||
|
org.freedesktop.ModemManager1.Modem.Gsm.Network
|
||||||
|
- fully implemented
|
||||||
|
- to be tested: methods Register and SetApn
|
||||||
|
- still not working (returns error): method scan
|
||||||
|
- modem MD300 does not support: method GetBand and probably method SetBand too. SignalQuality method only works in 2G mode for MD300 modem, maybe for other modems it works in 3G mode.
|
||||||
|
|
||||||
|
org.freedesktop.ModemManager1.Modem.Gsm.SMS
|
||||||
|
- fully implemented, not tested yet
|
||||||
|
- modem MD300 does not support method List and probably all other methods in this interface.
|
||||||
|
org.freedesktop.ModemManager1.Modem.Gsm.Hso - fully implemented, not tested yet
|
||||||
|
- modem MD300 does not support this interface
|
||||||
|
|
||||||
|
org.freedesktop.ModemManager.Modem.Gsm.Ussd
|
||||||
|
- fully implemented, not tested yet
|
||||||
|
- modem MD300 does not support this interface
|
||||||
|
|
||||||
|
Pending Problems
|
||||||
|
================
|
||||||
|
1. Needs more testing with other modems/cell phones.
|
||||||
|
|
||||||
|
2. When I hook up a second 3G modem (my cell phone actually) in my notebook
|
||||||
|
sometimes ModemManager disconnects the first modem from Internet. This is not a
|
||||||
|
KDE problem, just to warn everybody.
|
||||||
|
|
||||||
|
3. I still need to implement some caching to prevent stress in the DBus bus.
|
||||||
|
|
||||||
|
4. Missing comments about methods, enum and signal in some classes. Now that everything is implemented I will add the missing comments.
|
||||||
|
|
||||||
|
Command line
|
||||||
|
============
|
||||||
|
|
||||||
|
The dbus methods can be tested in command line with:
|
||||||
|
|
||||||
|
dbus-send --system --print-reply --dest=org.freedesktop.ModemManager1 /org/freedesktop/ModemManager1 org.freedesktop.ModemManager1.EnumerateDevices
|
||||||
|
|
||||||
|
dbus-send --system --print-reply --dest=org.freedesktop.ModemManager1 /org/freedesktop/ModemManager1/Modems/<modem number> org.freedesktop.ModemManager1.Modem.Gsm.Network.GetSignalQuality
|
||||||
|
|
||||||
|
dbus-send --system --print-reply --dest=org.freedesktop.ModemManager1 /org/freedesktop/ModemManager1/Modems/<modem number> org.freedesktop.ModemManager1.Modem.Gsm.Network.GetRegistrationInfo
|
||||||
|
|
||||||
|
dbus-send --system --print-reply --dest=org.freedesktop.ModemManager1 /org/freedesktop/ModemManager1/Modems/<modem number> org.freedesktop.DBus.Properties.GetAll string:<interface name>
|
||||||
|
|
||||||
|
<modem number> is returned by the first command (EnumerateDevices).
|
||||||
|
<interface name> is either of
|
||||||
|
|
||||||
|
org.freedesktop.ModemManager1 (do not use /Modems/<modem number> with this one)
|
||||||
|
org.freedesktop.DBus.Properties (do not use /Modems/<modem number> with this one)
|
||||||
|
org.freedesktop.ModemManager1.Modem
|
||||||
|
org.freedesktop.ModemManager1.Modem.Simple
|
||||||
|
org.freedesktop.ModemManager1.Modem.Location
|
||||||
|
org.freedesktop.ModemManager1.Modem.Cdma
|
||||||
|
org.freedesktop.ModemManager1.Modem.Gsm
|
||||||
|
org.freedesktop.ModemManager1.Modem.Gsm.Card
|
||||||
|
org.freedesktop.ModemManager1.Modem.Gsm.Contacts
|
||||||
|
org.freedesktop.ModemManager1.Modem.Gsm.Network
|
||||||
|
org.freedesktop.ModemManager1.Modem.Gsm.SMS
|
||||||
|
org.freedesktop.ModemManager1.Modem.Gsm.Hso
|
||||||
|
org.freedesktop.ModemManager1.Modem.Gsm.Ussd
|
||||||
|
|
||||||
|
Devices Known to Work
|
||||||
|
=====================
|
||||||
|
|
||||||
|
. Sony Ericsson MD300 modem
|
||||||
|
- connects to the Internet.
|
||||||
|
- Signal Quality indication only in Edge mode. When in 3G mode the modem only reports the number of bars (zero to five), but Modem Manager does not report that either. We can change Modem Manager to report an approximation of the signal quality based on the number of bars.
|
||||||
|
|
||||||
|
. Samsung Omnia HD i8910
|
||||||
|
- connects to the Internet.
|
||||||
|
- Select "Any" in Plasma NM -> Manage Connections -> Mobile Broadband -> <connection name> -> Edit -> Type or it will not connect
|
||||||
|
- Access technology not reported by Modem Manager.
|
||||||
|
|
||||||
|
. Nokia N95
|
||||||
|
- connects to the Internet.
|
||||||
|
- Access technology not reported by Modem Manager.
|
||||||
|
|
||||||
|
. Huwaei e226
|
||||||
|
- connects to the Internet.
|
|
@ -0,0 +1,11 @@
|
||||||
|
# ModemManagerQt
|
||||||
|
|
||||||
|
Qt wrapper for ModemManager DBus API.
|
||||||
|
|
||||||
|
## Introduction
|
||||||
|
|
||||||
|
ModemManagerQt provides access to all ModemManager features
|
||||||
|
exposed on DBus. It allows you to manage modem devices and access
|
||||||
|
to information available for your modem devices, like signal, location
|
||||||
|
and messages.
|
||||||
|
|
|
@ -0,0 +1,36 @@
|
||||||
|
include_directories(
|
||||||
|
${MODEMMANAGER_INCLUDE_DIRS}
|
||||||
|
)
|
||||||
|
|
||||||
|
include(ECMAddTests)
|
||||||
|
|
||||||
|
find_package(Qt${QT_MAJOR_VERSION} ${REQUIRED_QT_VERSION} NO_MODULE REQUIRED Test)
|
||||||
|
set_package_properties(Qt5Test PROPERTIES PURPOSE "Required for autotests")
|
||||||
|
|
||||||
|
macro(serialize_test target)
|
||||||
|
set_property(TEST ${target} PROPERTY RUN_SERIAL 1)
|
||||||
|
endmacro()
|
||||||
|
|
||||||
|
ecm_add_test(bearerpropertiestest.cpp LINK_LIBRARIES Qt${QT_MAJOR_VERSION}::Test KF5ModemManagerQt_static fakeModem)
|
||||||
|
serialize_test(bearerpropertiestest)
|
||||||
|
ecm_add_test(modemtest.cpp LINK_LIBRARIES Qt${QT_MAJOR_VERSION}::Test KF5ModemManagerQt_static fakeModem)
|
||||||
|
serialize_test(modemtest)
|
||||||
|
ecm_add_test(modempropertiestest.cpp LINK_LIBRARIES Qt${QT_MAJOR_VERSION}::Test KF5ModemManagerQt_static fakeModem)
|
||||||
|
serialize_test(modempropertiestest)
|
||||||
|
ecm_add_test(modem3gpppropertiestest.cpp LINK_LIBRARIES Qt${QT_MAJOR_VERSION}::Test KF5ModemManagerQt_static fakeModem)
|
||||||
|
serialize_test(modem3gpppropertiestest)
|
||||||
|
ecm_add_test(modem3gppussdpropertiestest.cpp LINK_LIBRARIES Qt${QT_MAJOR_VERSION}::Test KF5ModemManagerQt_static fakeModem)
|
||||||
|
serialize_test(modem3gppussdpropertiestest)
|
||||||
|
ecm_add_test(modemcdmapropertiestest.cpp LINK_LIBRARIES Qt${QT_MAJOR_VERSION}::Test KF5ModemManagerQt_static fakeModem)
|
||||||
|
serialize_test(modemcdmapropertiestest)
|
||||||
|
ecm_add_test(modemmessagingpropertiestest.cpp LINK_LIBRARIES Qt${QT_MAJOR_VERSION}::Test KF5ModemManagerQt_static fakeModem)
|
||||||
|
serialize_test(modemmessagingpropertiestest)
|
||||||
|
ecm_add_test(modemlocationpropertiestest.cpp LINK_LIBRARIES Qt${QT_MAJOR_VERSION}::Test KF5ModemManagerQt_static fakeModem)
|
||||||
|
serialize_test(modemlocationpropertiestest)
|
||||||
|
ecm_add_test(modemtimepropertiestest.cpp LINK_LIBRARIES Qt${QT_MAJOR_VERSION}::Test KF5ModemManagerQt_static fakeModem)
|
||||||
|
serialize_test(modemtimepropertiestest)
|
||||||
|
|
||||||
|
if (${MODEMMANAGER_VERSION} VERSION_EQUAL 1.2.0 OR ${MODEMMANAGER_VERSION} VERSION_GREATER 1.2.0)
|
||||||
|
ecm_add_test(modemomapropertiestest.cpp LINK_LIBRARIES Qt${QT_MAJOR_VERSION}::Test KF5ModemManagerQt_static fakeModem)
|
||||||
|
serialize_test(modemomapropertiestest)
|
||||||
|
endif()
|
|
@ -0,0 +1,129 @@
|
||||||
|
/*
|
||||||
|
SPDX-FileCopyrightText: 2015 Jan Grulich <jgrulich@redhat.com>
|
||||||
|
|
||||||
|
SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "bearerpropertiestest.h"
|
||||||
|
|
||||||
|
#include "generictypes.h"
|
||||||
|
#include "manager.h"
|
||||||
|
#include "modem.h"
|
||||||
|
|
||||||
|
#include "fakemodem/modem.h"
|
||||||
|
|
||||||
|
#include <QSignalSpy>
|
||||||
|
#include <QTest>
|
||||||
|
|
||||||
|
void BearerPropertiesTest::initTestCase()
|
||||||
|
{
|
||||||
|
fakeModem = new FakeModem();
|
||||||
|
|
||||||
|
modem = new Modem();
|
||||||
|
modem->setAccessTechnologies(16);
|
||||||
|
modem->SetCurrentBands({0});
|
||||||
|
modem->SetCurrentCapabilities(4);
|
||||||
|
modem->SetCurrentModes({MM_MODEM_MODE_ANY, MM_MODEM_MODE_NONE});
|
||||||
|
modem->setDevice(QLatin1String("/sys/devices/pci0000:00/0000:00:1d.0/usb4/4-1/4-1.2"));
|
||||||
|
modem->setDeviceIdentifier(QLatin1String("1c435eb6d74494b5f78d7221e2c5ae9ec526a981"));
|
||||||
|
modem->setDrivers({QLatin1String("option1")});
|
||||||
|
modem->setEquipmentIdentifier(QLatin1String("353475021085110"));
|
||||||
|
modem->setManufacturer(QLatin1String("huawei"));
|
||||||
|
modem->setMaxActiveBearers(1);
|
||||||
|
modem->setMaxBearers(1);
|
||||||
|
modem->setModel(QLatin1String("K2540"));
|
||||||
|
// modem->setOwnNumbers();
|
||||||
|
modem->setPlugin(QLatin1String("Huawei"));
|
||||||
|
modem->setPorts({{QLatin1String("ttyUSB0"), MM_MODEM_PORT_TYPE_AT},
|
||||||
|
{QLatin1String("ttyUSB1"), MM_MODEM_PORT_TYPE_QCDM},
|
||||||
|
{QLatin1String("ttyUSB2"), MM_MODEM_PORT_TYPE_AT}});
|
||||||
|
modem->SetPowerState(3);
|
||||||
|
modem->setPrimaryPort(QLatin1String("ttyUSB2"));
|
||||||
|
modem->setRevision(QLatin1String("11.001.05.00.11"));
|
||||||
|
modem->setSignalQuality({93, true});
|
||||||
|
modem->setSim(QDBusObjectPath("/org/kde/fakemodem/SIM/1"));
|
||||||
|
modem->setState(8);
|
||||||
|
modem->setStateFailedReason(0);
|
||||||
|
modem->setSupportedBands({0});
|
||||||
|
modem->setSupportedCapabilities({4});
|
||||||
|
modem->setSupportedIpFamilies(3);
|
||||||
|
ModemManager::SupportedModesType supportedModes;
|
||||||
|
ModemManager::CurrentModesType supportedMode1 = {MM_MODEM_MODE_4G & MM_MODEM_MODE_3G & MM_MODEM_MODE_2G, MM_MODEM_MODE_NONE};
|
||||||
|
ModemManager::CurrentModesType supportedMode2 = {MM_MODEM_MODE_4G & MM_MODEM_MODE_3G & MM_MODEM_MODE_2G, MM_MODEM_MODE_2G};
|
||||||
|
ModemManager::CurrentModesType supportedMode3 = {MM_MODEM_MODE_4G & MM_MODEM_MODE_3G & MM_MODEM_MODE_2G, MM_MODEM_MODE_3G};
|
||||||
|
supportedModes << supportedMode1 << supportedMode2 << supportedMode3;
|
||||||
|
modem->setSupportedModes(supportedModes);
|
||||||
|
modem->setUnlockRequired(1);
|
||||||
|
modem->setUnlockRetries({{MM_MODEM_LOCK_SIM_PIN, 3}, {MM_MODEM_LOCK_SIM_PIN2, 3}, {MM_MODEM_LOCK_SIM_PUK, 10}, {MM_MODEM_LOCK_SIM_PUK2, 10}});
|
||||||
|
|
||||||
|
QSignalSpy addModemSpy(ModemManager::notifier(), SIGNAL(modemAdded(QString)));
|
||||||
|
fakeModem->addModem(modem);
|
||||||
|
QVERIFY(addModemSpy.wait());
|
||||||
|
|
||||||
|
bearer = new Bearer();
|
||||||
|
// We need to set some default values
|
||||||
|
bearer->setConnected(false);
|
||||||
|
bearer->setInterface(QLatin1String("ttyUSB0"));
|
||||||
|
bearer->setIp4Config({{QLatin1String("method"), MM_BEARER_IP_METHOD_PPP}});
|
||||||
|
bearer->setIp6Config({{QLatin1String("method"), MM_BEARER_IP_METHOD_UNKNOWN}});
|
||||||
|
bearer->setIpTimeout(20);
|
||||||
|
bearer->setProperties({{QLatin1String("apn"), QLatin1String("internet")}, {QLatin1String("ip-type"), 1}, {QLatin1String("number"), QLatin1String("*99#")}});
|
||||||
|
bearer->setSuspended(false);
|
||||||
|
#if MM_CHECK_VERSION(1, 2, 0)
|
||||||
|
ModemManager::Modem::Ptr modemInterface = ModemManager::modemDevices().first()->modemInterface();
|
||||||
|
QCOMPARE(modemInterface->listBearers().count(), 0);
|
||||||
|
QSignalSpy bearerAddedSpy(modemInterface.data(), SIGNAL(bearerAdded(QString)));
|
||||||
|
fakeModem->addBearer(bearer);
|
||||||
|
QVERIFY(bearerAddedSpy.wait());
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
#if MM_CHECK_VERSION(1, 2, 0)
|
||||||
|
void BearerPropertiesTest::testBearerProperties()
|
||||||
|
{
|
||||||
|
ModemManager::Modem::Ptr modemInterface = ModemManager::modemDevices().first()->modemInterface();
|
||||||
|
ModemManager::Bearer::Ptr modemBearer = modemInterface->listBearers().first();
|
||||||
|
|
||||||
|
bearer->setConnected(true);
|
||||||
|
QSignalSpy connectedChangedSpy(modemBearer.data(), SIGNAL(connectedChanged(bool)));
|
||||||
|
QVERIFY(connectedChangedSpy.wait());
|
||||||
|
QCOMPARE(modemBearer->isConnected(), connectedChangedSpy.at(0).at(0).toBool());
|
||||||
|
|
||||||
|
bearer->setInterface(QLatin1String("ttyUSB1"));
|
||||||
|
QSignalSpy interfaceChangedSpy(modemBearer.data(), SIGNAL(interfaceChanged(QString)));
|
||||||
|
QVERIFY(interfaceChangedSpy.wait());
|
||||||
|
QCOMPARE(modemBearer->interface(), interfaceChangedSpy.at(0).at(0).toString());
|
||||||
|
|
||||||
|
bearer->setIp4Config({{QLatin1String("method"), MM_BEARER_IP_METHOD_UNKNOWN}});
|
||||||
|
QSignalSpy ip4ConfigChangedSpy(modemBearer.data(), SIGNAL(ip4ConfigChanged(ModemManager::IpConfig)));
|
||||||
|
QVERIFY(ip4ConfigChangedSpy.wait());
|
||||||
|
QCOMPARE(modemBearer->ip4Config().method(), ip4ConfigChangedSpy.at(0).at(0).value<ModemManager::IpConfig>().method());
|
||||||
|
|
||||||
|
bearer->setIp6Config({{QLatin1String("method"), MM_BEARER_IP_METHOD_PPP}});
|
||||||
|
QSignalSpy ip6ConfigChangedSpy(modemBearer.data(), SIGNAL(ip6ConfigChanged(ModemManager::IpConfig)));
|
||||||
|
QVERIFY(ip6ConfigChangedSpy.wait());
|
||||||
|
QCOMPARE(modemBearer->ip6Config().method(), ip6ConfigChangedSpy.at(0).at(0).value<ModemManager::IpConfig>().method());
|
||||||
|
|
||||||
|
bearer->setIpTimeout(25);
|
||||||
|
QSignalSpy ipTimeoutChangedSpy(modemBearer.data(), SIGNAL(ipTimeoutChanged(uint)));
|
||||||
|
QVERIFY(ipTimeoutChangedSpy.wait());
|
||||||
|
QCOMPARE(modemBearer->ipTimeout(), ipTimeoutChangedSpy.at(0).at(0).toUInt());
|
||||||
|
|
||||||
|
bearer->setProperties(
|
||||||
|
{{QLatin1String("apn"), QLatin1String("internet2")}, {QLatin1String("ip-type"), 2}, {QLatin1String("number"), QLatin1String("*98#")}});
|
||||||
|
QSignalSpy propertiesChangedSpy(modemBearer.data(), SIGNAL(propertiesChanged(QVariantMap)));
|
||||||
|
QVERIFY(propertiesChangedSpy.wait());
|
||||||
|
QVERIFY(modemBearer->properties().contains(QLatin1String("apn")));
|
||||||
|
QVERIFY(modemBearer->properties().contains(QLatin1String("number")));
|
||||||
|
QVERIFY(modemBearer->properties().contains(QLatin1String("ip-type")));
|
||||||
|
QCOMPARE(modemBearer->properties().value(QLatin1String("apn")).toString(), QLatin1String("internet2"));
|
||||||
|
QCOMPARE(modemBearer->properties().value(QLatin1String("ip-type")).toUInt(), (uint)2);
|
||||||
|
QCOMPARE(modemBearer->properties().value(QLatin1String("number")).toString(), QLatin1String("*98#"));
|
||||||
|
|
||||||
|
bearer->setSuspended(true);
|
||||||
|
QSignalSpy suspendedChangedSpy(modemBearer.data(), SIGNAL(suspendedChanged(bool)));
|
||||||
|
QVERIFY(suspendedChangedSpy.wait());
|
||||||
|
QCOMPARE(modemBearer->isSuspended(), suspendedChangedSpy.at(0).at(0).toBool());
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
QTEST_MAIN(BearerPropertiesTest)
|
|
@ -0,0 +1,30 @@
|
||||||
|
/*
|
||||||
|
SPDX-FileCopyrightText: 2015 Jan Grulich <jgrulich@redhat.com>
|
||||||
|
|
||||||
|
SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef MODEMMANAGERQT_BEARER_PROPERTIES_TEST_H
|
||||||
|
#define MODEMMANAGERQT_BEARER_PROPERTIES_TEST_H
|
||||||
|
|
||||||
|
#include <QObject>
|
||||||
|
|
||||||
|
#include "fakemodem/fakemodem.h"
|
||||||
|
|
||||||
|
class BearerPropertiesTest : public QObject
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
private Q_SLOTS:
|
||||||
|
void initTestCase();
|
||||||
|
#if MM_CHECK_VERSION(1, 2, 0)
|
||||||
|
void testBearerProperties();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
private:
|
||||||
|
Bearer *bearer;
|
||||||
|
FakeModem *fakeModem;
|
||||||
|
Modem *modem;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // MODEMMANAGERQT_BEARER_PROPERTIES_TEST_H
|
|
@ -0,0 +1,128 @@
|
||||||
|
/*
|
||||||
|
SPDX-FileCopyrightText: 2015 Jan Grulich <jgrulich@redhat.com>
|
||||||
|
|
||||||
|
SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "modem3gpppropertiestest.h"
|
||||||
|
|
||||||
|
#include "dbus/fakedbus.h"
|
||||||
|
#include "generictypes.h"
|
||||||
|
#include "manager.h"
|
||||||
|
#include "modem.h"
|
||||||
|
#include "modem3gpp.h"
|
||||||
|
|
||||||
|
#include "fakemodem/modem.h"
|
||||||
|
|
||||||
|
#include <QSignalSpy>
|
||||||
|
#include <QTest>
|
||||||
|
|
||||||
|
void Modem3gppPropertiesTest::initTestCase()
|
||||||
|
{
|
||||||
|
fakeModem = new FakeModem();
|
||||||
|
|
||||||
|
modem = new Modem();
|
||||||
|
modem->setAccessTechnologies(16);
|
||||||
|
modem->SetCurrentBands({0});
|
||||||
|
modem->SetCurrentCapabilities(4);
|
||||||
|
modem->SetCurrentModes({MM_MODEM_MODE_ANY, MM_MODEM_MODE_NONE});
|
||||||
|
modem->setDevice(QLatin1String("/sys/devices/pci0000:00/0000:00:1d.0/usb4/4-1/4-1.2"));
|
||||||
|
modem->setDeviceIdentifier(QLatin1String("1c435eb6d74494b5f78d7221e2c5ae9ec526a981"));
|
||||||
|
modem->setDrivers({QLatin1String("option1")});
|
||||||
|
modem->setEquipmentIdentifier(QLatin1String("353475021085110"));
|
||||||
|
modem->setManufacturer(QLatin1String("huawei"));
|
||||||
|
modem->setMaxActiveBearers(1);
|
||||||
|
modem->setMaxBearers(1);
|
||||||
|
modem->setModel(QLatin1String("K2540"));
|
||||||
|
// modem->setOwnNumbers();
|
||||||
|
modem->setPlugin(QLatin1String("Huawei"));
|
||||||
|
modem->setPorts({{QLatin1String("ttyUSB0"), MM_MODEM_PORT_TYPE_AT},
|
||||||
|
{QLatin1String("ttyUSB1"), MM_MODEM_PORT_TYPE_QCDM},
|
||||||
|
{QLatin1String("ttyUSB2"), MM_MODEM_PORT_TYPE_AT}});
|
||||||
|
modem->SetPowerState(3);
|
||||||
|
modem->setPrimaryPort(QLatin1String("ttyUSB2"));
|
||||||
|
modem->setRevision(QLatin1String("11.001.05.00.11"));
|
||||||
|
modem->setSignalQuality({93, true});
|
||||||
|
modem->setSim(QDBusObjectPath("/org/kde/fakemodem/SIM/1"));
|
||||||
|
modem->setState(8);
|
||||||
|
modem->setStateFailedReason(0);
|
||||||
|
modem->setSupportedBands({0});
|
||||||
|
modem->setSupportedCapabilities({4});
|
||||||
|
modem->setSupportedIpFamilies(3);
|
||||||
|
ModemManager::SupportedModesType supportedModes;
|
||||||
|
ModemManager::CurrentModesType supportedMode1 = {MM_MODEM_MODE_4G & MM_MODEM_MODE_3G & MM_MODEM_MODE_2G, MM_MODEM_MODE_NONE};
|
||||||
|
ModemManager::CurrentModesType supportedMode2 = {MM_MODEM_MODE_4G & MM_MODEM_MODE_3G & MM_MODEM_MODE_2G, MM_MODEM_MODE_2G};
|
||||||
|
ModemManager::CurrentModesType supportedMode3 = {MM_MODEM_MODE_4G & MM_MODEM_MODE_3G & MM_MODEM_MODE_2G, MM_MODEM_MODE_3G};
|
||||||
|
supportedModes << supportedMode1 << supportedMode2 << supportedMode3;
|
||||||
|
modem->setSupportedModes(supportedModes);
|
||||||
|
modem->setUnlockRequired(1);
|
||||||
|
modem->setUnlockRetries({{MM_MODEM_LOCK_SIM_PIN, 3}, {MM_MODEM_LOCK_SIM_PIN2, 3}, {MM_MODEM_LOCK_SIM_PUK, 10}, {MM_MODEM_LOCK_SIM_PUK2, 10}});
|
||||||
|
|
||||||
|
QSignalSpy addModemSpy(ModemManager::notifier(), SIGNAL(modemAdded(QString)));
|
||||||
|
fakeModem->addModem(modem);
|
||||||
|
QVERIFY(addModemSpy.wait());
|
||||||
|
|
||||||
|
modem3gpp = new Modem3gpp(modem);
|
||||||
|
modem3gpp->setModemPath(modem->modemPath());
|
||||||
|
modem3gpp->setEnabledFacilityLocks(MM_MODEM_3GPP_FACILITY_NONE);
|
||||||
|
modem3gpp->setImei(QLatin1String("IMEI"));
|
||||||
|
modem3gpp->setOperatorCode(QLatin1String("31026"));
|
||||||
|
modem3gpp->setOperatorName(QLatin1String("op-name"));
|
||||||
|
modem3gpp->setRegistrationState(MM_MODEM_3GPP_REGISTRATION_STATE_HOME);
|
||||||
|
#if MM_CHECK_VERSION(1, 2, 0)
|
||||||
|
modem3gpp->setSubscriptionState(MM_MODEM_3GPP_SUBSCRIPTION_STATE_UNKNOWN);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
ModemManager::MMVariantMapMap interfaces;
|
||||||
|
interfaces.insert(QLatin1String(MMQT_DBUS_INTERFACE_MODEM_MODEM3GPP), modem3gpp->toMap());
|
||||||
|
fakeModem->addInterfaces(QDBusObjectPath(modem->modemPath()), interfaces);
|
||||||
|
modem3gpp->setEnableNotifications(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Modem3gppPropertiesTest::testModem3gppProperties()
|
||||||
|
{
|
||||||
|
ModemManager::ModemDevice::Ptr modemDevice = ModemManager::modemDevices().first();
|
||||||
|
QVERIFY(modemDevice);
|
||||||
|
QVERIFY(modemDevice->hasInterface(ModemManager::ModemDevice::GsmInterface));
|
||||||
|
ModemManager::Modem3gpp::Ptr modem3gppInterface = modemDevice->interface(ModemManager::ModemDevice::GsmInterface).objectCast<ModemManager::Modem3gpp>();
|
||||||
|
QVERIFY(modem3gppInterface);
|
||||||
|
|
||||||
|
modem3gpp->setEnabledFacilityLocks(MM_MODEM_3GPP_FACILITY_SIM);
|
||||||
|
QSignalSpy enabledFacilityLocksChangedSpy(modem3gppInterface.data(), SIGNAL(enabledFacilityLocksChanged(QFlags<MMModem3gppFacility>)));
|
||||||
|
QVERIFY(enabledFacilityLocksChangedSpy.wait());
|
||||||
|
QCOMPARE(modem3gppInterface->enabledFacilityLocks(), enabledFacilityLocksChangedSpy.at(0).at(0).value<QFlags<MMModem3gppFacility>>());
|
||||||
|
|
||||||
|
modem3gpp->setImei(QLatin1String("IMEI2"));
|
||||||
|
QSignalSpy imeiChangedSpy(modem3gppInterface.data(), SIGNAL(imeiChanged(QString)));
|
||||||
|
QVERIFY(imeiChangedSpy.wait());
|
||||||
|
QCOMPARE(modem3gppInterface->imei(), imeiChangedSpy.at(0).at(0).toString());
|
||||||
|
|
||||||
|
modem3gpp->setOperatorCode(QLatin1String("21025"));
|
||||||
|
QSignalSpy operatorCodeChangedSpy(modem3gppInterface.data(), SIGNAL(operatorCodeChanged(QString)));
|
||||||
|
QVERIFY(operatorCodeChangedSpy.wait());
|
||||||
|
QCOMPARE(modem3gppInterface->operatorCode(), operatorCodeChangedSpy.at(0).at(0).toString());
|
||||||
|
|
||||||
|
modem3gpp->setOperatorCode(QLatin1String("25011"));
|
||||||
|
QSignalSpy countryCodeChangedSpy(modem3gppInterface.data(), SIGNAL(countryCodeChanged(QString)));
|
||||||
|
QVERIFY(countryCodeChangedSpy.wait());
|
||||||
|
QCOMPARE(modem3gppInterface->countryCode(), countryCodeChangedSpy.at(0).at(0).toString());
|
||||||
|
|
||||||
|
modem3gpp->setOperatorName(QLatin1String("op-name2"));
|
||||||
|
QSignalSpy operatorNameChangedSpy(modem3gppInterface.data(), SIGNAL(operatorNameChanged(QString)));
|
||||||
|
QVERIFY(operatorNameChangedSpy.wait());
|
||||||
|
QCOMPARE(modem3gppInterface->operatorName(), operatorNameChangedSpy.at(0).at(0).toString());
|
||||||
|
|
||||||
|
modem3gpp->setRegistrationState(MM_MODEM_3GPP_REGISTRATION_STATE_IDLE);
|
||||||
|
QSignalSpy registrationStateChangedSpy(modem3gppInterface.data(), SIGNAL(registrationStateChanged(MMModem3gppRegistrationState)));
|
||||||
|
QVERIFY(registrationStateChangedSpy.wait());
|
||||||
|
QCOMPARE(modem3gppInterface->registrationState(), registrationStateChangedSpy.at(0).at(0).value<MMModem3gppRegistrationState>());
|
||||||
|
|
||||||
|
#if MM_CHECK_VERSION(1, 2, 0)
|
||||||
|
modem3gpp->setSubscriptionState(MM_MODEM_3GPP_SUBSCRIPTION_STATE_PROVISIONED);
|
||||||
|
QSignalSpy subscriptionStateChangedSpy(modem3gppInterface.data(), SIGNAL(subscriptionStateChanged(MMModem3gppSubscriptionState)));
|
||||||
|
QVERIFY(subscriptionStateChangedSpy.wait());
|
||||||
|
QCOMPARE(modem3gppInterface->subscriptionState(), subscriptionStateChangedSpy.at(0).at(0).value<MMModem3gppSubscriptionState>());
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
QTEST_MAIN(Modem3gppPropertiesTest)
|
|
@ -0,0 +1,29 @@
|
||||||
|
/*
|
||||||
|
SPDX-FileCopyrightText: 2015 Jan Grulich <jgrulich@redhat.com>
|
||||||
|
|
||||||
|
SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef MODEMMANAGERQT_MODEM3GPP_PROPERTIES_TEST_H
|
||||||
|
#define MODEMMANAGERQT_MODEM3GPP_PROPERTIES_TEST_H
|
||||||
|
|
||||||
|
#include <QObject>
|
||||||
|
|
||||||
|
#include "fakemodem/fakemodem.h"
|
||||||
|
#include "fakemodem/modem3gpp.h"
|
||||||
|
|
||||||
|
class Modem3gppPropertiesTest : public QObject
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
private Q_SLOTS:
|
||||||
|
void initTestCase();
|
||||||
|
void testModem3gppProperties();
|
||||||
|
|
||||||
|
private:
|
||||||
|
FakeModem *fakeModem;
|
||||||
|
Modem *modem;
|
||||||
|
Modem3gpp *modem3gpp;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // MODEMMANAGERQT_MODEM3GPP_PROPERTIES_TEST_H
|
|
@ -0,0 +1,102 @@
|
||||||
|
/*
|
||||||
|
SPDX-FileCopyrightText: 2015 Jan Grulich <jgrulich@redhat.com>
|
||||||
|
|
||||||
|
SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "modem3gppussdpropertiestest.h"
|
||||||
|
|
||||||
|
#include "dbus/fakedbus.h"
|
||||||
|
#include "generictypes.h"
|
||||||
|
#include "manager.h"
|
||||||
|
#include "modem.h"
|
||||||
|
#include "modem3gppussd.h"
|
||||||
|
|
||||||
|
#include "fakemodem/modem.h"
|
||||||
|
|
||||||
|
#include <QSignalSpy>
|
||||||
|
#include <QTest>
|
||||||
|
|
||||||
|
void Modem3gppUssdPropertiesTest::initTestCase()
|
||||||
|
{
|
||||||
|
fakeModem = new FakeModem();
|
||||||
|
|
||||||
|
modem = new Modem();
|
||||||
|
modem->setAccessTechnologies(16);
|
||||||
|
modem->SetCurrentBands({0});
|
||||||
|
modem->SetCurrentCapabilities(4);
|
||||||
|
modem->SetCurrentModes({MM_MODEM_MODE_ANY, MM_MODEM_MODE_NONE});
|
||||||
|
modem->setDevice(QLatin1String("/sys/devices/pci0000:00/0000:00:1d.0/usb4/4-1/4-1.2"));
|
||||||
|
modem->setDeviceIdentifier(QLatin1String("1c435eb6d74494b5f78d7221e2c5ae9ec526a981"));
|
||||||
|
modem->setDrivers({QLatin1String("option1")});
|
||||||
|
modem->setEquipmentIdentifier(QLatin1String("353475021085110"));
|
||||||
|
modem->setManufacturer(QLatin1String("huawei"));
|
||||||
|
modem->setMaxActiveBearers(1);
|
||||||
|
modem->setMaxBearers(1);
|
||||||
|
modem->setModel(QLatin1String("K2540"));
|
||||||
|
// modem->setOwnNumbers();
|
||||||
|
modem->setPlugin(QLatin1String("Huawei"));
|
||||||
|
modem->setPorts({{QLatin1String("ttyUSB0"), MM_MODEM_PORT_TYPE_AT},
|
||||||
|
{QLatin1String("ttyUSB1"), MM_MODEM_PORT_TYPE_QCDM},
|
||||||
|
{QLatin1String("ttyUSB2"), MM_MODEM_PORT_TYPE_AT}});
|
||||||
|
modem->SetPowerState(3);
|
||||||
|
modem->setPrimaryPort(QLatin1String("ttyUSB2"));
|
||||||
|
modem->setRevision(QLatin1String("11.001.05.00.11"));
|
||||||
|
modem->setSignalQuality({93, true});
|
||||||
|
modem->setSim(QDBusObjectPath("/org/kde/fakemodem/SIM/1"));
|
||||||
|
modem->setState(8);
|
||||||
|
modem->setStateFailedReason(0);
|
||||||
|
modem->setSupportedBands({0});
|
||||||
|
modem->setSupportedCapabilities({4});
|
||||||
|
modem->setSupportedIpFamilies(3);
|
||||||
|
ModemManager::SupportedModesType supportedModes;
|
||||||
|
ModemManager::CurrentModesType supportedMode1 = {MM_MODEM_MODE_4G & MM_MODEM_MODE_3G & MM_MODEM_MODE_2G, MM_MODEM_MODE_NONE};
|
||||||
|
ModemManager::CurrentModesType supportedMode2 = {MM_MODEM_MODE_4G & MM_MODEM_MODE_3G & MM_MODEM_MODE_2G, MM_MODEM_MODE_2G};
|
||||||
|
ModemManager::CurrentModesType supportedMode3 = {MM_MODEM_MODE_4G & MM_MODEM_MODE_3G & MM_MODEM_MODE_2G, MM_MODEM_MODE_3G};
|
||||||
|
supportedModes << supportedMode1 << supportedMode2 << supportedMode3;
|
||||||
|
modem->setSupportedModes(supportedModes);
|
||||||
|
modem->setUnlockRequired(1);
|
||||||
|
modem->setUnlockRetries({{MM_MODEM_LOCK_SIM_PIN, 3}, {MM_MODEM_LOCK_SIM_PIN2, 3}, {MM_MODEM_LOCK_SIM_PUK, 10}, {MM_MODEM_LOCK_SIM_PUK2, 10}});
|
||||||
|
|
||||||
|
QSignalSpy addModemSpy(ModemManager::notifier(), SIGNAL(modemAdded(QString)));
|
||||||
|
fakeModem->addModem(modem);
|
||||||
|
QVERIFY(addModemSpy.wait());
|
||||||
|
|
||||||
|
modem3gppUssd = new Modem3gppUssd(modem);
|
||||||
|
modem3gppUssd->setModemPath(modem->modemPath());
|
||||||
|
modem3gppUssd->setNetworkNotification(QLatin1String("notification"));
|
||||||
|
modem3gppUssd->setNetworkRequest(QLatin1String("request"));
|
||||||
|
modem3gppUssd->setState(MM_MODEM_3GPP_USSD_SESSION_STATE_UNKNOWN);
|
||||||
|
|
||||||
|
ModemManager::MMVariantMapMap interfaces;
|
||||||
|
interfaces.insert(QLatin1String(MMQT_DBUS_INTERFACE_MODEM_MODEM3GPP_USSD), modem3gppUssd->toMap());
|
||||||
|
fakeModem->addInterfaces(QDBusObjectPath(modem->modemPath()), interfaces);
|
||||||
|
modem3gppUssd->setEnableNotifications(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Modem3gppUssdPropertiesTest::testModem3gppUssdProperties()
|
||||||
|
{
|
||||||
|
ModemManager::ModemDevice::Ptr modemDevice = ModemManager::modemDevices().first();
|
||||||
|
QVERIFY(modemDevice);
|
||||||
|
QVERIFY(modemDevice->hasInterface(ModemManager::ModemDevice::GsmUssdInterface));
|
||||||
|
ModemManager::Modem3gppUssd::Ptr modem3gppUssdInterface =
|
||||||
|
modemDevice->interface(ModemManager::ModemDevice::GsmUssdInterface).objectCast<ModemManager::Modem3gppUssd>();
|
||||||
|
QVERIFY(modem3gppUssdInterface);
|
||||||
|
|
||||||
|
modem3gppUssd->setNetworkNotification(QLatin1String("notification1"));
|
||||||
|
QSignalSpy networkNotificationChangedSpy(modem3gppUssdInterface.data(), SIGNAL(networkNotificationChanged(QString)));
|
||||||
|
QVERIFY(networkNotificationChangedSpy.wait());
|
||||||
|
QCOMPARE(modem3gppUssdInterface->networkNotification(), networkNotificationChangedSpy.at(0).at(0).toString());
|
||||||
|
|
||||||
|
modem3gppUssd->setNetworkRequest(QLatin1String("notification1"));
|
||||||
|
QSignalSpy networkRequestChangedSpy(modem3gppUssdInterface.data(), SIGNAL(networkRequestChanged(QString)));
|
||||||
|
QVERIFY(networkRequestChangedSpy.wait());
|
||||||
|
QCOMPARE(modem3gppUssdInterface->networkRequest(), networkRequestChangedSpy.at(0).at(0).toString());
|
||||||
|
|
||||||
|
modem3gppUssd->setState(MM_MODEM_3GPP_USSD_SESSION_STATE_IDLE);
|
||||||
|
QSignalSpy stateChangedSpy(modem3gppUssdInterface.data(), SIGNAL(stateChanged(MMModem3gppUssdSessionState)));
|
||||||
|
QVERIFY(stateChangedSpy.wait());
|
||||||
|
QCOMPARE(modem3gppUssdInterface->state(), stateChangedSpy.at(0).at(0).value<MMModem3gppUssdSessionState>());
|
||||||
|
}
|
||||||
|
|
||||||
|
QTEST_MAIN(Modem3gppUssdPropertiesTest)
|
|
@ -0,0 +1,29 @@
|
||||||
|
/*
|
||||||
|
SPDX-FileCopyrightText: 2015 Jan Grulich <jgrulich@redhat.com>
|
||||||
|
|
||||||
|
SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef MODEMMANAGERQT_MODEM3GPP_USSD_PROPERTIES_TEST_H
|
||||||
|
#define MODEMMANAGERQT_MODEM3GPP_USSD_PROPERTIES_TEST_H
|
||||||
|
|
||||||
|
#include <QObject>
|
||||||
|
|
||||||
|
#include "fakemodem/fakemodem.h"
|
||||||
|
#include "fakemodem/modem3gppussd.h"
|
||||||
|
|
||||||
|
class Modem3gppUssdPropertiesTest : public QObject
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
private Q_SLOTS:
|
||||||
|
void initTestCase();
|
||||||
|
void testModem3gppUssdProperties();
|
||||||
|
|
||||||
|
private:
|
||||||
|
FakeModem *fakeModem;
|
||||||
|
Modem *modem;
|
||||||
|
Modem3gppUssd *modem3gppUssd;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // MODEMMANAGERQT_MODEM3GPP_USSD_PROPERTIES_TEST_H
|
|
@ -0,0 +1,125 @@
|
||||||
|
/*
|
||||||
|
SPDX-FileCopyrightText: 2015 Jan Grulich <jgrulich@redhat.com>
|
||||||
|
|
||||||
|
SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "modemcdmapropertiestest.h"
|
||||||
|
|
||||||
|
#include "dbus/fakedbus.h"
|
||||||
|
#include "generictypes.h"
|
||||||
|
#include "manager.h"
|
||||||
|
#include "modem.h"
|
||||||
|
#include "modemcdma.h"
|
||||||
|
|
||||||
|
#include "fakemodem/modem.h"
|
||||||
|
|
||||||
|
#include <QSignalSpy>
|
||||||
|
#include <QTest>
|
||||||
|
|
||||||
|
void ModemCdmaPropertiesTest::initTestCase()
|
||||||
|
{
|
||||||
|
fakeModem = new FakeModem();
|
||||||
|
|
||||||
|
modem = new Modem();
|
||||||
|
modem->setAccessTechnologies(16);
|
||||||
|
modem->SetCurrentBands({0});
|
||||||
|
modem->SetCurrentCapabilities(4);
|
||||||
|
modem->SetCurrentModes({MM_MODEM_MODE_ANY, MM_MODEM_MODE_NONE});
|
||||||
|
modem->setDevice(QLatin1String("/sys/devices/pci0000:00/0000:00:1d.0/usb4/4-1/4-1.2"));
|
||||||
|
modem->setDeviceIdentifier(QLatin1String("1c435eb6d74494b5f78d7221e2c5ae9ec526a981"));
|
||||||
|
modem->setDrivers({QLatin1String("option1")});
|
||||||
|
modem->setEquipmentIdentifier(QLatin1String("353475021085110"));
|
||||||
|
modem->setManufacturer(QLatin1String("huawei"));
|
||||||
|
modem->setMaxActiveBearers(1);
|
||||||
|
modem->setMaxBearers(1);
|
||||||
|
modem->setModel(QLatin1String("K2540"));
|
||||||
|
// modem->setOwnNumbers();
|
||||||
|
modem->setPlugin(QLatin1String("Huawei"));
|
||||||
|
modem->setPorts({{QLatin1String("ttyUSB0"), MM_MODEM_PORT_TYPE_AT},
|
||||||
|
{QLatin1String("ttyUSB1"), MM_MODEM_PORT_TYPE_QCDM},
|
||||||
|
{QLatin1String("ttyUSB2"), MM_MODEM_PORT_TYPE_AT}});
|
||||||
|
modem->SetPowerState(3);
|
||||||
|
modem->setPrimaryPort(QLatin1String("ttyUSB2"));
|
||||||
|
modem->setRevision(QLatin1String("11.001.05.00.11"));
|
||||||
|
modem->setSignalQuality({93, true});
|
||||||
|
modem->setSim(QDBusObjectPath("/org/kde/fakemodem/SIM/1"));
|
||||||
|
modem->setState(8);
|
||||||
|
modem->setStateFailedReason(0);
|
||||||
|
modem->setSupportedBands({0});
|
||||||
|
modem->setSupportedCapabilities({4});
|
||||||
|
modem->setSupportedIpFamilies(3);
|
||||||
|
ModemManager::SupportedModesType supportedModes;
|
||||||
|
ModemManager::CurrentModesType supportedMode1 = {MM_MODEM_MODE_4G & MM_MODEM_MODE_3G & MM_MODEM_MODE_2G, MM_MODEM_MODE_NONE};
|
||||||
|
ModemManager::CurrentModesType supportedMode2 = {MM_MODEM_MODE_4G & MM_MODEM_MODE_3G & MM_MODEM_MODE_2G, MM_MODEM_MODE_2G};
|
||||||
|
ModemManager::CurrentModesType supportedMode3 = {MM_MODEM_MODE_4G & MM_MODEM_MODE_3G & MM_MODEM_MODE_2G, MM_MODEM_MODE_3G};
|
||||||
|
supportedModes << supportedMode1 << supportedMode2 << supportedMode3;
|
||||||
|
modem->setSupportedModes(supportedModes);
|
||||||
|
modem->setUnlockRequired(1);
|
||||||
|
modem->setUnlockRetries({{MM_MODEM_LOCK_SIM_PIN, 3}, {MM_MODEM_LOCK_SIM_PIN2, 3}, {MM_MODEM_LOCK_SIM_PUK, 10}, {MM_MODEM_LOCK_SIM_PUK2, 10}});
|
||||||
|
|
||||||
|
QSignalSpy addModemSpy(ModemManager::notifier(), SIGNAL(modemAdded(QString)));
|
||||||
|
fakeModem->addModem(modem);
|
||||||
|
QVERIFY(addModemSpy.wait());
|
||||||
|
|
||||||
|
modemCdma = new ModemCdma(modem);
|
||||||
|
modemCdma->setModemPath(modem->modemPath());
|
||||||
|
modemCdma->setActivationState(MM_MODEM_CDMA_ACTIVATION_STATE_ACTIVATING);
|
||||||
|
modemCdma->setCdma1xRegistrationState(MM_MODEM_CDMA_REGISTRATION_STATE_REGISTERED);
|
||||||
|
modemCdma->setEsn(QLatin1String("esn"));
|
||||||
|
modemCdma->setEvdoRegistrationState(MM_MODEM_CDMA_REGISTRATION_STATE_HOME);
|
||||||
|
modemCdma->setMeid(QLatin1String("meid"));
|
||||||
|
modemCdma->setNid(5);
|
||||||
|
modemCdma->setSid(10);
|
||||||
|
|
||||||
|
ModemManager::MMVariantMapMap interfaces;
|
||||||
|
interfaces.insert(QLatin1String(MMQT_DBUS_INTERFACE_MODEM_MODEMCDMA), modemCdma->toMap());
|
||||||
|
fakeModem->addInterfaces(QDBusObjectPath(modem->modemPath()), interfaces);
|
||||||
|
modemCdma->setEnableNotifications(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ModemCdmaPropertiesTest::testModemCdmaProperties()
|
||||||
|
{
|
||||||
|
ModemManager::ModemDevice::Ptr modemDevice = ModemManager::modemDevices().first();
|
||||||
|
QVERIFY(modemDevice);
|
||||||
|
QVERIFY(modemDevice->hasInterface(ModemManager::ModemDevice::CdmaInterface));
|
||||||
|
ModemManager::ModemCdma::Ptr modemCdmaInterface = modemDevice->interface(ModemManager::ModemDevice::CdmaInterface).objectCast<ModemManager::ModemCdma>();
|
||||||
|
QVERIFY(modemCdmaInterface);
|
||||||
|
|
||||||
|
modemCdma->setActivationState(MM_MODEM_CDMA_ACTIVATION_STATE_NOT_ACTIVATED);
|
||||||
|
QSignalSpy activationChangedSpy(modemCdmaInterface.data(), SIGNAL(activationStateChanged(MMModemCdmaActivationState, MMCdmaActivationError, QVariantMap)));
|
||||||
|
QVERIFY(activationChangedSpy.wait());
|
||||||
|
QCOMPARE(modemCdmaInterface->activationState(), activationChangedSpy.at(0).at(0).value<MMModemCdmaActivationState>());
|
||||||
|
|
||||||
|
modemCdma->setCdma1xRegistrationState(MM_MODEM_CDMA_REGISTRATION_STATE_HOME);
|
||||||
|
QSignalSpy cdma1xRegistrationStateChangedSpy(modemCdmaInterface.data(), SIGNAL(cdma1xRegistrationStateChanged(MMModemCdmaRegistrationState)));
|
||||||
|
QVERIFY(cdma1xRegistrationStateChangedSpy.wait());
|
||||||
|
QCOMPARE(modemCdmaInterface->cdma1xRegistrationState(), cdma1xRegistrationStateChangedSpy.at(0).at(0).value<MMModemCdmaRegistrationState>());
|
||||||
|
|
||||||
|
modemCdma->setEsn(QLatin1String("esn1"));
|
||||||
|
QSignalSpy esnChangedSpy(modemCdmaInterface.data(), SIGNAL(esnChanged(QString)));
|
||||||
|
QVERIFY(esnChangedSpy.wait());
|
||||||
|
QCOMPARE(modemCdmaInterface->esn(), esnChangedSpy.at(0).at(0).toString());
|
||||||
|
|
||||||
|
modemCdma->setEvdoRegistrationState(MM_MODEM_CDMA_REGISTRATION_STATE_REGISTERED);
|
||||||
|
QSignalSpy evdoRegistrationStateChangedSpy(modemCdmaInterface.data(), SIGNAL(evdoRegistrationStateChanged(MMModemCdmaRegistrationState)));
|
||||||
|
QVERIFY(evdoRegistrationStateChangedSpy.wait());
|
||||||
|
QCOMPARE(modemCdmaInterface->evdoRegistrationState(), evdoRegistrationStateChangedSpy.at(0).at(0).value<MMModemCdmaRegistrationState>());
|
||||||
|
|
||||||
|
modemCdma->setMeid(QLatin1String("meid1"));
|
||||||
|
QSignalSpy meidChangedSpy(modemCdmaInterface.data(), SIGNAL(meidChanged(QString)));
|
||||||
|
QVERIFY(meidChangedSpy.wait());
|
||||||
|
QCOMPARE(modemCdmaInterface->meid(), meidChangedSpy.at(0).at(0).toString());
|
||||||
|
|
||||||
|
modemCdma->setNid(10);
|
||||||
|
QSignalSpy nidChangedSpy(modemCdmaInterface.data(), SIGNAL(nidChanged(uint)));
|
||||||
|
QVERIFY(nidChangedSpy.wait());
|
||||||
|
QCOMPARE(modemCdmaInterface->nid(), nidChangedSpy.at(0).at(0).toUInt());
|
||||||
|
|
||||||
|
modemCdma->setSid(5);
|
||||||
|
QSignalSpy sidChangedSpy(modemCdmaInterface.data(), SIGNAL(sidChanged(uint)));
|
||||||
|
QVERIFY(sidChangedSpy.wait());
|
||||||
|
QCOMPARE(modemCdmaInterface->sid(), sidChangedSpy.at(0).at(0).toUInt());
|
||||||
|
}
|
||||||
|
|
||||||
|
QTEST_MAIN(ModemCdmaPropertiesTest)
|
|
@ -0,0 +1,29 @@
|
||||||
|
/*
|
||||||
|
SPDX-FileCopyrightText: 2015 Jan Grulich <jgrulich@redhat.com>
|
||||||
|
|
||||||
|
SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef MODEMMANAGERQT_MODEMCDMA_PROPERTIES_TEST_H
|
||||||
|
#define MODEMMANAGERQT_MODEMCDMA_PROPERTIES_TEST_H
|
||||||
|
|
||||||
|
#include <QObject>
|
||||||
|
|
||||||
|
#include "fakemodem/fakemodem.h"
|
||||||
|
#include "fakemodem/modemcdma.h"
|
||||||
|
|
||||||
|
class ModemCdmaPropertiesTest : public QObject
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
private Q_SLOTS:
|
||||||
|
void initTestCase();
|
||||||
|
void testModemCdmaProperties();
|
||||||
|
|
||||||
|
private:
|
||||||
|
FakeModem *fakeModem;
|
||||||
|
Modem *modem;
|
||||||
|
ModemCdma *modemCdma;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // MODEMMANAGERQT_MODEMCDMA_PROPERTIES_TEST_H
|
|
@ -0,0 +1,113 @@
|
||||||
|
/*
|
||||||
|
SPDX-FileCopyrightText: 2015 Jan Grulich <jgrulich@redhat.com>
|
||||||
|
|
||||||
|
SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "modemlocationpropertiestest.h"
|
||||||
|
|
||||||
|
#include "dbus/fakedbus.h"
|
||||||
|
#include "generictypes.h"
|
||||||
|
#include "manager.h"
|
||||||
|
#include "modem.h"
|
||||||
|
#include "modemlocation.h"
|
||||||
|
|
||||||
|
#include "fakemodem/modem.h"
|
||||||
|
|
||||||
|
#include <QSignalSpy>
|
||||||
|
#include <QTest>
|
||||||
|
|
||||||
|
void ModemLocationPropertiesTest::initTestCase()
|
||||||
|
{
|
||||||
|
fakeModem = new FakeModem();
|
||||||
|
|
||||||
|
modem = new Modem();
|
||||||
|
modem->setAccessTechnologies(16);
|
||||||
|
modem->SetCurrentBands({0});
|
||||||
|
modem->SetCurrentCapabilities(4);
|
||||||
|
modem->SetCurrentModes({MM_MODEM_MODE_ANY, MM_MODEM_MODE_NONE});
|
||||||
|
modem->setDevice(QLatin1String("/sys/devices/pci0000:00/0000:00:1d.0/usb4/4-1/4-1.2"));
|
||||||
|
modem->setDeviceIdentifier(QLatin1String("1c435eb6d74494b5f78d7221e2c5ae9ec526a981"));
|
||||||
|
modem->setDrivers({QLatin1String("option1")});
|
||||||
|
modem->setEquipmentIdentifier(QLatin1String("353475021085110"));
|
||||||
|
modem->setManufacturer(QLatin1String("huawei"));
|
||||||
|
modem->setMaxActiveBearers(1);
|
||||||
|
modem->setMaxBearers(1);
|
||||||
|
modem->setModel(QLatin1String("K2540"));
|
||||||
|
// modem->setOwnNumbers();
|
||||||
|
modem->setPlugin(QLatin1String("Huawei"));
|
||||||
|
modem->setPorts({{QLatin1String("ttyUSB0"), MM_MODEM_PORT_TYPE_AT},
|
||||||
|
{QLatin1String("ttyUSB1"), MM_MODEM_PORT_TYPE_QCDM},
|
||||||
|
{QLatin1String("ttyUSB2"), MM_MODEM_PORT_TYPE_AT}});
|
||||||
|
modem->SetPowerState(3);
|
||||||
|
modem->setPrimaryPort(QLatin1String("ttyUSB2"));
|
||||||
|
modem->setRevision(QLatin1String("11.001.05.00.11"));
|
||||||
|
modem->setSignalQuality({93, true});
|
||||||
|
modem->setSim(QDBusObjectPath("/org/kde/fakemodem/SIM/1"));
|
||||||
|
modem->setState(8);
|
||||||
|
modem->setStateFailedReason(0);
|
||||||
|
modem->setSupportedBands({0});
|
||||||
|
modem->setSupportedCapabilities({4});
|
||||||
|
modem->setSupportedIpFamilies(3);
|
||||||
|
ModemManager::SupportedModesType supportedModes;
|
||||||
|
ModemManager::CurrentModesType supportedMode1 = {MM_MODEM_MODE_4G & MM_MODEM_MODE_3G & MM_MODEM_MODE_2G, MM_MODEM_MODE_NONE};
|
||||||
|
ModemManager::CurrentModesType supportedMode2 = {MM_MODEM_MODE_4G & MM_MODEM_MODE_3G & MM_MODEM_MODE_2G, MM_MODEM_MODE_2G};
|
||||||
|
ModemManager::CurrentModesType supportedMode3 = {MM_MODEM_MODE_4G & MM_MODEM_MODE_3G & MM_MODEM_MODE_2G, MM_MODEM_MODE_3G};
|
||||||
|
supportedModes << supportedMode1 << supportedMode2 << supportedMode3;
|
||||||
|
modem->setSupportedModes(supportedModes);
|
||||||
|
modem->setUnlockRequired(1);
|
||||||
|
modem->setUnlockRetries({{MM_MODEM_LOCK_SIM_PIN, 3}, {MM_MODEM_LOCK_SIM_PIN2, 3}, {MM_MODEM_LOCK_SIM_PUK, 10}, {MM_MODEM_LOCK_SIM_PUK2, 10}});
|
||||||
|
|
||||||
|
QSignalSpy addModemSpy(ModemManager::notifier(), SIGNAL(modemAdded(QString)));
|
||||||
|
fakeModem->addModem(modem);
|
||||||
|
QVERIFY(addModemSpy.wait());
|
||||||
|
|
||||||
|
modemLocation = new ModemLocation(modem);
|
||||||
|
modemLocation->setModemPath(modem->modemPath());
|
||||||
|
modemLocation->setCapabilities(MM_MODEM_LOCATION_SOURCE_3GPP_LAC_CI & MM_MODEM_LOCATION_SOURCE_GPS_RAW);
|
||||||
|
modemLocation->setEnabled(MM_MODEM_LOCATION_SOURCE_3GPP_LAC_CI & MM_MODEM_LOCATION_SOURCE_GPS_RAW);
|
||||||
|
QMap<MMModemLocationSource, QVariant> location;
|
||||||
|
location.insert(MM_MODEM_LOCATION_SOURCE_3GPP_LAC_CI, QLatin1String("310,26,85CD,D30156"));
|
||||||
|
modemLocation->setLocation(location);
|
||||||
|
modemLocation->setSignalsLocation(true);
|
||||||
|
|
||||||
|
ModemManager::MMVariantMapMap interfaces;
|
||||||
|
interfaces.insert(QLatin1String(MMQT_DBUS_INTERFACE_MODEM_LOCATION), modemLocation->toMap());
|
||||||
|
fakeModem->addInterfaces(QDBusObjectPath(modem->modemPath()), interfaces);
|
||||||
|
modemLocation->setEnableNotifications(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ModemLocationPropertiesTest::testModemLocationProperties()
|
||||||
|
{
|
||||||
|
ModemManager::ModemDevice::Ptr modemDevice = ModemManager::modemDevices().first();
|
||||||
|
QVERIFY(modemDevice);
|
||||||
|
QVERIFY(modemDevice->hasInterface(ModemManager::ModemDevice::LocationInterface));
|
||||||
|
ModemManager::ModemLocation::Ptr modemLocationInterface =
|
||||||
|
modemDevice->interface(ModemManager::ModemDevice::LocationInterface).objectCast<ModemManager::ModemLocation>();
|
||||||
|
QVERIFY(modemLocationInterface);
|
||||||
|
|
||||||
|
modemLocation->setCapabilities(MM_MODEM_LOCATION_SOURCE_GPS_RAW);
|
||||||
|
QSignalSpy capabilitiesChangedSpy(modemLocationInterface.data(), SIGNAL(capabilitiesChanged(QFlags<MMModemLocationSource>)));
|
||||||
|
QVERIFY(capabilitiesChangedSpy.wait());
|
||||||
|
QCOMPARE(modemLocationInterface->capabilities(), capabilitiesChangedSpy.at(0).at(0).value<QFlags<MMModemLocationSource>>());
|
||||||
|
|
||||||
|
modemLocation->setEnabled(MM_MODEM_LOCATION_SOURCE_GPS_RAW);
|
||||||
|
QSignalSpy enabledChangedSpy(modemLocationInterface.data(), SIGNAL(enabledCapabilitiesChanged(QFlags<MMModemLocationSource>)));
|
||||||
|
QVERIFY(enabledChangedSpy.wait());
|
||||||
|
QCOMPARE(modemLocationInterface->enabledCapabilities(), enabledChangedSpy.at(0).at(0).value<QFlags<MMModemLocationSource>>());
|
||||||
|
|
||||||
|
QMap<MMModemLocationSource, QVariant> location;
|
||||||
|
location.insert(MM_MODEM_LOCATION_SOURCE_3GPP_LAC_CI, QLatin1String("312,27,85CD,D30156"));
|
||||||
|
modemLocation->setLocation(location);
|
||||||
|
QSignalSpy locationChangedSpy(modemLocationInterface.data(), SIGNAL(locationChanged(ModemManager::LocationInformationMap)));
|
||||||
|
QVERIFY(locationChangedSpy.wait());
|
||||||
|
QCOMPARE(modemLocationInterface->location().value(MM_MODEM_LOCATION_SOURCE_3GPP_LAC_CI).toString(),
|
||||||
|
locationChangedSpy.at(0).at(0).value<ModemManager::LocationInformationMap>().value(MM_MODEM_LOCATION_SOURCE_3GPP_LAC_CI).toString());
|
||||||
|
|
||||||
|
modemLocation->setSignalsLocation(true);
|
||||||
|
QSignalSpy signalsLocationChangedSpy(modemLocationInterface.data(), SIGNAL(signalsLocationChanged(bool)));
|
||||||
|
QVERIFY(signalsLocationChangedSpy.wait());
|
||||||
|
QCOMPARE(modemLocationInterface->signalsLocation(), signalsLocationChangedSpy.at(0).at(0).toBool());
|
||||||
|
}
|
||||||
|
|
||||||
|
QTEST_MAIN(ModemLocationPropertiesTest)
|
|
@ -0,0 +1,29 @@
|
||||||
|
/*
|
||||||
|
SPDX-FileCopyrightText: 2015 Jan Grulich <jgrulich@redhat.com>
|
||||||
|
|
||||||
|
SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef MODEMMANAGERQT_MODEMLOCATION_PROPERTIES_TEST_H
|
||||||
|
#define MODEMMANAGERQT_MODEMLOCATION_PROPERTIES_TEST_H
|
||||||
|
|
||||||
|
#include <QObject>
|
||||||
|
|
||||||
|
#include "fakemodem/fakemodem.h"
|
||||||
|
#include "fakemodem/modemlocation.h"
|
||||||
|
|
||||||
|
class ModemLocationPropertiesTest : public QObject
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
private Q_SLOTS:
|
||||||
|
void initTestCase();
|
||||||
|
void testModemLocationProperties();
|
||||||
|
|
||||||
|
private:
|
||||||
|
FakeModem *fakeModem;
|
||||||
|
Modem *modem;
|
||||||
|
ModemLocation *modemLocation;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // MODEMMANAGERQT_MODEMLOCATION_PROPERTIES_TEST_H
|
|
@ -0,0 +1,201 @@
|
||||||
|
/*
|
||||||
|
SPDX-FileCopyrightText: 2015 Jan Grulich <jgrulich@redhat.com>
|
||||||
|
|
||||||
|
SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "modemmessagingpropertiestest.h"
|
||||||
|
|
||||||
|
#include "dbus/fakedbus.h"
|
||||||
|
#include "generictypes.h"
|
||||||
|
#include "manager.h"
|
||||||
|
#include "modem.h"
|
||||||
|
#include "modemmessaging.h"
|
||||||
|
|
||||||
|
#include "fakemodem/modem.h"
|
||||||
|
|
||||||
|
#include <QSignalSpy>
|
||||||
|
#include <QTest>
|
||||||
|
|
||||||
|
void ModemMessagingPropertiesTest::initTestCase()
|
||||||
|
{
|
||||||
|
fakeModem = new FakeModem();
|
||||||
|
|
||||||
|
modem = new Modem();
|
||||||
|
modem->setAccessTechnologies(16);
|
||||||
|
modem->SetCurrentBands({0});
|
||||||
|
modem->SetCurrentCapabilities(4);
|
||||||
|
modem->SetCurrentModes({MM_MODEM_MODE_ANY, MM_MODEM_MODE_NONE});
|
||||||
|
modem->setDevice(QLatin1String("/sys/devices/pci0000:00/0000:00:1d.0/usb4/4-1/4-1.2"));
|
||||||
|
modem->setDeviceIdentifier(QLatin1String("1c435eb6d74494b5f78d7221e2c5ae9ec526a981"));
|
||||||
|
modem->setDrivers({QLatin1String("option1")});
|
||||||
|
modem->setEquipmentIdentifier(QLatin1String("353475021085110"));
|
||||||
|
modem->setManufacturer(QLatin1String("huawei"));
|
||||||
|
modem->setMaxActiveBearers(1);
|
||||||
|
modem->setMaxBearers(1);
|
||||||
|
modem->setModel(QLatin1String("K2540"));
|
||||||
|
// modem->setOwnNumbers();
|
||||||
|
modem->setPlugin(QLatin1String("Huawei"));
|
||||||
|
modem->setPorts({{QLatin1String("ttyUSB0"), MM_MODEM_PORT_TYPE_AT},
|
||||||
|
{QLatin1String("ttyUSB1"), MM_MODEM_PORT_TYPE_QCDM},
|
||||||
|
{QLatin1String("ttyUSB2"), MM_MODEM_PORT_TYPE_AT}});
|
||||||
|
modem->SetPowerState(3);
|
||||||
|
modem->setPrimaryPort(QLatin1String("ttyUSB2"));
|
||||||
|
modem->setRevision(QLatin1String("11.001.05.00.11"));
|
||||||
|
modem->setSignalQuality({93, true});
|
||||||
|
modem->setSim(QDBusObjectPath("/org/kde/fakemodem/SIM/1"));
|
||||||
|
modem->setState(8);
|
||||||
|
modem->setStateFailedReason(0);
|
||||||
|
modem->setSupportedBands({0});
|
||||||
|
modem->setSupportedCapabilities({4});
|
||||||
|
modem->setSupportedIpFamilies(3);
|
||||||
|
ModemManager::SupportedModesType supportedModes;
|
||||||
|
ModemManager::CurrentModesType supportedMode1 = {MM_MODEM_MODE_4G & MM_MODEM_MODE_3G & MM_MODEM_MODE_2G, MM_MODEM_MODE_NONE};
|
||||||
|
ModemManager::CurrentModesType supportedMode2 = {MM_MODEM_MODE_4G & MM_MODEM_MODE_3G & MM_MODEM_MODE_2G, MM_MODEM_MODE_2G};
|
||||||
|
ModemManager::CurrentModesType supportedMode3 = {MM_MODEM_MODE_4G & MM_MODEM_MODE_3G & MM_MODEM_MODE_2G, MM_MODEM_MODE_3G};
|
||||||
|
supportedModes << supportedMode1 << supportedMode2 << supportedMode3;
|
||||||
|
modem->setSupportedModes(supportedModes);
|
||||||
|
modem->setUnlockRequired(1);
|
||||||
|
modem->setUnlockRetries({{MM_MODEM_LOCK_SIM_PIN, 3}, {MM_MODEM_LOCK_SIM_PIN2, 3}, {MM_MODEM_LOCK_SIM_PUK, 10}, {MM_MODEM_LOCK_SIM_PUK2, 10}});
|
||||||
|
|
||||||
|
QSignalSpy addModemSpy(ModemManager::notifier(), SIGNAL(modemAdded(QString)));
|
||||||
|
fakeModem->addModem(modem);
|
||||||
|
QVERIFY(addModemSpy.wait());
|
||||||
|
|
||||||
|
modemMessaging = new ModemMessaging(modem);
|
||||||
|
modemMessaging->setModemPath(modem->modemPath());
|
||||||
|
modemMessaging->setSupportedStorages({MM_SMS_STORAGE_SM, MM_SMS_STORAGE_ME});
|
||||||
|
modemMessaging->setDefaultStorage(MM_SMS_STORAGE_SM);
|
||||||
|
|
||||||
|
sms = new Sms();
|
||||||
|
sms->setData(QByteArray("data"));
|
||||||
|
sms->setDeliveryReportRequest(true);
|
||||||
|
sms->setDeliveryState(MM_SMS_DELIVERY_STATE_COMPLETED_RECEIVED);
|
||||||
|
sms->setDischargeTimestamp(QLatin1String("2015-03-30T16:31:53+00:00"));
|
||||||
|
sms->setMessageReference(1);
|
||||||
|
sms->setNumber(QLatin1String("+420777888999"));
|
||||||
|
sms->setPduType(MM_SMS_PDU_TYPE_DELIVER);
|
||||||
|
sms->setSMSC(QLatin1String("+420777666555"));
|
||||||
|
sms->setSmsClass(1);
|
||||||
|
sms->setState(MM_SMS_STATE_STORED);
|
||||||
|
sms->setStorage(MM_SMS_STORAGE_SM);
|
||||||
|
#if MM_CHECK_VERSION(1, 2, 0)
|
||||||
|
sms->setServiceCategory(MM_SMS_CDMA_SERVICE_CATEGORY_EMERGENCY_BROADCAST);
|
||||||
|
sms->setTeleserviceId(MM_SMS_CDMA_TELESERVICE_ID_UNKNOWN);
|
||||||
|
#endif
|
||||||
|
sms->setText(QLatin1String("hello"));
|
||||||
|
sms->setTimestamp(QLatin1String("2015-03-30T16:31:53+00:00"));
|
||||||
|
sms->setValidity({MM_SMS_VALIDITY_TYPE_RELATIVE, 0});
|
||||||
|
|
||||||
|
ModemManager::MMVariantMapMap interfaces;
|
||||||
|
interfaces.insert(QLatin1String(MMQT_DBUS_INTERFACE_MODEM_MESSAGING), modemMessaging->toMap());
|
||||||
|
fakeModem->addInterfaces(QDBusObjectPath(modem->modemPath()), interfaces);
|
||||||
|
modemMessaging->setEnableNotifications(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ModemMessagingPropertiesTest::testModemMessagingProperties()
|
||||||
|
{
|
||||||
|
ModemManager::ModemDevice::Ptr modemDevice = ModemManager::modemDevices().first();
|
||||||
|
QVERIFY(modemDevice);
|
||||||
|
QVERIFY(modemDevice->hasInterface(ModemManager::ModemDevice::MessagingInterface));
|
||||||
|
ModemManager::ModemMessaging::Ptr modemMessagingInterface =
|
||||||
|
modemDevice->interface(ModemManager::ModemDevice::MessagingInterface).objectCast<ModemManager::ModemMessaging>();
|
||||||
|
QVERIFY(modemMessagingInterface);
|
||||||
|
QSignalSpy smsAddedSpy(modemMessagingInterface.data(), SIGNAL(messageAdded(QString, bool)));
|
||||||
|
modemMessaging->addMessage(sms);
|
||||||
|
QVERIFY(smsAddedSpy.wait());
|
||||||
|
QCOMPARE(modemMessagingInterface->messages().count(), 1);
|
||||||
|
|
||||||
|
ModemManager::Sms::Ptr modemSms = modemMessagingInterface->messages().first();
|
||||||
|
QVERIFY(modemSms);
|
||||||
|
|
||||||
|
sms->setData(QByteArray("data2"));
|
||||||
|
QSignalSpy dataChangedSpy(modemSms.data(), SIGNAL(dataChanged(QByteArray)));
|
||||||
|
QVERIFY(dataChangedSpy.wait());
|
||||||
|
QCOMPARE(modemSms->data(), dataChangedSpy.at(0).at(0).toByteArray());
|
||||||
|
|
||||||
|
sms->setDeliveryReportRequest(false);
|
||||||
|
QSignalSpy deliveryReportRequestChangedSpy(modemSms.data(), SIGNAL(deliveryReportRequestChanged(bool)));
|
||||||
|
QVERIFY(deliveryReportRequestChangedSpy.wait());
|
||||||
|
QCOMPARE(modemSms->deliveryReportRequest(), deliveryReportRequestChangedSpy.at(0).at(0).toBool());
|
||||||
|
|
||||||
|
sms->setDeliveryState(MM_SMS_DELIVERY_STATE_TEMPORARY_ERROR_SME_BUSY);
|
||||||
|
QSignalSpy deliveryStateChangedSpy(modemSms.data(), SIGNAL(deliveryStateChanged(MMSmsDeliveryState)));
|
||||||
|
QVERIFY(deliveryStateChangedSpy.wait());
|
||||||
|
QCOMPARE(modemSms->deliveryState(), deliveryStateChangedSpy.at(0).at(0).value<MMSmsDeliveryState>());
|
||||||
|
|
||||||
|
sms->setDischargeTimestamp(QLatin1String("2014-03-30T16:31:53+00:00"));
|
||||||
|
QSignalSpy dischargeTimestampChangedSpy(modemSms.data(), SIGNAL(dischargeTimestampChanged(QDateTime)));
|
||||||
|
QVERIFY(dischargeTimestampChangedSpy.wait());
|
||||||
|
QCOMPARE(modemSms->dischargeTimestamp(), dischargeTimestampChangedSpy.at(0).at(0).toDateTime());
|
||||||
|
|
||||||
|
sms->setMessageReference(2);
|
||||||
|
QSignalSpy messageReferenceChangedSpy(modemSms.data(), SIGNAL(messageReferenceChanged(uint)));
|
||||||
|
QVERIFY(messageReferenceChangedSpy.wait());
|
||||||
|
QCOMPARE(modemSms->messageReference(), messageReferenceChangedSpy.at(0).at(0).toUInt());
|
||||||
|
|
||||||
|
sms->setNumber(QLatin1String("+420777111222"));
|
||||||
|
QSignalSpy numberChangedSpy(modemSms.data(), SIGNAL(numberChanged(QString)));
|
||||||
|
QVERIFY(numberChangedSpy.wait());
|
||||||
|
QCOMPARE(modemSms->number(), numberChangedSpy.at(0).at(0).toString());
|
||||||
|
|
||||||
|
sms->setPduType(MM_SMS_PDU_TYPE_SUBMIT);
|
||||||
|
QSignalSpy pduTypeChangedSpy(modemSms.data(), SIGNAL(pduTypeChanged(MMSmsPduType)));
|
||||||
|
QVERIFY(pduTypeChangedSpy.wait());
|
||||||
|
QCOMPARE(modemSms->pduType(), pduTypeChangedSpy.at(0).at(0).value<MMSmsPduType>());
|
||||||
|
|
||||||
|
sms->setSMSC(QLatin1String("+420777878978"));
|
||||||
|
QSignalSpy SMSCChangedSpy(modemSms.data(), SIGNAL(SMSCChanged(QString)));
|
||||||
|
QVERIFY(SMSCChangedSpy.wait());
|
||||||
|
QCOMPARE(modemSms->SMSC(), SMSCChangedSpy.at(0).at(0).toString());
|
||||||
|
|
||||||
|
sms->setSmsClass(2);
|
||||||
|
QSignalSpy smsClassChangedSpy(modemSms.data(), SIGNAL(smsClassChanged(int)));
|
||||||
|
QVERIFY(smsClassChangedSpy.wait());
|
||||||
|
QCOMPARE(modemSms->smsClass(), smsClassChangedSpy.at(0).at(0).toInt());
|
||||||
|
|
||||||
|
sms->setState(MM_SMS_STATE_SENT);
|
||||||
|
QSignalSpy stateChangedSpy(modemSms.data(), SIGNAL(stateChanged(MMSmsState)));
|
||||||
|
QVERIFY(stateChangedSpy.wait());
|
||||||
|
QCOMPARE(modemSms->state(), stateChangedSpy.at(0).at(0).value<MMSmsState>());
|
||||||
|
|
||||||
|
sms->setStorage(MM_SMS_STORAGE_MT);
|
||||||
|
QSignalSpy storageChangedSpy(modemSms.data(), SIGNAL(storageChanged(MMSmsStorage)));
|
||||||
|
QVERIFY(storageChangedSpy.wait());
|
||||||
|
QCOMPARE(modemSms->storage(), storageChangedSpy.at(0).at(0).value<MMSmsStorage>());
|
||||||
|
|
||||||
|
#if MM_CHECK_VERSION(1, 2, 0)
|
||||||
|
sms->setServiceCategory(MM_SMS_CDMA_SERVICE_CATEGORY_UNKNOWN);
|
||||||
|
QSignalSpy serviceCategoryChangedSpy(modemSms.data(), SIGNAL(serviceCategoryChanged(MMSmsCdmaServiceCategory)));
|
||||||
|
QVERIFY(serviceCategoryChangedSpy.wait());
|
||||||
|
QCOMPARE(modemSms->serviceCategory(), serviceCategoryChangedSpy.at(0).at(0).value<MMSmsCdmaServiceCategory>());
|
||||||
|
|
||||||
|
sms->setTeleserviceId(MM_SMS_CDMA_TELESERVICE_ID_CMT91);
|
||||||
|
QSignalSpy teleserviceIdChangedSpy(modemSms.data(), SIGNAL(teleserviceIdChanged(MMSmsCdmaTeleserviceId)));
|
||||||
|
QVERIFY(teleserviceIdChangedSpy.wait());
|
||||||
|
QCOMPARE(modemSms->teleserviceId(), teleserviceIdChangedSpy.at(0).at(0).value<MMSmsCdmaTeleserviceId>());
|
||||||
|
#endif
|
||||||
|
|
||||||
|
sms->setText(QLatin1String("hello2"));
|
||||||
|
QSignalSpy textChangedSpy(modemSms.data(), SIGNAL(textChanged(QString)));
|
||||||
|
QVERIFY(textChangedSpy.wait());
|
||||||
|
QCOMPARE(modemSms->text(), textChangedSpy.at(0).at(0).toString());
|
||||||
|
|
||||||
|
sms->setTimestamp(QLatin1String("2014-03-30T16:31:53+00:00"));
|
||||||
|
QSignalSpy timestampChangedSpy(modemSms.data(), SIGNAL(timestampChanged(QDateTime)));
|
||||||
|
QVERIFY(timestampChangedSpy.wait());
|
||||||
|
QCOMPARE(modemSms->timestamp(), timestampChangedSpy.at(0).at(0).toDateTime());
|
||||||
|
|
||||||
|
sms->setValidity({MM_SMS_VALIDITY_TYPE_ABSOLUTE, 1});
|
||||||
|
QSignalSpy validityChangedSpy(modemSms.data(), SIGNAL(validityChanged(ModemManager::ValidityPair)));
|
||||||
|
QVERIFY(validityChangedSpy.wait());
|
||||||
|
QCOMPARE(modemSms->validity().validity, validityChangedSpy.at(0).at(0).value<ModemManager::ValidityPair>().validity);
|
||||||
|
QCOMPARE(modemSms->validity().value, validityChangedSpy.at(0).at(0).value<ModemManager::ValidityPair>().value);
|
||||||
|
|
||||||
|
QSignalSpy smsDeletedSpy(modemMessagingInterface.data(), SIGNAL(messageDeleted(QString)));
|
||||||
|
modemMessaging->Delete(QDBusObjectPath(sms->smsPath()));
|
||||||
|
QVERIFY(smsDeletedSpy.wait());
|
||||||
|
QCOMPARE(modemMessagingInterface->messages().count(), 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
QTEST_MAIN(ModemMessagingPropertiesTest)
|
|
@ -0,0 +1,31 @@
|
||||||
|
/*
|
||||||
|
SPDX-FileCopyrightText: 2015 Jan Grulich <jgrulich@redhat.com>
|
||||||
|
|
||||||
|
SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef MODEMMANAGERQT_MODEMMESSAGING_PROPERTIES_TEST_H
|
||||||
|
#define MODEMMANAGERQT_MODEMMESSAGING_PROPERTIES_TEST_H
|
||||||
|
|
||||||
|
#include <QObject>
|
||||||
|
|
||||||
|
#include "fakemodem/fakemodem.h"
|
||||||
|
#include "fakemodem/modemmessaging.h"
|
||||||
|
#include "fakemodem/sms.h"
|
||||||
|
|
||||||
|
class ModemMessagingPropertiesTest : public QObject
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
private Q_SLOTS:
|
||||||
|
void initTestCase();
|
||||||
|
void testModemMessagingProperties();
|
||||||
|
|
||||||
|
private:
|
||||||
|
FakeModem *fakeModem;
|
||||||
|
Modem *modem;
|
||||||
|
ModemMessaging *modemMessaging;
|
||||||
|
Sms *sms;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // MODEMMANAGERQT_MODEMMESSAGING_PROPERTIES_TEST_H
|
|
@ -0,0 +1,120 @@
|
||||||
|
/*
|
||||||
|
SPDX-FileCopyrightText: 2015 Jan Grulich <jgrulich@redhat.com>
|
||||||
|
|
||||||
|
SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "modemomapropertiestest.h"
|
||||||
|
|
||||||
|
#include "dbus/fakedbus.h"
|
||||||
|
#include "generictypes.h"
|
||||||
|
#include "manager.h"
|
||||||
|
#include "modem.h"
|
||||||
|
#include "modemoma.h"
|
||||||
|
|
||||||
|
#include "fakemodem/modem.h"
|
||||||
|
|
||||||
|
#include <QSignalSpy>
|
||||||
|
#include <QTest>
|
||||||
|
|
||||||
|
void ModemOmaPropertiesTest::initTestCase()
|
||||||
|
{
|
||||||
|
fakeModem = new FakeModem();
|
||||||
|
|
||||||
|
modem = new Modem();
|
||||||
|
modem->setAccessTechnologies(16);
|
||||||
|
modem->SetCurrentBands({0});
|
||||||
|
modem->SetCurrentCapabilities(4);
|
||||||
|
modem->SetCurrentModes({MM_MODEM_MODE_ANY, MM_MODEM_MODE_NONE});
|
||||||
|
modem->setDevice(QLatin1String("/sys/devices/pci0000:00/0000:00:1d.0/usb4/4-1/4-1.2"));
|
||||||
|
modem->setDeviceIdentifier(QLatin1String("1c435eb6d74494b5f78d7221e2c5ae9ec526a981"));
|
||||||
|
modem->setDrivers({QLatin1String("option1")});
|
||||||
|
modem->setEquipmentIdentifier(QLatin1String("353475021085110"));
|
||||||
|
modem->setManufacturer(QLatin1String("huawei"));
|
||||||
|
modem->setMaxActiveBearers(1);
|
||||||
|
modem->setMaxBearers(1);
|
||||||
|
modem->setModel(QLatin1String("K2540"));
|
||||||
|
// modem->setOwnNumbers();
|
||||||
|
modem->setPlugin(QLatin1String("Huawei"));
|
||||||
|
modem->setPorts({{QLatin1String("ttyUSB0"), MM_MODEM_PORT_TYPE_AT},
|
||||||
|
{QLatin1String("ttyUSB1"), MM_MODEM_PORT_TYPE_QCDM},
|
||||||
|
{QLatin1String("ttyUSB2"), MM_MODEM_PORT_TYPE_AT}});
|
||||||
|
modem->SetPowerState(3);
|
||||||
|
modem->setPrimaryPort(QLatin1String("ttyUSB2"));
|
||||||
|
modem->setRevision(QLatin1String("11.001.05.00.11"));
|
||||||
|
modem->setSignalQuality({93, true});
|
||||||
|
modem->setSim(QDBusObjectPath("/org/kde/fakemodem/SIM/1"));
|
||||||
|
modem->setState(8);
|
||||||
|
modem->setStateFailedReason(0);
|
||||||
|
modem->setSupportedBands({0});
|
||||||
|
modem->setSupportedCapabilities({4});
|
||||||
|
modem->setSupportedIpFamilies(3);
|
||||||
|
ModemManager::SupportedModesType supportedModes;
|
||||||
|
ModemManager::CurrentModesType supportedMode1 = {MM_MODEM_MODE_4G & MM_MODEM_MODE_3G & MM_MODEM_MODE_2G, MM_MODEM_MODE_NONE};
|
||||||
|
ModemManager::CurrentModesType supportedMode2 = {MM_MODEM_MODE_4G & MM_MODEM_MODE_3G & MM_MODEM_MODE_2G, MM_MODEM_MODE_2G};
|
||||||
|
ModemManager::CurrentModesType supportedMode3 = {MM_MODEM_MODE_4G & MM_MODEM_MODE_3G & MM_MODEM_MODE_2G, MM_MODEM_MODE_3G};
|
||||||
|
supportedModes << supportedMode1 << supportedMode2 << supportedMode3;
|
||||||
|
modem->setSupportedModes(supportedModes);
|
||||||
|
modem->setUnlockRequired(1);
|
||||||
|
modem->setUnlockRetries({{MM_MODEM_LOCK_SIM_PIN, 3}, {MM_MODEM_LOCK_SIM_PIN2, 3}, {MM_MODEM_LOCK_SIM_PUK, 10}, {MM_MODEM_LOCK_SIM_PUK2, 10}});
|
||||||
|
|
||||||
|
QSignalSpy addModemSpy(ModemManager::notifier(), SIGNAL(modemAdded(QString)));
|
||||||
|
fakeModem->addModem(modem);
|
||||||
|
QVERIFY(addModemSpy.wait());
|
||||||
|
|
||||||
|
modemOma = new ModemOma(modem);
|
||||||
|
modemOma->setModemPath(modem->modemPath());
|
||||||
|
modemOma->setFeatures(MM_OMA_FEATURE_NONE);
|
||||||
|
ModemManager::OmaSessionType sessionType;
|
||||||
|
sessionType.id = 1;
|
||||||
|
sessionType.type = MM_OMA_SESSION_TYPE_CLIENT_INITIATED_DEVICE_CONFIGURE;
|
||||||
|
ModemManager::OmaSessionTypes sessions;
|
||||||
|
sessions << sessionType;
|
||||||
|
modemOma->setPendingNetworkInitiatedSessions(sessions);
|
||||||
|
modemOma->setSessionState(MM_OMA_SESSION_STATE_STARTED);
|
||||||
|
modemOma->setSessionType(MM_OMA_SESSION_TYPE_CLIENT_INITIATED_PRL_UPDATE);
|
||||||
|
|
||||||
|
ModemManager::MMVariantMapMap interfaces;
|
||||||
|
interfaces.insert(QLatin1String(MMQT_DBUS_INTERFACE_MODEM_OMA), modemOma->toMap());
|
||||||
|
fakeModem->addInterfaces(QDBusObjectPath(modem->modemPath()), interfaces);
|
||||||
|
modemOma->setEnableNotifications(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ModemOmaPropertiesTest::testModemOmaProperties()
|
||||||
|
{
|
||||||
|
ModemManager::ModemDevice::Ptr modemDevice = ModemManager::modemDevices().first();
|
||||||
|
QVERIFY(modemDevice);
|
||||||
|
QVERIFY(modemDevice->hasInterface(ModemManager::ModemDevice::OmaInterface));
|
||||||
|
ModemManager::ModemOma::Ptr modemOmaInterface = modemDevice->interface(ModemManager::ModemDevice::OmaInterface).objectCast<ModemManager::ModemOma>();
|
||||||
|
QVERIFY(modemOmaInterface);
|
||||||
|
|
||||||
|
modemOma->setFeatures(MM_OMA_FEATURE_DEVICE_PROVISIONING);
|
||||||
|
QSignalSpy featuresChangedSpy(modemOmaInterface.data(), SIGNAL(featuresChanged(QFlags<MMOmaFeature>)));
|
||||||
|
QVERIFY(featuresChangedSpy.wait());
|
||||||
|
QCOMPARE(modemOmaInterface->features(), featuresChangedSpy.at(0).at(0).value<QFlags<MMOmaFeature>>());
|
||||||
|
|
||||||
|
ModemManager::OmaSessionType sessionType;
|
||||||
|
sessionType.id = 2;
|
||||||
|
sessionType.type = MM_OMA_SESSION_TYPE_CLIENT_INITIATED_HANDS_FREE_ACTIVATION;
|
||||||
|
ModemManager::OmaSessionTypes sessions;
|
||||||
|
sessions << sessionType;
|
||||||
|
modemOma->setPendingNetworkInitiatedSessions(sessions);
|
||||||
|
QSignalSpy sessionsChangedSpy(modemOmaInterface.data(), SIGNAL(pendingNetworkInitiatedSessionsChanged(ModemManager::OmaSessionTypes)));
|
||||||
|
QVERIFY(sessionsChangedSpy.wait());
|
||||||
|
QCOMPARE(modemOmaInterface->pendingNetworkInitiatedSessions().first().id, sessionsChangedSpy.at(0).at(0).value<ModemManager::OmaSessionTypes>().first().id);
|
||||||
|
QCOMPARE(modemOmaInterface->pendingNetworkInitiatedSessions().first().type,
|
||||||
|
sessionsChangedSpy.at(0).at(0).value<ModemManager::OmaSessionTypes>().first().type);
|
||||||
|
|
||||||
|
modemOma->setSessionState(MM_OMA_SESSION_STATE_CONNECTING);
|
||||||
|
QSignalSpy sessionStateChangedSpy(modemOmaInterface.data(),
|
||||||
|
SIGNAL(sessionStateChanged(MMOmaSessionState, MMOmaSessionState, MMOmaSessionStateFailedReason)));
|
||||||
|
QVERIFY(sessionStateChangedSpy.wait());
|
||||||
|
QCOMPARE(modemOmaInterface->sessionState(), sessionStateChangedSpy.at(0).at(1).value<MMOmaSessionState>());
|
||||||
|
|
||||||
|
modemOma->setSessionType(MM_OMA_SESSION_TYPE_NETWORK_INITIATED_PRL_UPDATE);
|
||||||
|
QSignalSpy sessionTypeChangedSpy(modemOmaInterface.data(), SIGNAL(sessionTypeChanged(MMOmaSessionType)));
|
||||||
|
QVERIFY(sessionTypeChangedSpy.wait());
|
||||||
|
QCOMPARE(modemOmaInterface->sessionType(), sessionTypeChangedSpy.at(0).at(0).value<MMOmaSessionType>());
|
||||||
|
}
|
||||||
|
|
||||||
|
QTEST_MAIN(ModemOmaPropertiesTest)
|
|
@ -0,0 +1,29 @@
|
||||||
|
/*
|
||||||
|
SPDX-FileCopyrightText: 2015 Jan Grulich <jgrulich@redhat.com>
|
||||||
|
|
||||||
|
SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef MODEMMANAGERQT_MODEMOMA_PROPERTIES_TEST_H
|
||||||
|
#define MODEMMANAGERQT_MODEMOMA_PROPERTIES_TEST_H
|
||||||
|
|
||||||
|
#include <QObject>
|
||||||
|
|
||||||
|
#include "fakemodem/fakemodem.h"
|
||||||
|
#include "fakemodem/modemoma.h"
|
||||||
|
|
||||||
|
class ModemOmaPropertiesTest : public QObject
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
private Q_SLOTS:
|
||||||
|
void initTestCase();
|
||||||
|
void testModemOmaProperties();
|
||||||
|
|
||||||
|
private:
|
||||||
|
FakeModem *fakeModem;
|
||||||
|
Modem *modem;
|
||||||
|
ModemOma *modemOma;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // MODEMMANAGERQT_MODEMOMA_PROPERTIES_TEST_H
|
|
@ -0,0 +1,233 @@
|
||||||
|
/*
|
||||||
|
SPDX-FileCopyrightText: 2015 Jan Grulich <jgrulich@redhat.com>
|
||||||
|
|
||||||
|
SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "modempropertiestest.h"
|
||||||
|
|
||||||
|
#include "generictypes.h"
|
||||||
|
#include "manager.h"
|
||||||
|
#include "modem.h"
|
||||||
|
|
||||||
|
#include "fakemodem/modem.h"
|
||||||
|
|
||||||
|
#include <QSignalSpy>
|
||||||
|
#include <QTest>
|
||||||
|
|
||||||
|
void ModemPropertiesTest::initTestCase()
|
||||||
|
{
|
||||||
|
fakeModem = new FakeModem();
|
||||||
|
modem = new Modem();
|
||||||
|
|
||||||
|
modem->setAccessTechnologies(16);
|
||||||
|
modem->SetCurrentBands({0});
|
||||||
|
modem->SetCurrentCapabilities(4);
|
||||||
|
modem->SetCurrentModes({MM_MODEM_MODE_ANY, MM_MODEM_MODE_NONE});
|
||||||
|
modem->setDevice(QLatin1String("/sys/devices/pci0000:00/0000:00:1d.0/usb4/4-1/4-1.2"));
|
||||||
|
modem->setDeviceIdentifier(QLatin1String("1c435eb6d74494b5f78d7221e2c5ae9ec526a981"));
|
||||||
|
modem->setDrivers({QLatin1String("option1")});
|
||||||
|
modem->setEquipmentIdentifier(QLatin1String("353475021085110"));
|
||||||
|
modem->setManufacturer(QLatin1String("huawei"));
|
||||||
|
modem->setMaxActiveBearers(1);
|
||||||
|
modem->setMaxBearers(1);
|
||||||
|
modem->setModel(QLatin1String("K2540"));
|
||||||
|
// modem->setOwnNumbers();
|
||||||
|
modem->setPlugin(QLatin1String("Huawei"));
|
||||||
|
modem->setPorts({{QLatin1String("ttyUSB0"), MM_MODEM_PORT_TYPE_AT},
|
||||||
|
{QLatin1String("ttyUSB1"), MM_MODEM_PORT_TYPE_QCDM},
|
||||||
|
{QLatin1String("ttyUSB2"), MM_MODEM_PORT_TYPE_AT}});
|
||||||
|
modem->SetPowerState(3);
|
||||||
|
modem->setPrimaryPort(QLatin1String("ttyUSB2"));
|
||||||
|
modem->setRevision(QLatin1String("11.001.05.00.11"));
|
||||||
|
modem->setSignalQuality({93, true});
|
||||||
|
modem->setSim(QDBusObjectPath("/org/kde/fakemodem/SIM/1"));
|
||||||
|
modem->setState(8);
|
||||||
|
modem->setStateFailedReason(0);
|
||||||
|
modem->setSupportedBands({0});
|
||||||
|
modem->setSupportedCapabilities({4});
|
||||||
|
modem->setSupportedIpFamilies(3);
|
||||||
|
ModemManager::SupportedModesType supportedModes;
|
||||||
|
ModemManager::CurrentModesType supportedMode1 = {MM_MODEM_MODE_4G & MM_MODEM_MODE_3G & MM_MODEM_MODE_2G, MM_MODEM_MODE_NONE};
|
||||||
|
ModemManager::CurrentModesType supportedMode2 = {MM_MODEM_MODE_4G & MM_MODEM_MODE_3G & MM_MODEM_MODE_2G, MM_MODEM_MODE_2G};
|
||||||
|
ModemManager::CurrentModesType supportedMode3 = {MM_MODEM_MODE_4G & MM_MODEM_MODE_3G & MM_MODEM_MODE_2G, MM_MODEM_MODE_3G};
|
||||||
|
supportedModes << supportedMode1 << supportedMode2 << supportedMode3;
|
||||||
|
modem->setSupportedModes(supportedModes);
|
||||||
|
modem->setUnlockRequired(1);
|
||||||
|
modem->setUnlockRetries({{MM_MODEM_LOCK_SIM_PIN, 3}, {MM_MODEM_LOCK_SIM_PIN2, 3}, {MM_MODEM_LOCK_SIM_PUK, 10}, {MM_MODEM_LOCK_SIM_PUK2, 10}});
|
||||||
|
|
||||||
|
QSignalSpy addModemSpy(ModemManager::notifier(), SIGNAL(modemAdded(QString)));
|
||||||
|
fakeModem->addModem(modem);
|
||||||
|
QVERIFY(addModemSpy.wait());
|
||||||
|
}
|
||||||
|
|
||||||
|
void ModemPropertiesTest::testModemProperties()
|
||||||
|
{
|
||||||
|
ModemManager::Modem::Ptr modemInterface = ModemManager::modemDevices().first()->modemInterface();
|
||||||
|
QVERIFY(modemInterface);
|
||||||
|
|
||||||
|
modem->setAccessTechnologies(5);
|
||||||
|
QSignalSpy accessTechnologiesChangedSpy(modemInterface.data(), SIGNAL(accessTechnologiesChanged(QFlags<MMModemAccessTechnology>)));
|
||||||
|
QVERIFY(accessTechnologiesChangedSpy.wait());
|
||||||
|
QCOMPARE(modemInterface->accessTechnologies(), accessTechnologiesChangedSpy.at(0).at(0).value<QFlags<MMModemAccessTechnology>>());
|
||||||
|
|
||||||
|
modem->SetCurrentBands({1});
|
||||||
|
QSignalSpy currentBandsChangedSpy(modemInterface.data(), SIGNAL(currentBandsChanged(QList<MMModemBand>)));
|
||||||
|
QVERIFY(currentBandsChangedSpy.wait());
|
||||||
|
QCOMPARE(modemInterface->currentBands().first(), currentBandsChangedSpy.at(0).at(0).value<QList<MMModemBand>>().first());
|
||||||
|
|
||||||
|
modem->SetCurrentCapabilities(5);
|
||||||
|
QSignalSpy currentCapabilitiesChangedSpy(modemInterface.data(), SIGNAL(currentCapabilitiesChanged(QFlags<MMModemCapability>)));
|
||||||
|
QVERIFY(currentCapabilitiesChangedSpy.wait());
|
||||||
|
QCOMPARE(modemInterface->currentCapabilities(), currentCapabilitiesChangedSpy.at(0).at(0).value<QFlags<MMModemCapability>>());
|
||||||
|
|
||||||
|
modem->SetCurrentModes({MM_MODEM_MODE_2G, MM_MODEM_MODE_NONE});
|
||||||
|
QSignalSpy currentModesChangedSpy(modemInterface.data(), SIGNAL(currentModesChanged(ModemManager::CurrentModesType)));
|
||||||
|
QVERIFY(currentModesChangedSpy.wait());
|
||||||
|
QCOMPARE(modemInterface->currentModes().allowed, currentModesChangedSpy.at(0).at(0).value<ModemManager::CurrentModesType>().allowed);
|
||||||
|
QCOMPARE(modemInterface->currentModes().preferred, currentModesChangedSpy.at(0).at(0).value<ModemManager::CurrentModesType>().preferred);
|
||||||
|
|
||||||
|
modem->setDevice(QLatin1String("/sys/devices/pci0000:00/0000:00:1d.0/usb5/5-1/5-1.2"));
|
||||||
|
QSignalSpy deviceChangedSpy(modemInterface.data(), SIGNAL(deviceChanged(QString)));
|
||||||
|
QVERIFY(deviceChangedSpy.wait());
|
||||||
|
QCOMPARE(modemInterface->device(), deviceChangedSpy.at(0).at(0).toString());
|
||||||
|
|
||||||
|
modem->setDeviceIdentifier(QLatin1String("1c435eb6d74494b5f98d7221e2c6ae9ec526a981"));
|
||||||
|
QSignalSpy deviceIdentifierChangedSpy(modemInterface.data(), SIGNAL(deviceIdentifierChanged(QString)));
|
||||||
|
QVERIFY(deviceIdentifierChangedSpy.wait());
|
||||||
|
QCOMPARE(modemInterface->deviceIdentifier(), deviceIdentifierChangedSpy.at(0).at(0).toString());
|
||||||
|
|
||||||
|
modem->setDrivers({QLatin1String("option2")});
|
||||||
|
QSignalSpy driversChangedSpy(modemInterface.data(), SIGNAL(driversChanged(QStringList)));
|
||||||
|
QVERIFY(driversChangedSpy.wait());
|
||||||
|
QCOMPARE(modemInterface->drivers(), driversChangedSpy.at(0).at(0).toStringList());
|
||||||
|
|
||||||
|
modem->setEquipmentIdentifier(QLatin1String("353895021085110"));
|
||||||
|
QSignalSpy equipmentIdentifierChangedSpy(modemInterface.data(), SIGNAL(equipmentIdentifierChanged(QString)));
|
||||||
|
QVERIFY(equipmentIdentifierChangedSpy.wait());
|
||||||
|
QCOMPARE(modemInterface->equipmentIdentifier(), equipmentIdentifierChangedSpy.at(0).at(0).toString());
|
||||||
|
|
||||||
|
modem->setManufacturer(QLatin1String("huawey"));
|
||||||
|
QSignalSpy manufacturerChangedSpy(modemInterface.data(), SIGNAL(manufacturerChanged(QString)));
|
||||||
|
QVERIFY(manufacturerChangedSpy.wait());
|
||||||
|
QCOMPARE(modemInterface->manufacturer(), manufacturerChangedSpy.at(0).at(0).toString());
|
||||||
|
|
||||||
|
modem->setMaxActiveBearers(2);
|
||||||
|
QSignalSpy maxActiveBearersChangedSpy(modemInterface.data(), SIGNAL(maxActiveBearersChanged(uint)));
|
||||||
|
QVERIFY(maxActiveBearersChangedSpy.wait());
|
||||||
|
QCOMPARE(modemInterface->maxActiveBearers(), maxActiveBearersChangedSpy.at(0).at(0).toUInt());
|
||||||
|
|
||||||
|
modem->setMaxBearers(2);
|
||||||
|
QSignalSpy maxBearersChangedSpy(modemInterface.data(), SIGNAL(maxBearersChanged(uint)));
|
||||||
|
QVERIFY(maxBearersChangedSpy.wait());
|
||||||
|
QCOMPARE(modemInterface->maxBearers(), maxBearersChangedSpy.at(0).at(0).toUInt());
|
||||||
|
|
||||||
|
modem->setModel(QLatin1String("K5658"));
|
||||||
|
QSignalSpy modelChangedSpy(modemInterface.data(), SIGNAL(modelChanged(QString)));
|
||||||
|
QVERIFY(modelChangedSpy.wait());
|
||||||
|
QCOMPARE(modemInterface->model(), modelChangedSpy.at(0).at(0).toString());
|
||||||
|
|
||||||
|
modem->setPlugin(QLatin1String("Huawey"));
|
||||||
|
QSignalSpy pluginChangedSpy(modemInterface.data(), SIGNAL(pluginChanged(QString)));
|
||||||
|
QVERIFY(pluginChangedSpy.wait());
|
||||||
|
QCOMPARE(modemInterface->plugin(), pluginChangedSpy.at(0).at(0).toString());
|
||||||
|
|
||||||
|
modem->setPorts({{QLatin1String("ttyUSB5"), MM_MODEM_PORT_TYPE_QCDM},
|
||||||
|
{QLatin1String("ttyUSB6"), MM_MODEM_PORT_TYPE_AT},
|
||||||
|
{QLatin1String("ttyUSB7"), MM_MODEM_PORT_TYPE_AT}});
|
||||||
|
QSignalSpy portsChangedSpy(modemInterface.data(), SIGNAL(portsChanged(ModemManager::PortList)));
|
||||||
|
QVERIFY(portsChangedSpy.wait());
|
||||||
|
ModemManager::PortList ports = modemInterface->ports();
|
||||||
|
ModemManager::PortList signalPorts = portsChangedSpy.at(0).at(0).value<ModemManager::PortList>();
|
||||||
|
QCOMPARE(ports.count(), signalPorts.count());
|
||||||
|
Q_FOREACH (const ModemManager::Port port, ports) {
|
||||||
|
bool found = false;
|
||||||
|
Q_FOREACH (const ModemManager::Port signalPort, signalPorts) {
|
||||||
|
if (port.name == signalPort.name) {
|
||||||
|
found = true;
|
||||||
|
QCOMPARE(port.type, signalPort.type);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
QVERIFY(found);
|
||||||
|
found = false;
|
||||||
|
}
|
||||||
|
QCOMPARE(modemInterface->plugin(), pluginChangedSpy.at(0).at(0).toString());
|
||||||
|
|
||||||
|
modem->SetPowerState(2);
|
||||||
|
QSignalSpy powerStateChangedSpy(modemInterface.data(), SIGNAL(powerStateChanged(MMModemPowerState)));
|
||||||
|
QVERIFY(powerStateChangedSpy.wait());
|
||||||
|
QCOMPARE(modemInterface->powerState(), powerStateChangedSpy.at(0).at(0).value<MMModemPowerState>());
|
||||||
|
|
||||||
|
modem->setPrimaryPort(QLatin1String("ttyUSB5"));
|
||||||
|
QSignalSpy primaryPortChangedSpy(modemInterface.data(), SIGNAL(primaryPortChanged(QString)));
|
||||||
|
QVERIFY(primaryPortChangedSpy.wait());
|
||||||
|
QCOMPARE(modemInterface->primaryPort(), primaryPortChangedSpy.at(0).at(0).toString());
|
||||||
|
|
||||||
|
modem->setRevision(QLatin1String("11.002.06.00.11"));
|
||||||
|
QSignalSpy revisionChangedSpy(modemInterface.data(), SIGNAL(revisionChanged(QString)));
|
||||||
|
QVERIFY(revisionChangedSpy.wait());
|
||||||
|
QCOMPARE(modemInterface->revision(), revisionChangedSpy.at(0).at(0).toString());
|
||||||
|
|
||||||
|
modem->setSignalQuality({85, true});
|
||||||
|
QSignalSpy signalQualityChangedSpy(modemInterface.data(), SIGNAL(signalQualityChanged(ModemManager::SignalQualityPair)));
|
||||||
|
QVERIFY(signalQualityChangedSpy.wait());
|
||||||
|
QCOMPARE(modemInterface->signalQuality().recent, signalQualityChangedSpy.at(0).at(0).value<ModemManager::SignalQualityPair>().recent);
|
||||||
|
QCOMPARE(modemInterface->signalQuality().signal, signalQualityChangedSpy.at(0).at(0).value<ModemManager::SignalQualityPair>().signal);
|
||||||
|
|
||||||
|
modem->setSim(QDBusObjectPath("/org/kde/fakemodem/SIM/2"));
|
||||||
|
QSignalSpy simChangedSpy(modemInterface.data(), SIGNAL(simPathChanged(QString, QString)));
|
||||||
|
QVERIFY(simChangedSpy.wait());
|
||||||
|
QCOMPARE(modemInterface->simPath(), simChangedSpy.at(0).at(1).toString());
|
||||||
|
|
||||||
|
modem->setState(5);
|
||||||
|
QSignalSpy stateChangedSpy(modemInterface.data(), SIGNAL(stateChanged(MMModemState, MMModemState, MMModemStateChangeReason)));
|
||||||
|
QVERIFY(stateChangedSpy.wait());
|
||||||
|
QCOMPARE(MM_MODEM_STATE_REGISTERED, stateChangedSpy.at(0).at(0).value<MMModemState>());
|
||||||
|
QCOMPARE(MM_MODEM_STATE_ENABLING, stateChangedSpy.at(0).at(1).value<MMModemState>());
|
||||||
|
QCOMPARE(MM_MODEM_STATE_CHANGE_REASON_UNKNOWN, stateChangedSpy.at(0).at(2).value<MMModemStateChangeReason>());
|
||||||
|
|
||||||
|
modem->setStateFailedReason(1);
|
||||||
|
QSignalSpy stateFailedReasonChangedSpy(modemInterface.data(), SIGNAL(stateFailedReasonChanged(MMModemStateFailedReason)));
|
||||||
|
QVERIFY(stateFailedReasonChangedSpy.wait());
|
||||||
|
QCOMPARE(modemInterface->stateFailedReason(), stateFailedReasonChangedSpy.at(0).at(0).value<MMModemStateFailedReason>());
|
||||||
|
|
||||||
|
modem->setSupportedBands({1});
|
||||||
|
QSignalSpy supportedBandsChangedSpy(modemInterface.data(), SIGNAL(supportedBandsChanged(QList<MMModemBand>)));
|
||||||
|
QVERIFY(supportedBandsChangedSpy.wait());
|
||||||
|
QCOMPARE(modemInterface->supportedBands().first(), supportedBandsChangedSpy.at(0).at(0).value<QList<MMModemBand>>().first());
|
||||||
|
|
||||||
|
modem->setSupportedCapabilities({3});
|
||||||
|
QSignalSpy supportedCapabilitiesChangedSpy(modemInterface.data(), SIGNAL(supportedCapabilitiesChanged(QList<MMModemCapability>)));
|
||||||
|
QVERIFY(supportedCapabilitiesChangedSpy.wait());
|
||||||
|
QCOMPARE(modemInterface->supportedCapabilities().first(), supportedCapabilitiesChangedSpy.at(0).at(0).value<QList<MMModemCapability>>().first());
|
||||||
|
|
||||||
|
modem->setSupportedIpFamilies(2);
|
||||||
|
QSignalSpy supportedIpFamiliesChangedSpy(modemInterface.data(), SIGNAL(supportedIpFamiliesChanged(QFlags<MMBearerIpFamily>)));
|
||||||
|
QVERIFY(supportedIpFamiliesChangedSpy.wait());
|
||||||
|
QCOMPARE(modemInterface->supportedIpFamilies(), supportedIpFamiliesChangedSpy.at(0).at(0).value<QFlags<MMBearerIpFamily>>());
|
||||||
|
|
||||||
|
ModemManager::SupportedModesType supportedModes;
|
||||||
|
ModemManager::CurrentModesType supportedMode1 = {MM_MODEM_MODE_2G, MM_MODEM_MODE_NONE};
|
||||||
|
supportedModes << supportedMode1;
|
||||||
|
modem->setSupportedModes(supportedModes);
|
||||||
|
QSignalSpy supportedModesChangedSpy(modemInterface.data(), SIGNAL(supportedModesChanged(ModemManager::SupportedModesType)));
|
||||||
|
QVERIFY(supportedModesChangedSpy.wait());
|
||||||
|
QCOMPARE(modemInterface->supportedModes().first().allowed, supportedModesChangedSpy.at(0).at(0).value<ModemManager::SupportedModesType>().first().allowed);
|
||||||
|
QCOMPARE(modemInterface->supportedModes().first().preferred,
|
||||||
|
supportedModesChangedSpy.at(0).at(0).value<ModemManager::SupportedModesType>().first().preferred);
|
||||||
|
|
||||||
|
modem->setUnlockRequired(2);
|
||||||
|
QSignalSpy unlockRequiredChangedSpy(modemInterface.data(), SIGNAL(unlockRequiredChanged(MMModemLock)));
|
||||||
|
QVERIFY(unlockRequiredChangedSpy.wait());
|
||||||
|
QCOMPARE(modemInterface->unlockRequired(), unlockRequiredChangedSpy.at(0).at(0).value<MMModemLock>());
|
||||||
|
|
||||||
|
modem->setUnlockRetries({{MM_MODEM_LOCK_SIM_PIN, 2}});
|
||||||
|
QSignalSpy unlockRetriesChangedSpy(modemInterface.data(), SIGNAL(unlockRetriesChanged(ModemManager::UnlockRetriesMap)));
|
||||||
|
QVERIFY(unlockRetriesChangedSpy.wait());
|
||||||
|
QCOMPARE(modemInterface->unlockRetries().count(), 1);
|
||||||
|
QVERIFY(modemInterface->unlockRetries().contains(MM_MODEM_LOCK_SIM_PIN));
|
||||||
|
QCOMPARE(modemInterface->unlockRetries().value(MM_MODEM_LOCK_SIM_PIN),
|
||||||
|
unlockRetriesChangedSpy.at(0).at(0).value<ModemManager::UnlockRetriesMap>().value(MM_MODEM_LOCK_SIM_PIN));
|
||||||
|
}
|
||||||
|
|
||||||
|
QTEST_MAIN(ModemPropertiesTest)
|
|
@ -0,0 +1,27 @@
|
||||||
|
/*
|
||||||
|
SPDX-FileCopyrightText: 2015 Jan Grulich <jgrulich@redhat.com>
|
||||||
|
|
||||||
|
SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef MODEMMANAGERQT_MODEM_PROPERTIES_TEST_H
|
||||||
|
#define MODEMMANAGERQT_MODEM_PROPERTIES_TEST_H
|
||||||
|
|
||||||
|
#include <QObject>
|
||||||
|
|
||||||
|
#include "fakemodem/fakemodem.h"
|
||||||
|
|
||||||
|
class ModemPropertiesTest : public QObject
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
private Q_SLOTS:
|
||||||
|
void initTestCase();
|
||||||
|
void testModemProperties();
|
||||||
|
|
||||||
|
private:
|
||||||
|
FakeModem *fakeModem;
|
||||||
|
Modem *modem;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // MODEMMANAGERQT_MODEM_PROPERTIES_TEST_H
|
|
@ -0,0 +1,194 @@
|
||||||
|
/*
|
||||||
|
SPDX-FileCopyrightText: 2015 Jan Grulich <jgrulich@redhat.com>
|
||||||
|
|
||||||
|
SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "modemtest.h"
|
||||||
|
|
||||||
|
#include "manager.h"
|
||||||
|
#include "modem.h"
|
||||||
|
|
||||||
|
#include "fakemodem/modem.h"
|
||||||
|
|
||||||
|
#include <QSignalSpy>
|
||||||
|
#include <QTest>
|
||||||
|
|
||||||
|
void ModemTest::initTestCase()
|
||||||
|
{
|
||||||
|
fakeModem = new FakeModem();
|
||||||
|
}
|
||||||
|
|
||||||
|
void ModemTest::testModems()
|
||||||
|
{
|
||||||
|
Modem *modem = new Modem();
|
||||||
|
modem->setAccessTechnologies(16);
|
||||||
|
modem->SetCurrentBands({0});
|
||||||
|
modem->SetCurrentCapabilities(4);
|
||||||
|
modem->SetCurrentModes({MM_MODEM_MODE_ANY, MM_MODEM_MODE_NONE});
|
||||||
|
modem->setDevice(QLatin1String("/sys/devices/pci0000:00/0000:00:1d.0/usb4/4-1/4-1.2"));
|
||||||
|
modem->setDeviceIdentifier(QLatin1String("1c435eb6d74494b5f78d7221e2c5ae9ec526a981"));
|
||||||
|
modem->setDrivers({QLatin1String("option1")});
|
||||||
|
modem->setEquipmentIdentifier(QLatin1String("353475021085110"));
|
||||||
|
modem->setManufacturer(QLatin1String("huawei"));
|
||||||
|
modem->setMaxActiveBearers(1);
|
||||||
|
modem->setMaxBearers(1);
|
||||||
|
modem->setModel(QLatin1String("K2540"));
|
||||||
|
// modem->setOwnNumbers();
|
||||||
|
modem->setPlugin(QLatin1String("Huawei"));
|
||||||
|
modem->setPorts({{QLatin1String("ttyUSB0"), MM_MODEM_PORT_TYPE_AT},
|
||||||
|
{QLatin1String("ttyUSB1"), MM_MODEM_PORT_TYPE_QCDM},
|
||||||
|
{QLatin1String("ttyUSB2"), MM_MODEM_PORT_TYPE_AT}});
|
||||||
|
modem->SetPowerState(3);
|
||||||
|
modem->setPrimaryPort(QLatin1String("ttyUSB2"));
|
||||||
|
modem->setRevision(QLatin1String("11.001.05.00.11"));
|
||||||
|
modem->setSignalQuality({93, true});
|
||||||
|
modem->setSim(QDBusObjectPath("/org/kde/fakemodem/SIM/1"));
|
||||||
|
modem->setState(8);
|
||||||
|
modem->setStateFailedReason(0);
|
||||||
|
modem->setSupportedBands({0});
|
||||||
|
modem->setSupportedCapabilities({4});
|
||||||
|
modem->setSupportedIpFamilies(3);
|
||||||
|
ModemManager::SupportedModesType supportedModes;
|
||||||
|
ModemManager::CurrentModesType supportedMode1 = {MM_MODEM_MODE_4G & MM_MODEM_MODE_3G & MM_MODEM_MODE_2G, MM_MODEM_MODE_NONE};
|
||||||
|
ModemManager::CurrentModesType supportedMode2 = {MM_MODEM_MODE_4G & MM_MODEM_MODE_3G & MM_MODEM_MODE_2G, MM_MODEM_MODE_2G};
|
||||||
|
ModemManager::CurrentModesType supportedMode3 = {MM_MODEM_MODE_4G & MM_MODEM_MODE_3G & MM_MODEM_MODE_2G, MM_MODEM_MODE_3G};
|
||||||
|
supportedModes << supportedMode1 << supportedMode2 << supportedMode3;
|
||||||
|
modem->setSupportedModes(supportedModes);
|
||||||
|
modem->setUnlockRequired(1);
|
||||||
|
modem->setUnlockRetries({{MM_MODEM_LOCK_SIM_PIN, 3}, {MM_MODEM_LOCK_SIM_PIN2, 3}, {MM_MODEM_LOCK_SIM_PUK, 10}, {MM_MODEM_LOCK_SIM_PUK2, 10}});
|
||||||
|
|
||||||
|
QSignalSpy addModemSpy(ModemManager::notifier(), SIGNAL(modemAdded(QString)));
|
||||||
|
connect(ModemManager::notifier(), &ModemManager::Notifier::modemAdded, this, &ModemTest::testModemAdded);
|
||||||
|
fakeModem->addModem(modem);
|
||||||
|
QVERIFY(addModemSpy.wait());
|
||||||
|
QCOMPARE(ModemManager::modemDevices().count(), 1);
|
||||||
|
QCOMPARE(ModemManager::modemDevices().first()->uni(), addModemSpy.at(0).at(0).toString());
|
||||||
|
const QString addedModemPath = ModemManager::modemDevices().first()->uni();
|
||||||
|
|
||||||
|
Bearer *bearer = new Bearer();
|
||||||
|
// We need to set some default values
|
||||||
|
bearer->setConnected(false);
|
||||||
|
bearer->setInterface(QLatin1String("ttyUSB0"));
|
||||||
|
bearer->setIp4Config({{QLatin1String("method"), MM_BEARER_IP_METHOD_PPP}});
|
||||||
|
bearer->setIp6Config({{QLatin1String("method"), MM_BEARER_IP_METHOD_UNKNOWN}});
|
||||||
|
bearer->setIpTimeout(20);
|
||||||
|
bearer->setProperties({{QLatin1String("apn"), QLatin1String("internet")}, {QLatin1String("ip-type"), 1}, {QLatin1String("number"), QLatin1String("*99#")}});
|
||||||
|
bearer->setSuspended(false);
|
||||||
|
|
||||||
|
ModemManager::Modem::Ptr modemInterface = ModemManager::modemDevices().first()->modemInterface();
|
||||||
|
QCOMPARE(modemInterface->listBearers().count(), 0);
|
||||||
|
|
||||||
|
QSignalSpy bearerAddedSpy(modemInterface.data(), SIGNAL(bearerAdded(QString)));
|
||||||
|
fakeModem->addBearer(bearer);
|
||||||
|
#if MM_CHECK_VERSION(1, 2, 0)
|
||||||
|
QVERIFY(bearerAddedSpy.wait());
|
||||||
|
QCOMPARE(modemInterface->listBearers().count(), 1);
|
||||||
|
ModemManager::Bearer::Ptr modemBearer = modemInterface->listBearers().first();
|
||||||
|
QVERIFY(modemBearer);
|
||||||
|
QCOMPARE(modemBearer->isConnected(), false);
|
||||||
|
QCOMPARE(modemBearer->interface(), QLatin1String("ttyUSB0"));
|
||||||
|
QCOMPARE(modemBearer->ip4Config().method(), MM_BEARER_IP_METHOD_PPP);
|
||||||
|
QCOMPARE(modemBearer->ip6Config().method(), MM_BEARER_IP_METHOD_UNKNOWN);
|
||||||
|
QCOMPARE(modemBearer->ipTimeout(), (uint)20);
|
||||||
|
QVERIFY(modemBearer->properties().contains(QLatin1String("apn")));
|
||||||
|
QVERIFY(modemBearer->properties().contains(QLatin1String("number")));
|
||||||
|
QVERIFY(modemBearer->properties().contains(QLatin1String("ip-type")));
|
||||||
|
QCOMPARE(modemBearer->properties().value(QLatin1String("apn")).toString(), QLatin1String("internet"));
|
||||||
|
QCOMPARE(modemBearer->properties().value(QLatin1String("ip-type")).toUInt(), (uint)1);
|
||||||
|
QCOMPARE(modemBearer->properties().value(QLatin1String("number")).toString(), QLatin1String("*99#"));
|
||||||
|
QCOMPARE(modemBearer->isSuspended(), false);
|
||||||
|
|
||||||
|
QSignalSpy bearerRemovedSpy(modemInterface.data(), SIGNAL(bearerRemoved(QString)));
|
||||||
|
fakeModem->removeBearer(bearer);
|
||||||
|
QVERIFY(bearerRemovedSpy.wait());
|
||||||
|
QCOMPARE(modemInterface->listBearers().count(), 0);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
QSignalSpy removeModemSpy(ModemManager::notifier(), SIGNAL(modemRemoved(QString)));
|
||||||
|
fakeModem->removeModem(modem);
|
||||||
|
QVERIFY(removeModemSpy.wait());
|
||||||
|
QVERIFY(ModemManager::modemDevices().isEmpty());
|
||||||
|
QCOMPARE(removeModemSpy.at(0).at(0).toString(), addedModemPath);
|
||||||
|
delete modem;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ModemTest::testModemAdded(const QString &dev)
|
||||||
|
{
|
||||||
|
ModemManager::ModemDevice::Ptr modemDevice = ModemManager::findModemDevice(dev);
|
||||||
|
ModemManager::Modem::Ptr modem = modemDevice->modemInterface();
|
||||||
|
|
||||||
|
QCOMPARE(modem->accessTechnologies(), 16);
|
||||||
|
QList<MMModemBand> bands = {MM_MODEM_BAND_UNKNOWN};
|
||||||
|
QCOMPARE(modem->currentBands(), bands);
|
||||||
|
QCOMPARE(modem->currentCapabilities(), 4);
|
||||||
|
ModemManager::CurrentModesType currentModes = {MM_MODEM_MODE_ANY, MM_MODEM_MODE_NONE};
|
||||||
|
ModemManager::CurrentModesType modemCurrentModes = modem->currentModes();
|
||||||
|
QCOMPARE(currentModes.allowed, modemCurrentModes.allowed);
|
||||||
|
QCOMPARE(currentModes.preferred, modemCurrentModes.preferred);
|
||||||
|
QCOMPARE(modem->device(), QLatin1String("/sys/devices/pci0000:00/0000:00:1d.0/usb4/4-1/4-1.2"));
|
||||||
|
QCOMPARE(modem->deviceIdentifier(), QLatin1String("1c435eb6d74494b5f78d7221e2c5ae9ec526a981"));
|
||||||
|
QCOMPARE(modem->drivers(), QStringList(QLatin1String("option1")));
|
||||||
|
QCOMPARE(modem->equipmentIdentifier(), QLatin1String("353475021085110"));
|
||||||
|
QCOMPARE(modem->manufacturer(), QLatin1String("huawei"));
|
||||||
|
QCOMPARE(modem->maxActiveBearers(), (uint)1);
|
||||||
|
QCOMPARE(modem->maxBearers(), (uint)1);
|
||||||
|
QCOMPARE(modem->model(), QLatin1String("K2540"));
|
||||||
|
// TODO ownNumbers
|
||||||
|
QCOMPARE(modem->plugin(), QLatin1String("Huawei"));
|
||||||
|
ModemManager::PortList ports = {{QLatin1String("ttyUSB0"), MM_MODEM_PORT_TYPE_AT},
|
||||||
|
{QLatin1String("ttyUSB1"), MM_MODEM_PORT_TYPE_QCDM},
|
||||||
|
{QLatin1String("ttyUSB2"), MM_MODEM_PORT_TYPE_AT}};
|
||||||
|
ModemManager::PortList modemPorts = modem->ports();
|
||||||
|
QCOMPARE(ports.count(), modemPorts.count());
|
||||||
|
Q_FOREACH (const ModemManager::Port port, ports) {
|
||||||
|
bool found = false;
|
||||||
|
Q_FOREACH (const ModemManager::Port modemPort, modemPorts) {
|
||||||
|
if (port.name == modemPort.name) {
|
||||||
|
found = true;
|
||||||
|
QCOMPARE(port.type, modemPort.type);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
QVERIFY(found);
|
||||||
|
found = false;
|
||||||
|
}
|
||||||
|
QCOMPARE(modem->powerState(), MM_MODEM_POWER_STATE_ON);
|
||||||
|
QCOMPARE(modem->primaryPort(), QLatin1String("ttyUSB2"));
|
||||||
|
QCOMPARE(modem->revision(), QLatin1String("11.001.05.00.11"));
|
||||||
|
ModemManager::SignalQualityPair signalQuality = {93, true};
|
||||||
|
ModemManager::SignalQualityPair modemSignalQuality = modem->signalQuality();
|
||||||
|
QCOMPARE(modemSignalQuality.recent, signalQuality.recent);
|
||||||
|
QCOMPARE(modemSignalQuality.signal, signalQuality.signal);
|
||||||
|
QCOMPARE(modem->simPath(), QLatin1String("/org/kde/fakemodem/SIM/1"));
|
||||||
|
QCOMPARE(modem->state(), MM_MODEM_STATE_REGISTERED);
|
||||||
|
QCOMPARE(modem->stateFailedReason(), MM_MODEM_STATE_FAILED_REASON_NONE);
|
||||||
|
QList<MMModemBand> supportedBands = {MM_MODEM_BAND_UNKNOWN};
|
||||||
|
QCOMPARE(modem->supportedBands(), supportedBands);
|
||||||
|
QList<MMModemCapability> supportedCapabilities = {(MMModemCapability)4};
|
||||||
|
QCOMPARE(modem->supportedCapabilities(), supportedCapabilities);
|
||||||
|
QCOMPARE(modem->supportedIpFamilies(), 3);
|
||||||
|
ModemManager::SupportedModesType supportedModes;
|
||||||
|
ModemManager::CurrentModesType supportedMode1 = {MM_MODEM_MODE_4G & MM_MODEM_MODE_3G & MM_MODEM_MODE_2G, MM_MODEM_MODE_NONE};
|
||||||
|
ModemManager::CurrentModesType supportedMode2 = {MM_MODEM_MODE_4G & MM_MODEM_MODE_3G & MM_MODEM_MODE_2G, MM_MODEM_MODE_2G};
|
||||||
|
ModemManager::CurrentModesType supportedMode3 = {MM_MODEM_MODE_4G & MM_MODEM_MODE_3G & MM_MODEM_MODE_2G, MM_MODEM_MODE_3G};
|
||||||
|
supportedModes << supportedMode1 << supportedMode2 << supportedMode3;
|
||||||
|
ModemManager::SupportedModesType modemSupportedModes = modem->supportedModes();
|
||||||
|
Q_FOREACH (ModemManager::CurrentModesType currentType, supportedModes) {
|
||||||
|
bool found = false;
|
||||||
|
Q_FOREACH (ModemManager::CurrentModesType modemCurrentType, modemSupportedModes) {
|
||||||
|
if (currentType.allowed == modemCurrentType.allowed && currentType.preferred == modemCurrentType.preferred) {
|
||||||
|
found = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
QVERIFY(found);
|
||||||
|
found = false;
|
||||||
|
}
|
||||||
|
QCOMPARE(modem->unlockRequired(), MM_MODEM_LOCK_NONE);
|
||||||
|
ModemManager::UnlockRetriesMap unlockRetries = {{MM_MODEM_LOCK_SIM_PIN, 3},
|
||||||
|
{MM_MODEM_LOCK_SIM_PIN2, 3},
|
||||||
|
{MM_MODEM_LOCK_SIM_PUK, 10},
|
||||||
|
{MM_MODEM_LOCK_SIM_PUK2, 10}};
|
||||||
|
QCOMPARE(modem->unlockRetries(), unlockRetries);
|
||||||
|
}
|
||||||
|
|
||||||
|
QTEST_MAIN(ModemTest)
|
|
@ -0,0 +1,27 @@
|
||||||
|
/*
|
||||||
|
SPDX-FileCopyrightText: 2015 Jan Grulich <jgrulich@redhat.com>
|
||||||
|
|
||||||
|
SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef MODEMMANAGERQT_MODEM_TEST_H
|
||||||
|
#define MODEMMANAGERQT_MODEM_TEST_H
|
||||||
|
|
||||||
|
#include <QObject>
|
||||||
|
|
||||||
|
#include "fakemodem/fakemodem.h"
|
||||||
|
|
||||||
|
class ModemTest : public QObject
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
private Q_SLOTS:
|
||||||
|
void initTestCase();
|
||||||
|
void testModems();
|
||||||
|
void testModemAdded(const QString &dev);
|
||||||
|
|
||||||
|
private:
|
||||||
|
FakeModem *fakeModem;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // MODEMMANAGERQT_MODEM_TEST_H
|
|
@ -0,0 +1,101 @@
|
||||||
|
/*
|
||||||
|
SPDX-FileCopyrightText: 2015 Jan Grulich <jgrulich@redhat.com>
|
||||||
|
|
||||||
|
SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "modemtimepropertiestest.h"
|
||||||
|
|
||||||
|
#include "dbus/fakedbus.h"
|
||||||
|
#include "generictypes.h"
|
||||||
|
#include "manager.h"
|
||||||
|
#include "modem.h"
|
||||||
|
#include "modemtime.h"
|
||||||
|
|
||||||
|
#include "fakemodem/modem.h"
|
||||||
|
|
||||||
|
#include <QSignalSpy>
|
||||||
|
#include <QTest>
|
||||||
|
|
||||||
|
void ModemTimePropertiesTest::initTestCase()
|
||||||
|
{
|
||||||
|
fakeModem = new FakeModem();
|
||||||
|
|
||||||
|
modem = new Modem();
|
||||||
|
modem->setAccessTechnologies(16);
|
||||||
|
modem->SetCurrentBands({0});
|
||||||
|
modem->SetCurrentCapabilities(4);
|
||||||
|
modem->SetCurrentModes({MM_MODEM_MODE_ANY, MM_MODEM_MODE_NONE});
|
||||||
|
modem->setDevice(QLatin1String("/sys/devices/pci0000:00/0000:00:1d.0/usb4/4-1/4-1.2"));
|
||||||
|
modem->setDeviceIdentifier(QLatin1String("1c435eb6d74494b5f78d7221e2c5ae9ec526a981"));
|
||||||
|
modem->setDrivers({QLatin1String("option1")});
|
||||||
|
modem->setEquipmentIdentifier(QLatin1String("353475021085110"));
|
||||||
|
modem->setManufacturer(QLatin1String("huawei"));
|
||||||
|
modem->setMaxActiveBearers(1);
|
||||||
|
modem->setMaxBearers(1);
|
||||||
|
modem->setModel(QLatin1String("K2540"));
|
||||||
|
// modem->setOwnNumbers();
|
||||||
|
modem->setPlugin(QLatin1String("Huawei"));
|
||||||
|
modem->setPorts({{QLatin1String("ttyUSB0"), MM_MODEM_PORT_TYPE_AT},
|
||||||
|
{QLatin1String("ttyUSB1"), MM_MODEM_PORT_TYPE_QCDM},
|
||||||
|
{QLatin1String("ttyUSB2"), MM_MODEM_PORT_TYPE_AT}});
|
||||||
|
modem->SetPowerState(3);
|
||||||
|
modem->setPrimaryPort(QLatin1String("ttyUSB2"));
|
||||||
|
modem->setRevision(QLatin1String("11.001.05.00.11"));
|
||||||
|
modem->setSignalQuality({93, true});
|
||||||
|
modem->setSim(QDBusObjectPath("/org/kde/fakemodem/SIM/1"));
|
||||||
|
modem->setState(8);
|
||||||
|
modem->setStateFailedReason(0);
|
||||||
|
modem->setSupportedBands({0});
|
||||||
|
modem->setSupportedCapabilities({4});
|
||||||
|
modem->setSupportedIpFamilies(3);
|
||||||
|
ModemManager::SupportedModesType supportedModes;
|
||||||
|
ModemManager::CurrentModesType supportedMode1 = {MM_MODEM_MODE_4G & MM_MODEM_MODE_3G & MM_MODEM_MODE_2G, MM_MODEM_MODE_NONE};
|
||||||
|
ModemManager::CurrentModesType supportedMode2 = {MM_MODEM_MODE_4G & MM_MODEM_MODE_3G & MM_MODEM_MODE_2G, MM_MODEM_MODE_2G};
|
||||||
|
ModemManager::CurrentModesType supportedMode3 = {MM_MODEM_MODE_4G & MM_MODEM_MODE_3G & MM_MODEM_MODE_2G, MM_MODEM_MODE_3G};
|
||||||
|
supportedModes << supportedMode1 << supportedMode2 << supportedMode3;
|
||||||
|
modem->setSupportedModes(supportedModes);
|
||||||
|
modem->setUnlockRequired(1);
|
||||||
|
modem->setUnlockRetries({{MM_MODEM_LOCK_SIM_PIN, 3}, {MM_MODEM_LOCK_SIM_PIN2, 3}, {MM_MODEM_LOCK_SIM_PUK, 10}, {MM_MODEM_LOCK_SIM_PUK2, 10}});
|
||||||
|
|
||||||
|
QSignalSpy addModemSpy(ModemManager::notifier(), SIGNAL(modemAdded(QString)));
|
||||||
|
fakeModem->addModem(modem);
|
||||||
|
QVERIFY(addModemSpy.wait());
|
||||||
|
|
||||||
|
modemTime = new ModemTime(modem);
|
||||||
|
modemTime->setModemPath(modem->modemPath());
|
||||||
|
QVariantMap timezone;
|
||||||
|
timezone.insert(QLatin1String("offset"), 60);
|
||||||
|
timezone.insert(QLatin1String("dst-offset"), 60);
|
||||||
|
timezone.insert(QLatin1String("offset"), 60);
|
||||||
|
timezone.insert(QLatin1String("leap-seconds"), 1);
|
||||||
|
modemTime->setNetworkTimezone(timezone);
|
||||||
|
|
||||||
|
ModemManager::MMVariantMapMap interfaces;
|
||||||
|
interfaces.insert(QLatin1String(MMQT_DBUS_INTERFACE_MODEM_MODEMCDMA), modemTime->toMap());
|
||||||
|
fakeModem->addInterfaces(QDBusObjectPath(modem->modemPath()), interfaces);
|
||||||
|
modemTime->setEnableNotifications(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ModemTimePropertiesTest::testModemTimeProperties()
|
||||||
|
{
|
||||||
|
ModemManager::ModemDevice::Ptr modemDevice = ModemManager::modemDevices().first();
|
||||||
|
QVERIFY(modemDevice);
|
||||||
|
QVERIFY(modemDevice->hasInterface(ModemManager::ModemDevice::TimeInterface));
|
||||||
|
ModemManager::ModemTime::Ptr modemTimeInterface = modemDevice->interface(ModemManager::ModemDevice::TimeInterface).objectCast<ModemManager::ModemTime>();
|
||||||
|
QVERIFY(modemTimeInterface);
|
||||||
|
|
||||||
|
QVariantMap timezone;
|
||||||
|
timezone.insert(QLatin1String("offset"), 120);
|
||||||
|
timezone.insert(QLatin1String("dst-offset"), 120);
|
||||||
|
timezone.insert(QLatin1String("offset"), 120);
|
||||||
|
timezone.insert(QLatin1String("leap-seconds"), 2);
|
||||||
|
modemTime->setNetworkTimezone(timezone);
|
||||||
|
QSignalSpy networkTimezoneChangedSpy(modemTimeInterface.data(), SIGNAL(networkTimezoneChanged(ModemManager::NetworkTimezone)));
|
||||||
|
QVERIFY(networkTimezoneChangedSpy.wait());
|
||||||
|
QCOMPARE(modemTimeInterface->networkTimezone().dstOffset(), networkTimezoneChangedSpy.at(0).at(0).value<ModemManager::NetworkTimezone>().dstOffset());
|
||||||
|
QCOMPARE(modemTimeInterface->networkTimezone().offset(), networkTimezoneChangedSpy.at(0).at(0).value<ModemManager::NetworkTimezone>().offset());
|
||||||
|
QCOMPARE(modemTimeInterface->networkTimezone().leapSecond(), networkTimezoneChangedSpy.at(0).at(0).value<ModemManager::NetworkTimezone>().leapSecond());
|
||||||
|
}
|
||||||
|
|
||||||
|
QTEST_MAIN(ModemTimePropertiesTest)
|
|
@ -0,0 +1,29 @@
|
||||||
|
/*
|
||||||
|
SPDX-FileCopyrightText: 2015 Jan Grulich <jgrulich@redhat.com>
|
||||||
|
|
||||||
|
SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef MODEMMANAGERQT_MODEMTIME_PROPERTIES_TEST_H
|
||||||
|
#define MODEMMANAGERQT_MODEMTIME_PROPERTIES_TEST_H
|
||||||
|
|
||||||
|
#include <QObject>
|
||||||
|
|
||||||
|
#include "fakemodem/fakemodem.h"
|
||||||
|
#include "fakemodem/modemtime.h"
|
||||||
|
|
||||||
|
class ModemTimePropertiesTest : public QObject
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
private Q_SLOTS:
|
||||||
|
void initTestCase();
|
||||||
|
void testModemTimeProperties();
|
||||||
|
|
||||||
|
private:
|
||||||
|
FakeModem *fakeModem;
|
||||||
|
Modem *modem;
|
||||||
|
ModemTime *modemTime;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // MODEMMANAGERQT_MODEMTIME_PROPERTIES_TEST_H
|
|
@ -0,0 +1,39 @@
|
||||||
|
# - Try to find ModemManager
|
||||||
|
# Once done this will define
|
||||||
|
#
|
||||||
|
# MODEMMANAGER_FOUND - system has ModemManager
|
||||||
|
# MODEMMANAGER_INCLUDE_DIRS - the ModemManager include directories
|
||||||
|
# MODEMMANAGER_LIBRARIES - the libraries needed to use ModemManager
|
||||||
|
# MODEMMANAGER_CFLAGS - Compiler switches required for using ModemManager
|
||||||
|
# MODEMMANAGER_VERSION - version number of ModemManager
|
||||||
|
|
||||||
|
# SPDX-FileCopyrightText: 2006 Alexander Neundorf <neundorf@kde.org>
|
||||||
|
# SPDX-FileCopyrightText: 2007 Will Stephenson <wstephenson@kde.org>
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: BSD-3-Clause
|
||||||
|
|
||||||
|
IF (MODEMMANAGER_INCLUDE_DIRS)
|
||||||
|
# in cache already
|
||||||
|
SET(ModemManager_FIND_QUIETLY TRUE)
|
||||||
|
ENDIF (MODEMMANAGER_INCLUDE_DIRS)
|
||||||
|
|
||||||
|
IF (NOT WIN32)
|
||||||
|
# use pkg-config to get the directories and then use these values
|
||||||
|
# in the FIND_PATH() and FIND_LIBRARY() calls
|
||||||
|
find_package(PkgConfig)
|
||||||
|
PKG_SEARCH_MODULE( MODEMMANAGER ModemManager )
|
||||||
|
ENDIF (NOT WIN32)
|
||||||
|
|
||||||
|
IF (MODEMMANAGER_FOUND)
|
||||||
|
IF (ModemManager_FIND_VERSION AND ("${MODEMMANAGER_VERSION}" VERSION_LESS "${ModemManager_FIND_VERSION}"))
|
||||||
|
MESSAGE(FATAL_ERROR "ModemManager ${MODEMMANAGER_VERSION} is too old, need at least ${ModemManager_FIND_VERSION}")
|
||||||
|
ELSEIF (NOT ModemManager_FIND_QUIETLY)
|
||||||
|
MESSAGE(STATUS "Found ModemManager ${MODEMMANAGER_VERSION}: ${MODEMMANAGER_LIBRARY_DIRS}")
|
||||||
|
ENDIF()
|
||||||
|
ELSE (MODEMMANAGER_FOUND)
|
||||||
|
IF (ModemManager_FIND_REQUIRED)
|
||||||
|
MESSAGE(FATAL_ERROR "Could NOT find ModemManager, check FindPkgConfig output above!")
|
||||||
|
ENDIF (ModemManager_FIND_REQUIRED)
|
||||||
|
ENDIF (MODEMMANAGER_FOUND)
|
||||||
|
|
||||||
|
MARK_AS_ADVANCED(MODEMMANAGER_INCLUDE_DIRS)
|
|
@ -0,0 +1,22 @@
|
||||||
|
include(FindPkgConfig)
|
||||||
|
pkg_check_modules(MODEMMANAGER REQUIRED ModemManager>=1.0)
|
||||||
|
|
||||||
|
find_package(KF5ModemManagerQt ${KF_VERSION} REQUIRED)
|
||||||
|
|
||||||
|
find_package(Qt${QT_MAJOR_VERSION} ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS
|
||||||
|
Core
|
||||||
|
DBus
|
||||||
|
Xml
|
||||||
|
)
|
||||||
|
|
||||||
|
include_directories(${MODEMMANAGER_INCLUDE_DIRS})
|
||||||
|
|
||||||
|
set(exampleModemManagerQt_SRCS
|
||||||
|
main.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
add_executable(exampleModemManagerQt ${exampleModemManagerQt_SRCS})
|
||||||
|
target_link_libraries(exampleModemManagerQt
|
||||||
|
KF5::ModemManagerQt
|
||||||
|
Qt${QT_MAJOR_VERSION}::Core
|
||||||
|
)
|
|
@ -0,0 +1,95 @@
|
||||||
|
/*
|
||||||
|
SPDX-FileCopyrightText: 2013 Jan Grulich <jgrulich@redhat.com>
|
||||||
|
|
||||||
|
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <ModemManagerQt/interface.h>
|
||||||
|
#include <ModemManagerQt/manager.h>
|
||||||
|
#include <ModemManagerQt/modem.h>
|
||||||
|
#include <ModemManagerQt/modemdevice.h>
|
||||||
|
#include <ModemManagerQt/modemmessaging.h>
|
||||||
|
#include <ModemManagerQt/sim.h>
|
||||||
|
#include <ModemManagerQt/sms.h>
|
||||||
|
|
||||||
|
#include <QDebug>
|
||||||
|
|
||||||
|
int main(int argc, char *argv[])
|
||||||
|
{
|
||||||
|
Q_UNUSED(argc);
|
||||||
|
Q_UNUSED(argv);
|
||||||
|
qDebug() << "List of Modem Devices:";
|
||||||
|
Q_FOREACH (ModemManager::ModemDevice::Ptr modemdevice, ModemManager::modemDevices()) {
|
||||||
|
ModemManager::Modem::Ptr modemInterface = modemdevice->modemInterface();
|
||||||
|
if (modemInterface) {
|
||||||
|
qDebug() << "Modem: " << modemInterface->manufacturer() << modemInterface->model();
|
||||||
|
} else {
|
||||||
|
qDebug() << "Modem: " << modemdevice->uni();
|
||||||
|
}
|
||||||
|
|
||||||
|
QStringList interfaces;
|
||||||
|
if (modemInterface) {
|
||||||
|
interfaces << QStringLiteral("modem");
|
||||||
|
}
|
||||||
|
if (modemdevice->hasInterface(ModemManager::ModemDevice::GsmInterface)) {
|
||||||
|
interfaces << QStringLiteral("gsm");
|
||||||
|
}
|
||||||
|
if (modemdevice->hasInterface(ModemManager::ModemDevice::GsmUssdInterface)) {
|
||||||
|
interfaces << QStringLiteral("gsm ussd");
|
||||||
|
}
|
||||||
|
if (modemdevice->hasInterface(ModemManager::ModemDevice::CdmaInterface)) {
|
||||||
|
interfaces << QStringLiteral("cdma");
|
||||||
|
}
|
||||||
|
if (modemdevice->hasInterface(ModemManager::ModemDevice::MessagingInterface)) {
|
||||||
|
interfaces << QStringLiteral("messaging");
|
||||||
|
}
|
||||||
|
if (modemdevice->hasInterface(ModemManager::ModemDevice::LocationInterface)) {
|
||||||
|
interfaces << QStringLiteral("location");
|
||||||
|
}
|
||||||
|
if (modemdevice->hasInterface(ModemManager::ModemDevice::TimeInterface)) {
|
||||||
|
interfaces << QStringLiteral("time");
|
||||||
|
}
|
||||||
|
if (modemdevice->hasInterface(ModemManager::ModemDevice::VoiceInterface)) {
|
||||||
|
interfaces << QStringLiteral("voice");
|
||||||
|
}
|
||||||
|
|
||||||
|
qDebug() << "Interfaces: " << interfaces;
|
||||||
|
qDebug() << "SIM Card: ";
|
||||||
|
if (!modemdevice->sim()) {
|
||||||
|
qDebug() << " no SIM card";
|
||||||
|
} else {
|
||||||
|
qDebug() << " " << modemdevice->sim()->uni() << "Operator: " << modemdevice->sim()->operatorName();
|
||||||
|
}
|
||||||
|
|
||||||
|
qDebug() << "Messages: ";
|
||||||
|
ModemManager::ModemMessaging::Ptr messaging = modemdevice->messagingInterface();
|
||||||
|
if (messaging && !messaging->messages().isEmpty()) {
|
||||||
|
ModemManager::Sms::List messages = messaging->messages();
|
||||||
|
Q_FOREACH (ModemManager::Sms::Ptr sms, messages) {
|
||||||
|
qDebug() << " " << sms->number() << sms->text();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
qDebug() << " no messaging interface or message";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (messaging) {
|
||||||
|
ModemManager::ModemMessaging::Message msg;
|
||||||
|
msg.number = QStringLiteral("number");
|
||||||
|
msg.text = QStringLiteral("message text");
|
||||||
|
QDBusReply<QString> sms = messaging->createMessage(msg);
|
||||||
|
if (sms.isValid() && !sms.value().isEmpty()) {
|
||||||
|
qDebug() << "Message created";
|
||||||
|
ModemManager::Sms::Ptr tmp = messaging->findMessage(sms.value());
|
||||||
|
if (tmp) {
|
||||||
|
qDebug() << "Message text:";
|
||||||
|
qDebug() << tmp->text();
|
||||||
|
QDBusPendingReply<> reply = tmp->send();
|
||||||
|
reply.waitForFinished();
|
||||||
|
if (reply.isError()) {
|
||||||
|
qDebug() << reply.error().message();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,20 @@
|
||||||
|
maintainer:
|
||||||
|
- grulich
|
||||||
|
- lvsouza
|
||||||
|
- lukas
|
||||||
|
description: Qt wrapper for ModemManager API
|
||||||
|
tier: 1
|
||||||
|
type: integration
|
||||||
|
platforms:
|
||||||
|
- name: Linux
|
||||||
|
note: Functional only with running ModemManager
|
||||||
|
portingAid: false
|
||||||
|
deprecated: false
|
||||||
|
release: true
|
||||||
|
libraries:
|
||||||
|
- cmake: "KF5ModemManagerQt"
|
||||||
|
cmakename: KF5ModemManagerQt
|
||||||
|
|
||||||
|
public_lib: true
|
||||||
|
group: Frameworks
|
||||||
|
subgroup: Tier 1
|
|
@ -0,0 +1,212 @@
|
||||||
|
#add_subdirectory(dbus)
|
||||||
|
|
||||||
|
include_directories(
|
||||||
|
${MODEMMANAGER_INCLUDE_DIRS}
|
||||||
|
)
|
||||||
|
|
||||||
|
set(ModemManagerQt_SRCS
|
||||||
|
bearer.cpp
|
||||||
|
generictypes.cpp
|
||||||
|
interface.cpp
|
||||||
|
manager.cpp
|
||||||
|
modem.cpp
|
||||||
|
modemsimple.cpp
|
||||||
|
modem3gpp.cpp
|
||||||
|
modem3gppussd.cpp
|
||||||
|
modemcdma.cpp
|
||||||
|
modemdevice.cpp
|
||||||
|
modemfirmware.cpp
|
||||||
|
modemlocation.cpp
|
||||||
|
modemmessaging.cpp
|
||||||
|
modemtime.cpp
|
||||||
|
sim.cpp
|
||||||
|
sms.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
set(DBUS_INTERFACES_FILES
|
||||||
|
dbus/bearerinterface.cpp
|
||||||
|
dbus/dbus_manager.cpp
|
||||||
|
dbus/firmwareinterface.cpp
|
||||||
|
dbus/locationinterface.cpp
|
||||||
|
dbus/messaginginterface.cpp
|
||||||
|
dbus/modem3gppinterface.cpp
|
||||||
|
dbus/modemcdmainterface.cpp
|
||||||
|
dbus/modeminterface.cpp
|
||||||
|
dbus/modemmanager1interface.cpp
|
||||||
|
dbus/siminterface.cpp
|
||||||
|
dbus/simpleinterface.cpp
|
||||||
|
dbus/smsinterface.cpp
|
||||||
|
dbus/timeinterface.cpp
|
||||||
|
dbus/ussdinterface.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
if (${MODEMMANAGER_VERSION} VERSION_EQUAL 1.2.0 OR ${MODEMMANAGER_VERSION} VERSION_GREATER 1.2.0)
|
||||||
|
set(ModemManagerQt_SRCS
|
||||||
|
${ModemManagerQt_SRCS}
|
||||||
|
modemoma.cpp
|
||||||
|
modemsignal.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
set(DBUS_INTERFACES_FILES
|
||||||
|
${DBUS_INTERFACES_FILES}
|
||||||
|
dbus/omainterface.cpp
|
||||||
|
dbus/signalinterface.cpp
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (${MODEMMANAGER_VERSION} VERSION_EQUAL 1.6.0 OR ${MODEMMANAGER_VERSION} VERSION_GREATER 1.6.0)
|
||||||
|
set(ModemManagerQt_SRCS
|
||||||
|
${ModemManagerQt_SRCS}
|
||||||
|
modemvoice.cpp
|
||||||
|
call.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
set(DBUS_INTERFACES_FILES
|
||||||
|
${DBUS_INTERFACES_FILES}
|
||||||
|
dbus/callinterface.cpp
|
||||||
|
dbus/voiceinterface.cpp
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
ecm_qt_export_logging_category(
|
||||||
|
IDENTIFIER MMQT
|
||||||
|
CATEGORY_NAME kf.modemmanagerqt
|
||||||
|
OLD_CATEGORY_NAMES modemmanager-qt
|
||||||
|
DEFAULT_SEVERITY Warning
|
||||||
|
DESCRIPTION "ModemManagerQt"
|
||||||
|
EXPORT MODEMMANAGERQT
|
||||||
|
)
|
||||||
|
|
||||||
|
add_library(KF5ModemManagerQt SHARED ${ModemManagerQt_SRCS} ${DBUS_INTERFACES_FILES})
|
||||||
|
generate_export_header(KF5ModemManagerQt BASE_NAME ModemManagerQt)
|
||||||
|
add_library(KF5::ModemManagerQt ALIAS KF5ModemManagerQt)
|
||||||
|
|
||||||
|
target_include_directories(KF5ModemManagerQt INTERFACE "$<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR_KF}/ModemManagerQt>")
|
||||||
|
|
||||||
|
target_link_libraries(KF5ModemManagerQt PUBLIC Qt${QT_MAJOR_VERSION}::Core Qt${QT_MAJOR_VERSION}::DBus PRIVATE Qt${QT_MAJOR_VERSION}::Xml)
|
||||||
|
|
||||||
|
set_target_properties(KF5ModemManagerQt PROPERTIES VERSION ${MODEMMANAGERQT_VERSION}
|
||||||
|
SOVERSION ${MODEMMANAGERQT_SOVERSION}
|
||||||
|
EXPORT_NAME ModemManagerQt
|
||||||
|
)
|
||||||
|
|
||||||
|
target_include_directories(KF5ModemManagerQt PUBLIC ${MODEMMANAGER_INCLUDE_DIRS})
|
||||||
|
|
||||||
|
########### static lib for tests ###############
|
||||||
|
add_library(KF5ModemManagerQt_static STATIC ${ModemManagerQt_SRCS} ${DBUS_INTERFACES_FILES})
|
||||||
|
set_target_properties(KF5ModemManagerQt_static PROPERTIES COMPILE_FLAGS -DMMQT_STATIC=1)
|
||||||
|
|
||||||
|
target_link_libraries(KF5ModemManagerQt_static PUBLIC Qt${QT_MAJOR_VERSION}::Core Qt${QT_MAJOR_VERSION}::DBus Qt${QT_MAJOR_VERSION}::Xml)
|
||||||
|
target_include_directories(KF5ModemManagerQt_static PUBLIC "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/..;${CMAKE_CURRENT_BINARY_DIR}/..>")
|
||||||
|
if (QT_MAJOR_VERSION STREQUAL "5")
|
||||||
|
ecm_generate_headers(ModemManagerQt_CamelCaseHEADERS
|
||||||
|
HEADER_NAMES
|
||||||
|
Call
|
||||||
|
Bearer
|
||||||
|
GenericTypes
|
||||||
|
Interface
|
||||||
|
Manager
|
||||||
|
Modem
|
||||||
|
Modem3Gpp
|
||||||
|
Modem3GppUssd
|
||||||
|
ModemCdma
|
||||||
|
ModemDevice
|
||||||
|
ModemFirmware
|
||||||
|
ModemLocation
|
||||||
|
ModemMessaging
|
||||||
|
ModemSignal
|
||||||
|
ModemSimple
|
||||||
|
ModemTime
|
||||||
|
ModemOma
|
||||||
|
ModemVoice
|
||||||
|
Sim
|
||||||
|
Sms
|
||||||
|
REQUIRED_HEADERS ModemManagerQt_HEADERS
|
||||||
|
)
|
||||||
|
else()
|
||||||
|
ecm_generate_headers(ModemManagerQt_CamelCaseHEADERS
|
||||||
|
HEADER_NAMES
|
||||||
|
Call
|
||||||
|
Bearer
|
||||||
|
GenericTypes
|
||||||
|
Interface
|
||||||
|
Manager
|
||||||
|
Modem
|
||||||
|
Modem3Gpp
|
||||||
|
Modem3GppUssd
|
||||||
|
ModemCdma
|
||||||
|
ModemDevice
|
||||||
|
ModemFirmware
|
||||||
|
ModemLocation
|
||||||
|
ModemMessaging
|
||||||
|
ModemSignal
|
||||||
|
ModemSimple
|
||||||
|
ModemTime
|
||||||
|
ModemOma
|
||||||
|
ModemVoice
|
||||||
|
Sim
|
||||||
|
Sms
|
||||||
|
PREFIX ModemManagerQt
|
||||||
|
REQUIRED_HEADERS ModemManagerQt_HEADERS
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
install(TARGETS KF5ModemManagerQt EXPORT KF5ModemManagerQtTargets ${KF5_INSTALL_TARGETS_DEFAULT_ARGS})
|
||||||
|
|
||||||
|
|
||||||
|
# To keep backwards compatibility we stick with this layout for KF5,
|
||||||
|
# and use the ModemManagerQt/ModemManagerQt and ModemManagerQt/modemmanagerqt layout for KF6
|
||||||
|
if (QT_MAJOR_VERSION STREQUAL "5")
|
||||||
|
install(FILES
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/modemmanagerqt_export.h
|
||||||
|
${ModemManagerQt_HEADERS}
|
||||||
|
${ModemManagerQt_CamelCaseHEADERS}
|
||||||
|
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF}/ModemManagerQt COMPONENT Devel
|
||||||
|
)
|
||||||
|
else()
|
||||||
|
install(FILES
|
||||||
|
${ModemManagerQt_CamelCaseHEADERS}
|
||||||
|
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF}/ModemManagerQt/ModemManagerQt COMPONENT Devel
|
||||||
|
)
|
||||||
|
|
||||||
|
install(FILES
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/modemmanagerqt_export.h
|
||||||
|
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF}/ModemManagerQt
|
||||||
|
COMPONENT Devel
|
||||||
|
)
|
||||||
|
|
||||||
|
install(FILES
|
||||||
|
${ModemManagerQt_HEADERS}
|
||||||
|
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF}/ModemManagerQt/modemmanagerqt COMPONENT Devel
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
ecm_qt_install_logging_categories(
|
||||||
|
EXPORT MODEMMANAGERQT
|
||||||
|
FILE modemmanagerqt.categories
|
||||||
|
DESTINATION ${KDE_INSTALL_LOGGINGCATEGORIESDIR}
|
||||||
|
)
|
||||||
|
|
||||||
|
if(BUILD_QCH)
|
||||||
|
ecm_add_qch(
|
||||||
|
KF5ModemManagerQt_QCH
|
||||||
|
NAME ModemManagerQt
|
||||||
|
BASE_NAME KF5ModemManagerQt
|
||||||
|
VERSION ${KF_VERSION}
|
||||||
|
ORG_DOMAIN org.kde
|
||||||
|
SOURCES # using only public headers, to cover only public API
|
||||||
|
${ModemManagerQt_HEADERS}
|
||||||
|
MD_MAINPAGE "${CMAKE_SOURCE_DIR}/README.md"
|
||||||
|
LINK_QCHS
|
||||||
|
Qt5Core_QCH
|
||||||
|
Qt5DBus_QCH
|
||||||
|
Qt5Xml_QCH
|
||||||
|
BLANK_MACROS
|
||||||
|
MODEMMANAGERQT_EXPORT
|
||||||
|
MODEMMANAGERQT_DEPRECATED
|
||||||
|
MODEMMANAGERQT_DEPRECATED_EXPORT
|
||||||
|
TAGFILE_INSTALL_DESTINATION ${KDE_INSTALL_QTQCHDIR}
|
||||||
|
QCH_INSTALL_DESTINATION ${KDE_INSTALL_QTQCHDIR}
|
||||||
|
COMPONENT Devel
|
||||||
|
)
|
||||||
|
endif()
|
|
@ -0,0 +1,315 @@
|
||||||
|
/*
|
||||||
|
SPDX-FileCopyrightText: 2013 Lukas Tinkl <ltinkl@redhat.com>
|
||||||
|
SPDX-FileCopyrightText: 2013-2015 Jan Grulich <jgrulich@redhat.com>
|
||||||
|
|
||||||
|
SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "bearer_p.h"
|
||||||
|
#include "mmdebug_p.h"
|
||||||
|
#ifdef MMQT_STATIC
|
||||||
|
#include "dbus/fakedbus.h"
|
||||||
|
#else
|
||||||
|
#include "dbus/dbus.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// logging category for this framework, default: log stuff >= warning
|
||||||
|
Q_LOGGING_CATEGORY(MMQT, "kf.modemmanagerqt", QtWarningMsg)
|
||||||
|
|
||||||
|
namespace ModemManager
|
||||||
|
{
|
||||||
|
class ModemManager::IpConfig::Private
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
Private()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
MMBearerIpMethod method{MM_BEARER_IP_METHOD_UNKNOWN};
|
||||||
|
|
||||||
|
QString address;
|
||||||
|
uint prefix{0};
|
||||||
|
QString dns1;
|
||||||
|
QString dns2;
|
||||||
|
QString dns3;
|
||||||
|
QString gateway;
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
ModemManager::IpConfig::IpConfig()
|
||||||
|
: d(new Private())
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
ModemManager::IpConfig::IpConfig(const ModemManager::IpConfig &other)
|
||||||
|
: d(new Private)
|
||||||
|
{
|
||||||
|
*this = other;
|
||||||
|
}
|
||||||
|
|
||||||
|
ModemManager::IpConfig::~IpConfig()
|
||||||
|
{
|
||||||
|
delete d;
|
||||||
|
}
|
||||||
|
|
||||||
|
MMBearerIpMethod ModemManager::IpConfig::method() const
|
||||||
|
{
|
||||||
|
return d->method;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ModemManager::IpConfig::setMethod(MMBearerIpMethod method)
|
||||||
|
{
|
||||||
|
d->method = method;
|
||||||
|
}
|
||||||
|
|
||||||
|
QString ModemManager::IpConfig::address() const
|
||||||
|
{
|
||||||
|
return d->address;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ModemManager::IpConfig::setAddress(const QString &address)
|
||||||
|
{
|
||||||
|
d->address = address;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint ModemManager::IpConfig::prefix() const
|
||||||
|
{
|
||||||
|
return d->prefix;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ModemManager::IpConfig::setPrefix(uint prefix)
|
||||||
|
{
|
||||||
|
d->prefix = prefix;
|
||||||
|
}
|
||||||
|
|
||||||
|
QString ModemManager::IpConfig::dns1() const
|
||||||
|
{
|
||||||
|
return d->dns1;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ModemManager::IpConfig::setDns1(const QString &dns1)
|
||||||
|
{
|
||||||
|
d->dns1 = dns1;
|
||||||
|
}
|
||||||
|
|
||||||
|
QString ModemManager::IpConfig::dns2() const
|
||||||
|
{
|
||||||
|
return d->dns2;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ModemManager::IpConfig::setDns2(const QString &dns2)
|
||||||
|
{
|
||||||
|
d->dns2 = dns2;
|
||||||
|
}
|
||||||
|
|
||||||
|
QString ModemManager::IpConfig::dns3() const
|
||||||
|
{
|
||||||
|
return d->dns3;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ModemManager::IpConfig::setDns3(const QString &dns3)
|
||||||
|
{
|
||||||
|
d->dns3 = dns3;
|
||||||
|
}
|
||||||
|
|
||||||
|
QString ModemManager::IpConfig::gateway() const
|
||||||
|
{
|
||||||
|
return d->gateway;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ModemManager::IpConfig::setGateway(const QString &gateway)
|
||||||
|
{
|
||||||
|
d->gateway = gateway;
|
||||||
|
}
|
||||||
|
|
||||||
|
ModemManager::IpConfig &ModemManager::IpConfig::operator=(const ModemManager::IpConfig &other)
|
||||||
|
{
|
||||||
|
if (this == &other) {
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
*d = *other.d;
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
ModemManager::BearerPrivate::BearerPrivate(const QString &path, Bearer *q)
|
||||||
|
#ifdef MMQT_STATIC
|
||||||
|
: bearerIface(QLatin1String(MMQT_DBUS_SERVICE), path, QDBusConnection::sessionBus())
|
||||||
|
#else
|
||||||
|
: bearerIface(QLatin1String(MMQT_DBUS_SERVICE), path, QDBusConnection::systemBus())
|
||||||
|
#endif
|
||||||
|
, uni(path)
|
||||||
|
, q_ptr(q)
|
||||||
|
{
|
||||||
|
if (bearerIface.isValid()) {
|
||||||
|
bearerInterface = bearerIface.interface();
|
||||||
|
isConnected = bearerIface.connected();
|
||||||
|
isSuspended = bearerIface.suspended();
|
||||||
|
ipv4Config = ipConfigFromMap(bearerIface.ip4Config());
|
||||||
|
ipv6Config = ipConfigFromMap(bearerIface.ip6Config());
|
||||||
|
ipTimeout = bearerIface.ipTimeout();
|
||||||
|
bearerProperties = bearerIface.properties();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ModemManager::Bearer::Bearer(const QString &path, QObject *parent)
|
||||||
|
: QObject(parent)
|
||||||
|
, d_ptr(new BearerPrivate(path, this))
|
||||||
|
{
|
||||||
|
Q_D(Bearer);
|
||||||
|
|
||||||
|
#ifdef MMQT_STATIC
|
||||||
|
QDBusConnection::sessionBus().connect(QLatin1String(MMQT_DBUS_SERVICE),
|
||||||
|
path,
|
||||||
|
DBUS_INTERFACE_PROPS,
|
||||||
|
QStringLiteral("PropertiesChanged"),
|
||||||
|
d,
|
||||||
|
SLOT(onPropertiesChanged(QString, QVariantMap, QStringList)));
|
||||||
|
#else
|
||||||
|
QDBusConnection::systemBus().connect(QLatin1String(MMQT_DBUS_SERVICE),
|
||||||
|
path,
|
||||||
|
DBUS_INTERFACE_PROPS,
|
||||||
|
QStringLiteral("PropertiesChanged"),
|
||||||
|
d,
|
||||||
|
SLOT(onPropertiesChanged(QString, QVariantMap, QStringList)));
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
ModemManager::Bearer::~Bearer()
|
||||||
|
{
|
||||||
|
delete d_ptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
QString ModemManager::Bearer::interface() const
|
||||||
|
{
|
||||||
|
Q_D(const Bearer);
|
||||||
|
return d->bearerInterface;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ModemManager::Bearer::isConnected() const
|
||||||
|
{
|
||||||
|
Q_D(const Bearer);
|
||||||
|
return d->isConnected;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ModemManager::Bearer::isSuspended() const
|
||||||
|
{
|
||||||
|
Q_D(const Bearer);
|
||||||
|
return d->isSuspended;
|
||||||
|
}
|
||||||
|
|
||||||
|
ModemManager::IpConfig ModemManager::Bearer::ip4Config() const
|
||||||
|
{
|
||||||
|
Q_D(const Bearer);
|
||||||
|
return d->ipv4Config;
|
||||||
|
}
|
||||||
|
|
||||||
|
ModemManager::IpConfig ModemManager::Bearer::ip6Config() const
|
||||||
|
{
|
||||||
|
Q_D(const Bearer);
|
||||||
|
return d->ipv6Config;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint ModemManager::Bearer::ipTimeout() const
|
||||||
|
{
|
||||||
|
Q_D(const Bearer);
|
||||||
|
return d->ipTimeout;
|
||||||
|
}
|
||||||
|
|
||||||
|
QVariantMap ModemManager::Bearer::properties() const
|
||||||
|
{
|
||||||
|
Q_D(const Bearer);
|
||||||
|
return d->bearerProperties;
|
||||||
|
}
|
||||||
|
|
||||||
|
QDBusPendingReply<void> ModemManager::Bearer::connectBearer()
|
||||||
|
{
|
||||||
|
Q_D(Bearer);
|
||||||
|
return d->bearerIface.Connect();
|
||||||
|
}
|
||||||
|
|
||||||
|
QDBusPendingReply<void> ModemManager::Bearer::disconnectBearer()
|
||||||
|
{
|
||||||
|
Q_D(Bearer);
|
||||||
|
return d->bearerIface.Disconnect();
|
||||||
|
}
|
||||||
|
|
||||||
|
void ModemManager::Bearer::setTimeout(int timeout)
|
||||||
|
{
|
||||||
|
Q_D(Bearer);
|
||||||
|
d->bearerIface.setTimeout(timeout);
|
||||||
|
}
|
||||||
|
|
||||||
|
int ModemManager::Bearer::timeout() const
|
||||||
|
{
|
||||||
|
Q_D(const Bearer);
|
||||||
|
return d->bearerIface.timeout();
|
||||||
|
}
|
||||||
|
|
||||||
|
ModemManager::IpConfig ModemManager::BearerPrivate::ipConfigFromMap(const QVariantMap &map)
|
||||||
|
{
|
||||||
|
ModemManager::IpConfig result;
|
||||||
|
result.setMethod((MMBearerIpMethod)map.value(QStringLiteral("method")).toUInt());
|
||||||
|
|
||||||
|
if (result.method() == MM_BEARER_IP_METHOD_STATIC) {
|
||||||
|
result.setAddress(map.value(QStringLiteral("address")).toString());
|
||||||
|
result.setPrefix(map.value(QStringLiteral("prefix")).toUInt());
|
||||||
|
result.setDns1(map.value(QStringLiteral("dns1")).toString());
|
||||||
|
result.setDns2(map.value(QStringLiteral("dns2")).toString());
|
||||||
|
result.setDns3(map.value(QStringLiteral("dns3")).toString());
|
||||||
|
result.setGateway(map.value(QStringLiteral("gateway")).toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ModemManager::BearerPrivate::onPropertiesChanged(const QString &interface, const QVariantMap &properties, const QStringList &invalidatedProps)
|
||||||
|
{
|
||||||
|
Q_Q(Bearer);
|
||||||
|
Q_UNUSED(invalidatedProps);
|
||||||
|
qCDebug(MMQT) << interface << properties.keys();
|
||||||
|
|
||||||
|
if (interface == QLatin1String(MMQT_DBUS_INTERFACE_BEARER)) {
|
||||||
|
QVariantMap::const_iterator it = properties.constFind(QLatin1String(MM_BEARER_PROPERTY_INTERFACE));
|
||||||
|
if (it != properties.constEnd()) {
|
||||||
|
bearerInterface = it->toString();
|
||||||
|
Q_EMIT q->interfaceChanged(bearerInterface);
|
||||||
|
}
|
||||||
|
it = properties.constFind(QLatin1String(MM_BEARER_PROPERTY_CONNECTED));
|
||||||
|
if (it != properties.constEnd()) {
|
||||||
|
isConnected = it->toBool();
|
||||||
|
Q_EMIT q->connectedChanged(isConnected);
|
||||||
|
}
|
||||||
|
it = properties.constFind(QLatin1String(MM_BEARER_PROPERTY_SUSPENDED));
|
||||||
|
if (it != properties.constEnd()) {
|
||||||
|
isSuspended = it->toBool();
|
||||||
|
Q_EMIT q->suspendedChanged(isSuspended);
|
||||||
|
}
|
||||||
|
it = properties.constFind(QLatin1String(MM_BEARER_PROPERTY_IP4CONFIG));
|
||||||
|
if (it != properties.constEnd()) {
|
||||||
|
ipv4Config = ipConfigFromMap(qdbus_cast<QVariantMap>(*it));
|
||||||
|
Q_EMIT q->ip4ConfigChanged(ipv4Config);
|
||||||
|
}
|
||||||
|
it = properties.constFind(QLatin1String(MM_BEARER_PROPERTY_IP6CONFIG));
|
||||||
|
if (it != properties.constEnd()) {
|
||||||
|
ipv6Config = ipConfigFromMap(qdbus_cast<QVariantMap>(*it));
|
||||||
|
Q_EMIT q->ip6ConfigChanged(ipv6Config);
|
||||||
|
}
|
||||||
|
it = properties.constFind(QLatin1String(MM_BEARER_PROPERTY_IPTIMEOUT));
|
||||||
|
if (it != properties.constEnd()) {
|
||||||
|
ipTimeout = it->toUInt();
|
||||||
|
Q_EMIT q->ipTimeoutChanged(ipTimeout);
|
||||||
|
}
|
||||||
|
it = properties.constFind(QLatin1String(MM_BEARER_PROPERTY_PROPERTIES));
|
||||||
|
if (it != properties.constEnd()) {
|
||||||
|
bearerProperties = qdbus_cast<QVariantMap>(*it);
|
||||||
|
Q_EMIT q->propertiesChanged(bearerProperties);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
QString ModemManager::Bearer::uni() const
|
||||||
|
{
|
||||||
|
Q_D(const Bearer);
|
||||||
|
return d->uni;
|
||||||
|
}
|
|
@ -0,0 +1,247 @@
|
||||||
|
/*
|
||||||
|
SPDX-FileCopyrightText: 2013 Lukas Tinkl <ltinkl@redhat.com>
|
||||||
|
SPDX-FileCopyrightText: 2013-2015 Jan Grulich <jgrulich@redhat.com>
|
||||||
|
|
||||||
|
SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef MODEMMANAGERQT_BEARER_H
|
||||||
|
#define MODEMMANAGERQT_BEARER_H
|
||||||
|
|
||||||
|
#include <modemmanagerqt_export.h>
|
||||||
|
|
||||||
|
#include <QObject>
|
||||||
|
#include <QSharedPointer>
|
||||||
|
|
||||||
|
#include "generictypes.h"
|
||||||
|
|
||||||
|
namespace ModemManager
|
||||||
|
{
|
||||||
|
class BearerPrivate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This class represents IP configuration
|
||||||
|
*/
|
||||||
|
class MODEMMANAGERQT_EXPORT IpConfig
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
/**
|
||||||
|
* Constructs an empty IP config object
|
||||||
|
*/
|
||||||
|
IpConfig();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Destroys this IpConfig object.
|
||||||
|
*/
|
||||||
|
~IpConfig();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructs an IpConfig object that is a copy of the object @p other.
|
||||||
|
*/
|
||||||
|
IpConfig(const IpConfig &other);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the MMBearerIpMethod
|
||||||
|
*/
|
||||||
|
MMBearerIpMethod method() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the MMBearerIpMethod
|
||||||
|
*/
|
||||||
|
void setMethod(MMBearerIpMethod method);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the IP address
|
||||||
|
*/
|
||||||
|
QString address() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the IP address
|
||||||
|
*/
|
||||||
|
void setAddress(const QString &address);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the numeric CIDR network prefix (ie, 24, 32, etc)
|
||||||
|
*/
|
||||||
|
uint prefix() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the numeric CIDR network prefix
|
||||||
|
*/
|
||||||
|
void setPrefix(uint prefix);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the IP address of the first DNS server
|
||||||
|
*/
|
||||||
|
QString dns1() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the IP address of the first DNS server
|
||||||
|
*/
|
||||||
|
void setDns1(const QString &dns1);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the IP address of the second DNS server
|
||||||
|
*/
|
||||||
|
QString dns2() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the IP address of the second DNS server
|
||||||
|
*/
|
||||||
|
void setDns2(const QString &dns2);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the IP address of the third DNS server
|
||||||
|
*/
|
||||||
|
QString dns3() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the IP address of the third DNS server
|
||||||
|
*/
|
||||||
|
void setDns3(const QString &dns3);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the IP address of the default gateway
|
||||||
|
*/
|
||||||
|
QString gateway() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the IP address of the default gateway
|
||||||
|
*/
|
||||||
|
void setGateway(const QString &gateway);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Makes a copy of the IpConfig object @p other.
|
||||||
|
*/
|
||||||
|
IpConfig &operator=(const IpConfig &other);
|
||||||
|
|
||||||
|
private:
|
||||||
|
class Private;
|
||||||
|
Private *const d;
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief The Bearer class
|
||||||
|
*
|
||||||
|
* This class provides access to specific actions that may be performed on available bearers.
|
||||||
|
*/
|
||||||
|
class MODEMMANAGERQT_EXPORT Bearer : public QObject
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
typedef QSharedPointer<Bearer> Ptr;
|
||||||
|
typedef QList<Ptr> List;
|
||||||
|
|
||||||
|
explicit Bearer(const QString &path, QObject *parent = nullptr);
|
||||||
|
~Bearer() override;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the operating system name for the network data interface that
|
||||||
|
* provides packet data using this bearer.
|
||||||
|
*
|
||||||
|
* Connection managers must configure this interface depending on the IP
|
||||||
|
* "method" given by the ip4Config() or ip6Config() properties set by bearer
|
||||||
|
* activation.
|
||||||
|
*
|
||||||
|
* If MM_BEARER_IP_METHOD_STATIC or MM_BEARER_IP_METHOD_DHCP methods are
|
||||||
|
* given, the interface will be an ethernet-style interface suitable for DHCP
|
||||||
|
* or setting static IP configuration on, while if the
|
||||||
|
* MM_BEARER_IP_METHOD_PPP method is given, the interface will be a serial
|
||||||
|
* TTY which must then have PPP run over it.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
QString interface() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return whether or not the bearer is connected and thus whether packet
|
||||||
|
* data communication using this bearer is possible.
|
||||||
|
*/
|
||||||
|
bool isConnected() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* In some devices, packet data service will be suspended while the device
|
||||||
|
* is handling other communication, like a voice call. If packet data
|
||||||
|
* service is suspended (but not deactivated) this property will be @p true
|
||||||
|
*/
|
||||||
|
bool isSuspended() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If the bearer was configured for IPv4 addressing, upon activation
|
||||||
|
* this property contains the addressing details for assignment to the data
|
||||||
|
* interface.
|
||||||
|
*/
|
||||||
|
IpConfig ip4Config() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* If the bearer was configured for IPv6 addressing, upon activation this
|
||||||
|
* property contains the addressing details for assignment to the data
|
||||||
|
* interface.
|
||||||
|
*/
|
||||||
|
IpConfig ip6Config() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return maximum time to wait for a successful IP establishment, when PPP is used.
|
||||||
|
*/
|
||||||
|
uint ipTimeout() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return map of properties used when creating the bearer
|
||||||
|
* @see IpConfig
|
||||||
|
*/
|
||||||
|
QVariantMap properties() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Requests activation of a packet data connection with the network using
|
||||||
|
* this bearer's properties. Upon successful activation, the modem can send
|
||||||
|
* and receive packet data and, depending on the addressing capability of
|
||||||
|
* the modem, a connection manager may need to start PPP, perform DHCP, or
|
||||||
|
* assign the IP address returned by the modem to the data interface. Upon
|
||||||
|
* successful return, the ip4Config() and/or ip6Config() properties become
|
||||||
|
* valid and may contain IP configuration information for the data interface
|
||||||
|
* associated with this bearer.
|
||||||
|
*/
|
||||||
|
QDBusPendingReply<void> connectBearer();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Disconnect and deactivate this packet data connection.
|
||||||
|
*
|
||||||
|
* Any ongoing data session will be terminated and IP addresses become invalid when this method is called.
|
||||||
|
*/
|
||||||
|
QDBusPendingReply<void> disconnectBearer();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the timeout in milliseconds for all async method DBus calls.
|
||||||
|
* -1 means the default DBus timeout (usually 25 seconds).
|
||||||
|
*/
|
||||||
|
void setTimeout(int timeout);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the current value of the DBus timeout in milliseconds.
|
||||||
|
* -1 means the default DBus timeout (usually 25 seconds).
|
||||||
|
*/
|
||||||
|
int timeout() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the DBUS path (uni) to the object
|
||||||
|
*/
|
||||||
|
QString uni() const;
|
||||||
|
|
||||||
|
Q_SIGNALS:
|
||||||
|
void interfaceChanged(const QString &iface);
|
||||||
|
void connectedChanged(bool connected);
|
||||||
|
void suspendedChanged(bool suspended);
|
||||||
|
void ip4ConfigChanged(const ModemManager::IpConfig &ipv4Config);
|
||||||
|
void ip6ConfigChanged(const ModemManager::IpConfig &ipv6Config);
|
||||||
|
void ipTimeoutChanged(uint ipTimeout);
|
||||||
|
void propertiesChanged(const QVariantMap &properties);
|
||||||
|
|
||||||
|
private:
|
||||||
|
Q_DECLARE_PRIVATE(Bearer)
|
||||||
|
BearerPrivate *const d_ptr;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace ModemManager
|
||||||
|
|
||||||
|
Q_DECLARE_METATYPE(ModemManager::IpConfig)
|
||||||
|
|
||||||
|
#endif
|
|
@ -0,0 +1,42 @@
|
||||||
|
/*
|
||||||
|
SPDX-FileCopyrightText: 2013 Lukas Tinkl <ltinkl@redhat.com>
|
||||||
|
SPDX-FileCopyrightText: 2013-2015 Jan Grulich <jgrulich@redhat.com>
|
||||||
|
|
||||||
|
SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef MODEMMANAGERQT_BEARER_P_H
|
||||||
|
#define MODEMMANAGERQT_BEARER_P_H
|
||||||
|
|
||||||
|
#include "bearer.h"
|
||||||
|
#include "dbus/bearerinterface.h"
|
||||||
|
|
||||||
|
namespace ModemManager
|
||||||
|
{
|
||||||
|
class BearerPrivate : public QObject
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
explicit BearerPrivate(const QString &path, Bearer *q);
|
||||||
|
|
||||||
|
OrgFreedesktopModemManager1BearerInterface bearerIface;
|
||||||
|
QString uni;
|
||||||
|
QString bearerInterface;
|
||||||
|
bool isConnected;
|
||||||
|
bool isSuspended;
|
||||||
|
mutable ModemManager::IpConfig ipv4Config;
|
||||||
|
mutable ModemManager::IpConfig ipv6Config;
|
||||||
|
uint ipTimeout;
|
||||||
|
QVariantMap bearerProperties;
|
||||||
|
|
||||||
|
ModemManager::IpConfig ipConfigFromMap(const QVariantMap &map);
|
||||||
|
|
||||||
|
Q_DECLARE_PUBLIC(Bearer)
|
||||||
|
Bearer *q_ptr;
|
||||||
|
private Q_SLOTS:
|
||||||
|
void onPropertiesChanged(const QString &interface, const QVariantMap &properties, const QStringList &invalidatedProps);
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace ModemManager
|
||||||
|
|
||||||
|
#endif // MODEMMANAGERQT_BEARER_P_H
|
|
@ -0,0 +1,165 @@
|
||||||
|
/*
|
||||||
|
SPDX-FileCopyrightText: 2018 Aleksander Morgado <aleksander@aleksander.es>
|
||||||
|
|
||||||
|
SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "call.h"
|
||||||
|
#include "call_p.h"
|
||||||
|
#include "mmdebug_p.h"
|
||||||
|
|
||||||
|
#ifdef MMQT_STATIC
|
||||||
|
#include "dbus/fakedbus.h"
|
||||||
|
#else
|
||||||
|
#include "dbus/dbus.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <ModemManager/ModemManager.h>
|
||||||
|
|
||||||
|
ModemManager::CallPrivate::CallPrivate(const QString &path, Call *q)
|
||||||
|
#ifdef MMQT_STATIC
|
||||||
|
: callIface(QLatin1String(MMQT_DBUS_SERVICE), path, QDBusConnection::sessionBus())
|
||||||
|
#else
|
||||||
|
: callIface(QLatin1String(MMQT_DBUS_SERVICE), path, QDBusConnection::systemBus())
|
||||||
|
#endif
|
||||||
|
, q_ptr(q)
|
||||||
|
{
|
||||||
|
if (callIface.isValid()) {
|
||||||
|
uni = path;
|
||||||
|
state = (MMCallState)callIface.state();
|
||||||
|
stateReason = (MMCallStateReason)callIface.stateReason();
|
||||||
|
direction = (MMCallDirection)callIface.direction();
|
||||||
|
number = callIface.number();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ModemManager::Call::Call(const QString &path, QObject *parent)
|
||||||
|
: QObject(parent)
|
||||||
|
, d_ptr(new CallPrivate(path, this))
|
||||||
|
{
|
||||||
|
Q_D(Call);
|
||||||
|
|
||||||
|
qRegisterMetaType<MMCallState>();
|
||||||
|
qRegisterMetaType<MMCallStateReason>();
|
||||||
|
qRegisterMetaType<MMCallDirection>();
|
||||||
|
|
||||||
|
#ifdef MMQT_STATIC
|
||||||
|
QDBusConnection::sessionBus().connect(QLatin1String(MMQT_DBUS_SERVICE),
|
||||||
|
path,
|
||||||
|
QLatin1String(DBUS_INTERFACE_PROPS),
|
||||||
|
QStringLiteral("PropertiesChanged"),
|
||||||
|
d,
|
||||||
|
SLOT(onPropertiesChanged(QString, QVariantMap, QStringList)));
|
||||||
|
#else
|
||||||
|
QDBusConnection::systemBus().connect(QLatin1String(MMQT_DBUS_SERVICE),
|
||||||
|
path,
|
||||||
|
QLatin1String(DBUS_INTERFACE_PROPS),
|
||||||
|
QStringLiteral("PropertiesChanged"),
|
||||||
|
d,
|
||||||
|
SLOT(onPropertiesChanged(QString, QVariantMap, QStringList)));
|
||||||
|
#endif
|
||||||
|
|
||||||
|
connect(&d->callIface, &OrgFreedesktopModemManager1CallInterface::StateChanged, d, &CallPrivate::onStateChanged);
|
||||||
|
connect(&d->callIface, &OrgFreedesktopModemManager1CallInterface::DtmfReceived, d, &CallPrivate::onDtmfReceived);
|
||||||
|
}
|
||||||
|
|
||||||
|
ModemManager::Call::~Call()
|
||||||
|
{
|
||||||
|
delete d_ptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
QString ModemManager::Call::uni() const
|
||||||
|
{
|
||||||
|
Q_D(const Call);
|
||||||
|
return d->uni;
|
||||||
|
}
|
||||||
|
|
||||||
|
QDBusPendingReply<> ModemManager::Call::start()
|
||||||
|
{
|
||||||
|
Q_D(Call);
|
||||||
|
return d->callIface.Start();
|
||||||
|
}
|
||||||
|
|
||||||
|
QDBusPendingReply<> ModemManager::Call::accept()
|
||||||
|
{
|
||||||
|
Q_D(Call);
|
||||||
|
return d->callIface.Accept();
|
||||||
|
}
|
||||||
|
|
||||||
|
QDBusPendingReply<> ModemManager::Call::hangup()
|
||||||
|
{
|
||||||
|
Q_D(Call);
|
||||||
|
return d->callIface.Hangup();
|
||||||
|
}
|
||||||
|
|
||||||
|
QDBusPendingReply<> ModemManager::Call::sendDtmf(const QString &dtmf)
|
||||||
|
{
|
||||||
|
Q_D(Call);
|
||||||
|
return d->callIface.SendDtmf(dtmf);
|
||||||
|
}
|
||||||
|
|
||||||
|
MMCallState ModemManager::Call::state() const
|
||||||
|
{
|
||||||
|
Q_D(const Call);
|
||||||
|
return d->state;
|
||||||
|
}
|
||||||
|
|
||||||
|
MMCallStateReason ModemManager::Call::stateReason() const
|
||||||
|
{
|
||||||
|
Q_D(const Call);
|
||||||
|
return d->stateReason;
|
||||||
|
}
|
||||||
|
|
||||||
|
MMCallDirection ModemManager::Call::direction() const
|
||||||
|
{
|
||||||
|
Q_D(const Call);
|
||||||
|
return d->direction;
|
||||||
|
}
|
||||||
|
|
||||||
|
QString ModemManager::Call::number() const
|
||||||
|
{
|
||||||
|
Q_D(const Call);
|
||||||
|
return d->number;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ModemManager::Call::setTimeout(int timeout)
|
||||||
|
{
|
||||||
|
Q_D(Call);
|
||||||
|
d->callIface.setTimeout(timeout);
|
||||||
|
}
|
||||||
|
|
||||||
|
int ModemManager::Call::timeout() const
|
||||||
|
{
|
||||||
|
Q_D(const Call);
|
||||||
|
return d->callIface.timeout();
|
||||||
|
}
|
||||||
|
|
||||||
|
void ModemManager::CallPrivate::onStateChanged(int oldState, int newState, uint reason)
|
||||||
|
{
|
||||||
|
Q_Q(Call);
|
||||||
|
state = (MMCallState)newState;
|
||||||
|
stateReason = (MMCallStateReason)reason;
|
||||||
|
Q_EMIT q->stateChanged((MMCallState)oldState, (MMCallState)newState, (MMCallStateReason)reason);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ModemManager::CallPrivate::onDtmfReceived(const QString &dtmf)
|
||||||
|
{
|
||||||
|
Q_Q(Call);
|
||||||
|
Q_EMIT q->dtmfReceived(dtmf);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ModemManager::CallPrivate::onPropertiesChanged(const QString &interfaceName,
|
||||||
|
const QVariantMap &changedProperties,
|
||||||
|
const QStringList &invalidatedProperties)
|
||||||
|
{
|
||||||
|
Q_UNUSED(invalidatedProperties);
|
||||||
|
Q_Q(Call);
|
||||||
|
|
||||||
|
if (interfaceName == QLatin1String(MMQT_DBUS_INTERFACE_CALL)) {
|
||||||
|
QVariantMap::const_iterator it = changedProperties.constFind(QLatin1String(MM_CALL_PROPERTY_NUMBER));
|
||||||
|
if (it != changedProperties.constEnd()) {
|
||||||
|
number = it->toString();
|
||||||
|
Q_EMIT q->numberChanged(number);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,105 @@
|
||||||
|
/*
|
||||||
|
SPDX-FileCopyrightText: 2018 Aleksander Morgado <aleksander@aleksander.es>
|
||||||
|
|
||||||
|
SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef MODEMMANAGERQT_CALL_H
|
||||||
|
#define MODEMMANAGERQT_CALL_H
|
||||||
|
|
||||||
|
#include <modemmanagerqt_export.h>
|
||||||
|
|
||||||
|
#include <QDBusPendingReply>
|
||||||
|
#include <QObject>
|
||||||
|
#include <QSharedPointer>
|
||||||
|
|
||||||
|
#include "generictypes.h"
|
||||||
|
|
||||||
|
namespace ModemManager
|
||||||
|
{
|
||||||
|
class CallPrivate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Provides an interface to manipulate and control a call
|
||||||
|
*
|
||||||
|
* Note: MMCallState, MMCallStateReason and MMCallDirection enums are defined in <ModemManager/ModemManager-enums.h>
|
||||||
|
* See http://www.freedesktop.org/software/ModemManager/api/latest/ModemManager-Flags-and-Enumerations.html
|
||||||
|
*/
|
||||||
|
class MODEMMANAGERQT_EXPORT Call : public QObject
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
Q_DECLARE_PRIVATE(Call)
|
||||||
|
|
||||||
|
public:
|
||||||
|
typedef QSharedPointer<Call> Ptr;
|
||||||
|
typedef QList<Ptr> List;
|
||||||
|
|
||||||
|
explicit Call(const QString &path, QObject *parent = nullptr);
|
||||||
|
~Call() override;
|
||||||
|
|
||||||
|
QString uni() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Start a call
|
||||||
|
*/
|
||||||
|
QDBusPendingReply<> start();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Accept a call
|
||||||
|
*/
|
||||||
|
QDBusPendingReply<> accept();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Hangup a call
|
||||||
|
*/
|
||||||
|
QDBusPendingReply<> hangup();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Send DTMF
|
||||||
|
*/
|
||||||
|
QDBusPendingReply<> sendDtmf(const QString &dtmf);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This method returns the state of the call
|
||||||
|
*/
|
||||||
|
MMCallState state() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This method returns the reason for the call state change
|
||||||
|
*/
|
||||||
|
MMCallStateReason stateReason() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This method returns the direction of the call
|
||||||
|
*/
|
||||||
|
MMCallDirection direction() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This method returns the remote phone number
|
||||||
|
*/
|
||||||
|
QString number() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the timeout in milliseconds for all async method DBus calls.
|
||||||
|
* -1 means the default DBus timeout (usually 25 seconds).
|
||||||
|
*/
|
||||||
|
void setTimeout(int timeout);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the current value of the DBus timeout in milliseconds.
|
||||||
|
* -1 means the default DBus timeout (usually 25 seconds).
|
||||||
|
*/
|
||||||
|
int timeout() const;
|
||||||
|
|
||||||
|
Q_SIGNALS:
|
||||||
|
void stateChanged(MMCallState oldState, MMCallState newState, MMCallStateReason reason);
|
||||||
|
void numberChanged(const QString &number);
|
||||||
|
void dtmfReceived(const QString &dtmf);
|
||||||
|
|
||||||
|
private:
|
||||||
|
CallPrivate *const d_ptr;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace ModemManager
|
||||||
|
|
||||||
|
#endif
|
|
@ -0,0 +1,38 @@
|
||||||
|
/*
|
||||||
|
SPDX-FileCopyrightText: 2018 Aleksander Morgado <aleksander@aleksander.es>
|
||||||
|
|
||||||
|
SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef MODEMMANAGER_CALL_P_H
|
||||||
|
#define MODEMMANAGER_CALL_P_H
|
||||||
|
|
||||||
|
#include "call.h"
|
||||||
|
#include "dbus/callinterface.h"
|
||||||
|
|
||||||
|
namespace ModemManager
|
||||||
|
{
|
||||||
|
class CallPrivate : public QObject
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
explicit CallPrivate(const QString &path, Call *q);
|
||||||
|
OrgFreedesktopModemManager1CallInterface callIface;
|
||||||
|
|
||||||
|
QString uni;
|
||||||
|
MMCallState state;
|
||||||
|
MMCallStateReason stateReason;
|
||||||
|
MMCallDirection direction;
|
||||||
|
QString number;
|
||||||
|
|
||||||
|
Q_DECLARE_PUBLIC(Call)
|
||||||
|
Call *q_ptr;
|
||||||
|
private Q_SLOTS:
|
||||||
|
void onPropertiesChanged(const QString &interface, const QVariantMap &properties, const QStringList &invalidatedProps);
|
||||||
|
void onStateChanged(int oldState, int newState, uint reason);
|
||||||
|
void onDtmfReceived(const QString &dtmf);
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace ModemManager
|
||||||
|
|
||||||
|
#endif
|
|
@ -0,0 +1,47 @@
|
||||||
|
find_package(Qt4 REQUIRED)
|
||||||
|
|
||||||
|
add_definitions(${QT_DEFINITIONS})
|
||||||
|
set( INTERFACE_INTROSPECTION_XML_FILES
|
||||||
|
introspection/org.freedesktop.ModemManager1.Call.xml
|
||||||
|
introspection/org.freedesktop.ModemManager1.Bearer.xml
|
||||||
|
introspection/org.freedesktop.ModemManager1.Modem.Firmware.xml
|
||||||
|
introspection/org.freedesktop.ModemManager1.Modem.Location.xml
|
||||||
|
introspection/org.freedesktop.ModemManager1.Modem.Messaging.xml
|
||||||
|
introspection/org.freedesktop.ModemManager1.Modem.Modem3gpp.Ussd.xml
|
||||||
|
introspection/org.freedesktop.ModemManager1.Modem.Modem3gpp.xml
|
||||||
|
introspection/org.freedesktop.ModemManager1.Modem.ModemCdma.xml
|
||||||
|
introspection/org.freedesktop.ModemManager1.Modem.Oma.xml
|
||||||
|
introspection/org.freedesktop.ModemManager1.Modem.Signal.xml
|
||||||
|
introspection/org.freedesktop.ModemManager1.Modem.Simple.xml
|
||||||
|
introspection/org.freedesktop.ModemManager1.Modem.Time.xml
|
||||||
|
introspection/org.freedesktop.ModemManager1.Modem.Voice.xml
|
||||||
|
introspection/org.freedesktop.ModemManager1.Modem.xml
|
||||||
|
introspection/org.freedesktop.ModemManager1.Sim.xml
|
||||||
|
introspection/org.freedesktop.ModemManager1.Sms.xml
|
||||||
|
introspection/org.freedesktop.ModemManager1.xml
|
||||||
|
# introspection/wip-org.freedesktop.ModemManager1.Modem.Contacts.xml
|
||||||
|
)
|
||||||
|
|
||||||
|
set( ADAPTER_INTROSPECTION_XML_FILES
|
||||||
|
)
|
||||||
|
|
||||||
|
set_property( SOURCE ${INTERFACE_INTROSPECTION_XML_FILES} PROPERTY INCLUDE generictypes.h)
|
||||||
|
set_source_files_properties( ${INTERFACE_INTROSPECTION_XML_FILES} ${ADAPTER_INTROSPECTION_XML_FILES} PROPERTIES NO_NAMESPACE TRUE )
|
||||||
|
|
||||||
|
set( UNUSED_XML
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
set( FILES_TO_BUILD
|
||||||
|
)
|
||||||
|
set ( UNUSED_FILES
|
||||||
|
)
|
||||||
|
|
||||||
|
set( UNUSED_GENERATED_FILES
|
||||||
|
)
|
||||||
|
|
||||||
|
QT4_ADD_DBUS_INTERFACES( FILES_TO_BUILD ${INTERFACE_INTROSPECTION_XML_FILES} )
|
||||||
|
|
||||||
|
add_library(modemmanagerdbus ${FILES_TO_BUILD})
|
||||||
|
|
||||||
|
TARGET_LINK_LIBRARIES(modemmanagerdbus ${QT_QTCORE_LIBRARY} ${QT_QTDBUS_LIBRARY})
|
|
@ -0,0 +1,29 @@
|
||||||
|
/*
|
||||||
|
* This file was generated by qdbusxml2cpp version 0.7
|
||||||
|
* Command line was: qdbusxml2cpp -N -m -i generictypes.h -p bearerinterface \
|
||||||
|
* /home/jgrulich/development/projects/libmm-qt/dbus/introspection/org.freedesktop.ModemManager1.Bearer.xml
|
||||||
|
*
|
||||||
|
* qdbusxml2cpp is Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
|
||||||
|
*
|
||||||
|
* This is an auto-generated file.
|
||||||
|
* This file may have been hand-edited. Look for HAND-EDIT comments
|
||||||
|
* before re-generating it.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "bearerinterface.h"
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Implementation of interface class OrgFreedesktopModemManager1BearerInterface
|
||||||
|
*/
|
||||||
|
|
||||||
|
OrgFreedesktopModemManager1BearerInterface::OrgFreedesktopModemManager1BearerInterface(const QString &service,
|
||||||
|
const QString &path,
|
||||||
|
const QDBusConnection &connection,
|
||||||
|
QObject *parent)
|
||||||
|
: QDBusAbstractInterface(service, path, staticInterfaceName(), connection, parent)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
OrgFreedesktopModemManager1BearerInterface::~OrgFreedesktopModemManager1BearerInterface()
|
||||||
|
{
|
||||||
|
}
|
|
@ -0,0 +1,101 @@
|
||||||
|
/*
|
||||||
|
* This file was generated by qdbusxml2cpp version 0.7
|
||||||
|
* Command line was: qdbusxml2cpp -N -m -i generictypes.h -p bearerinterface \
|
||||||
|
* /home/jgrulich/development/projects/libmm-qt/dbus/introspection/org.freedesktop.ModemManager1.Bearer.xml
|
||||||
|
*
|
||||||
|
* qdbusxml2cpp is Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
|
||||||
|
*
|
||||||
|
* This is an auto-generated file.
|
||||||
|
* Do not edit! All changes made to it will be lost.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef MODEMMANAGERQT_BEARERINTERFACE_H
|
||||||
|
#define MODEMMANAGERQT_BEARERINTERFACE_H
|
||||||
|
|
||||||
|
#include "generictypes.h"
|
||||||
|
#include <QList>
|
||||||
|
#include <QObject>
|
||||||
|
#include <QString>
|
||||||
|
#include <QVariant>
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Proxy class for interface org.freedesktop.ModemManager1.Bearer
|
||||||
|
*/
|
||||||
|
class OrgFreedesktopModemManager1BearerInterface : public QDBusAbstractInterface
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
static inline const char *staticInterfaceName()
|
||||||
|
#ifdef MMQT_STATIC
|
||||||
|
{
|
||||||
|
return "org.kde.fakemodem.Bearer";
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
{
|
||||||
|
return "org.freedesktop.ModemManager1.Bearer";
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
public:
|
||||||
|
OrgFreedesktopModemManager1BearerInterface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = nullptr);
|
||||||
|
|
||||||
|
~OrgFreedesktopModemManager1BearerInterface() override;
|
||||||
|
|
||||||
|
Q_PROPERTY(bool Connected READ connected)
|
||||||
|
inline bool connected() const
|
||||||
|
{
|
||||||
|
return qvariant_cast<bool>(property("Connected"));
|
||||||
|
}
|
||||||
|
|
||||||
|
Q_PROPERTY(QString Interface READ interface)
|
||||||
|
inline QString interface() const
|
||||||
|
{
|
||||||
|
return qvariant_cast<QString>(property("Interface"));
|
||||||
|
}
|
||||||
|
|
||||||
|
Q_PROPERTY(QVariantMap Ip4Config READ ip4Config)
|
||||||
|
inline QVariantMap ip4Config() const
|
||||||
|
{
|
||||||
|
return qvariant_cast<QVariantMap>(property("Ip4Config"));
|
||||||
|
}
|
||||||
|
|
||||||
|
Q_PROPERTY(QVariantMap Ip6Config READ ip6Config)
|
||||||
|
inline QVariantMap ip6Config() const
|
||||||
|
{
|
||||||
|
return qvariant_cast<QVariantMap>(property("Ip6Config"));
|
||||||
|
}
|
||||||
|
|
||||||
|
Q_PROPERTY(uint IpTimeout READ ipTimeout)
|
||||||
|
inline uint ipTimeout() const
|
||||||
|
{
|
||||||
|
return qvariant_cast<uint>(property("IpTimeout"));
|
||||||
|
}
|
||||||
|
|
||||||
|
Q_PROPERTY(QVariantMap Properties READ properties)
|
||||||
|
inline QVariantMap properties() const
|
||||||
|
{
|
||||||
|
return qvariant_cast<QVariantMap>(property("Properties"));
|
||||||
|
}
|
||||||
|
|
||||||
|
Q_PROPERTY(bool Suspended READ suspended)
|
||||||
|
inline bool suspended() const
|
||||||
|
{
|
||||||
|
return qvariant_cast<bool>(property("Suspended"));
|
||||||
|
}
|
||||||
|
|
||||||
|
public Q_SLOTS: // METHODS
|
||||||
|
inline QDBusPendingReply<> Connect()
|
||||||
|
{
|
||||||
|
QList<QVariant> argumentList;
|
||||||
|
return asyncCallWithArgumentList(QLatin1String("Connect"), argumentList);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline QDBusPendingReply<> Disconnect()
|
||||||
|
{
|
||||||
|
QList<QVariant> argumentList;
|
||||||
|
return asyncCallWithArgumentList(QLatin1String("Disconnect"), argumentList);
|
||||||
|
}
|
||||||
|
|
||||||
|
Q_SIGNALS: // SIGNALS
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
|
@ -0,0 +1,28 @@
|
||||||
|
/*
|
||||||
|
* This file was generated by qdbusxml2cpp version 0.8
|
||||||
|
* Command line was: qdbusxml2cpp -N -m -i generictypes.h -p callinterface ./introspection/org.freedesktop.ModemManager1.Call.xml
|
||||||
|
*
|
||||||
|
* qdbusxml2cpp is Copyright (C) 2017 The Qt Company Ltd.
|
||||||
|
*
|
||||||
|
* This is an auto-generated file.
|
||||||
|
* This file may have been hand-edited. Look for HAND-EDIT comments
|
||||||
|
* before re-generating it.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "callinterface.h"
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Implementation of interface class OrgFreedesktopModemManager1CallInterface
|
||||||
|
*/
|
||||||
|
|
||||||
|
OrgFreedesktopModemManager1CallInterface::OrgFreedesktopModemManager1CallInterface(const QString &service,
|
||||||
|
const QString &path,
|
||||||
|
const QDBusConnection &connection,
|
||||||
|
QObject *parent)
|
||||||
|
: QDBusAbstractInterface(service, path, staticInterfaceName(), connection, parent)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
OrgFreedesktopModemManager1CallInterface::~OrgFreedesktopModemManager1CallInterface()
|
||||||
|
{
|
||||||
|
}
|
|
@ -0,0 +1,92 @@
|
||||||
|
/*
|
||||||
|
* This file was generated by qdbusxml2cpp version 0.8
|
||||||
|
* Command line was: qdbusxml2cpp -N -m -i generictypes.h -p callinterface ./introspection/org.freedesktop.ModemManager1.Call.xml
|
||||||
|
*
|
||||||
|
* qdbusxml2cpp is Copyright (C) 2017 The Qt Company Ltd.
|
||||||
|
*
|
||||||
|
* This is an auto-generated file.
|
||||||
|
* Do not edit! All changes made to it will be lost.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef CALLINTERFACE_H
|
||||||
|
#define CALLINTERFACE_H
|
||||||
|
|
||||||
|
#include "generictypes.h"
|
||||||
|
#include <QList>
|
||||||
|
#include <QObject>
|
||||||
|
#include <QString>
|
||||||
|
#include <QVariant>
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Proxy class for interface org.freedesktop.ModemManager1.Call
|
||||||
|
*/
|
||||||
|
class OrgFreedesktopModemManager1CallInterface : public QDBusAbstractInterface
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
static inline const char *staticInterfaceName()
|
||||||
|
{
|
||||||
|
return "org.freedesktop.ModemManager1.Call";
|
||||||
|
}
|
||||||
|
|
||||||
|
public:
|
||||||
|
OrgFreedesktopModemManager1CallInterface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = nullptr);
|
||||||
|
|
||||||
|
~OrgFreedesktopModemManager1CallInterface() override;
|
||||||
|
|
||||||
|
Q_PROPERTY(int Direction READ direction)
|
||||||
|
inline int direction() const
|
||||||
|
{
|
||||||
|
return qvariant_cast<int>(property("Direction"));
|
||||||
|
}
|
||||||
|
|
||||||
|
Q_PROPERTY(QString Number READ number)
|
||||||
|
inline QString number() const
|
||||||
|
{
|
||||||
|
return qvariant_cast<QString>(property("Number"));
|
||||||
|
}
|
||||||
|
|
||||||
|
Q_PROPERTY(int State READ state)
|
||||||
|
inline int state() const
|
||||||
|
{
|
||||||
|
return qvariant_cast<int>(property("State"));
|
||||||
|
}
|
||||||
|
|
||||||
|
Q_PROPERTY(int StateReason READ stateReason)
|
||||||
|
inline int stateReason() const
|
||||||
|
{
|
||||||
|
return qvariant_cast<int>(property("StateReason"));
|
||||||
|
}
|
||||||
|
|
||||||
|
public Q_SLOTS: // METHODS
|
||||||
|
inline QDBusPendingReply<> Accept()
|
||||||
|
{
|
||||||
|
QList<QVariant> argumentList;
|
||||||
|
return asyncCallWithArgumentList(QStringLiteral("Accept"), argumentList);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline QDBusPendingReply<> Hangup()
|
||||||
|
{
|
||||||
|
QList<QVariant> argumentList;
|
||||||
|
return asyncCallWithArgumentList(QStringLiteral("Hangup"), argumentList);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline QDBusPendingReply<> SendDtmf(const QString &dtmf)
|
||||||
|
{
|
||||||
|
QList<QVariant> argumentList;
|
||||||
|
argumentList << QVariant::fromValue(dtmf);
|
||||||
|
return asyncCallWithArgumentList(QStringLiteral("SendDtmf"), argumentList);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline QDBusPendingReply<> Start()
|
||||||
|
{
|
||||||
|
QList<QVariant> argumentList;
|
||||||
|
return asyncCallWithArgumentList(QStringLiteral("Start"), argumentList);
|
||||||
|
}
|
||||||
|
|
||||||
|
Q_SIGNALS: // SIGNALS
|
||||||
|
void DtmfReceived(const QString &dtmf);
|
||||||
|
void StateChanged(int oldState, int newState, uint reason);
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
|
@ -0,0 +1,45 @@
|
||||||
|
/*
|
||||||
|
SPDX-FileCopyrightText: 2008 Will Stephenson <wstephenson@kde.org>
|
||||||
|
SPDX-FileCopyrightText: 2010 Lamarque Souza <lamarque@kde.org>
|
||||||
|
SPDX-FileCopyrightText: 2013 Lukas Tinkl <ltinkl@redhat.com>
|
||||||
|
SPDX-FileCopyrightText: 2013 Anant Kamath <kamathanant@gmail.com>
|
||||||
|
SPDX-FileCopyrightText: 2015 Jan Grulich <jgrulich@redhat.com>
|
||||||
|
|
||||||
|
SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef MODEMMANAGER_DBUS_H
|
||||||
|
#define MODEMMANAGER_DBUS_H
|
||||||
|
|
||||||
|
#define DBUS_INTERFACE_PROPS QLatin1String("org.freedesktop.DBus.Properties")
|
||||||
|
#define DBUS_INTERFACE_INTROSPECT QLatin1String("org.freedesktop.DBus.Introspectable")
|
||||||
|
#define DBUS_INTERFACE_MANAGER QLatin1String("org.freedesktop.DBus.ObjectManager")
|
||||||
|
|
||||||
|
#define MMQT_DBUS_SERVICE MM_DBUS_SERVICE
|
||||||
|
#define MMQT_DBUS_PATH MM_DBUS_PATH
|
||||||
|
/* Prefix for object paths */
|
||||||
|
#define MMQT_DBUS_MODEM_PREFIX MM_DBUS_PATH "/Modem"
|
||||||
|
#define MMQT_DBUS_BEARER_PREFIX MM_DBUS_PATH "/Bearer"
|
||||||
|
#define MMQT_DBUS_SIM_PREFIX MM_DBUS_PATH "/SIM"
|
||||||
|
#define MMQT_DBUS_SMS_PREFIX MM_DBUS_PATH "/SMS"
|
||||||
|
#define MMQT_DBUS_CALL_PREFIX MM_DBUS_PATH "/Call"
|
||||||
|
/* Interfaces */
|
||||||
|
#define MMQT_DBUS_INTERFACE MM_DBUS_INTERFACE
|
||||||
|
#define MMQT_DBUS_INTERFACE_SIM MM_DBUS_INTERFACE_SIM
|
||||||
|
#define MMQT_DBUS_INTERFACE_BEARER MM_DBUS_INTERFACE_BEARER
|
||||||
|
#define MMQT_DBUS_INTERFACE_SMS MM_DBUS_INTERFACE_SMS
|
||||||
|
#define MMQT_DBUS_INTERFACE_CALL MM_DBUS_INTERFACE_CALL
|
||||||
|
#define MMQT_DBUS_INTERFACE_MODEM MM_DBUS_INTERFACE_MODEM
|
||||||
|
#define MMQT_DBUS_INTERFACE_MODEM_SIMPLE "org.freedesktop.ModemManager1.Modem.Simple"
|
||||||
|
#define MMQT_DBUS_INTERFACE_MODEM_MODEM3GPP MM_DBUS_INTERFACE_MODEM_MODEM3GPP
|
||||||
|
#define MMQT_DBUS_INTERFACE_MODEM_MODEM3GPP_USSD MM_DBUS_INTERFACE_MODEM_MODEM3GPP_USSD
|
||||||
|
#define MMQT_DBUS_INTERFACE_MODEM_MODEMCDMA MM_DBUS_INTERFACE_MODEM_MODEMCDMA
|
||||||
|
#define MMQT_DBUS_INTERFACE_MODEM_MESSAGING MM_DBUS_INTERFACE_MODEM_MESSAGING
|
||||||
|
#define MMQT_DBUS_INTERFACE_MODEM_LOCATION MM_DBUS_INTERFACE_MODEM_LOCATION
|
||||||
|
#define MMQT_DBUS_INTERFACE_MODEM_TIME MM_DBUS_INTERFACE_MODEM_TIME
|
||||||
|
#define MMQT_DBUS_INTERFACE_MODEM_FIRMWARE MM_DBUS_INTERFACE_MODEM_FIRMWARE
|
||||||
|
#define MMQT_DBUS_INTERFACE_MODEM_SIGNAL MM_DBUS_INTERFACE_MODEM_SIGNAL
|
||||||
|
#define MMQT_DBUS_INTERFACE_MODEM_OMA MM_DBUS_INTERFACE_MODEM_OMA
|
||||||
|
#define MMQT_DBUS_INTERFACE_MODEM_VOICE MM_DBUS_INTERFACE_MODEM_VOICE
|
||||||
|
|
||||||
|
#endif
|
|
@ -0,0 +1,28 @@
|
||||||
|
/*
|
||||||
|
* This file was generated by qdbusxml2cpp version 0.7
|
||||||
|
* Command line was: qdbusxml2cpp -p dbus_manager manager.xml -N
|
||||||
|
*
|
||||||
|
* qdbusxml2cpp is Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
|
||||||
|
*
|
||||||
|
* This is an auto-generated file.
|
||||||
|
* This file may have been hand-edited. Look for HAND-EDIT comments
|
||||||
|
* before re-generating it.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "dbus_manager.h"
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Implementation of interface class OrgFreedesktopDBusObjectManagerInterface
|
||||||
|
*/
|
||||||
|
|
||||||
|
OrgFreedesktopDBusObjectManagerInterface::OrgFreedesktopDBusObjectManagerInterface(const QString &service,
|
||||||
|
const QString &path,
|
||||||
|
const QDBusConnection &connection,
|
||||||
|
QObject *parent)
|
||||||
|
: QDBusAbstractInterface(service, path, staticInterfaceName(), connection, parent)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
OrgFreedesktopDBusObjectManagerInterface::~OrgFreedesktopDBusObjectManagerInterface()
|
||||||
|
{
|
||||||
|
}
|
|
@ -0,0 +1,51 @@
|
||||||
|
/*
|
||||||
|
* This file was generated by qdbusxml2cpp version 0.7
|
||||||
|
* Command line was: qdbusxml2cpp -p dbus_manager manager.xml -N
|
||||||
|
*
|
||||||
|
* qdbusxml2cpp is Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
|
||||||
|
*
|
||||||
|
* This is an auto-generated file.
|
||||||
|
* Do not edit! All changes made to it will be lost.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef MODEMMANAGERQT_DBUS_MANAGER_H
|
||||||
|
#define MODEMMANAGERQT_DBUS_MANAGER_H
|
||||||
|
|
||||||
|
#include "generictypes.h"
|
||||||
|
#include "generictypes_p.h"
|
||||||
|
#include <QList>
|
||||||
|
#include <QObject>
|
||||||
|
#include <QString>
|
||||||
|
#include <QStringList>
|
||||||
|
#include <QVariant>
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Proxy class for interface org.freedesktop.DBus.ObjectManager
|
||||||
|
*/
|
||||||
|
class OrgFreedesktopDBusObjectManagerInterface : public QDBusAbstractInterface
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
static inline const char *staticInterfaceName()
|
||||||
|
{
|
||||||
|
return "org.freedesktop.DBus.ObjectManager";
|
||||||
|
}
|
||||||
|
|
||||||
|
public:
|
||||||
|
OrgFreedesktopDBusObjectManagerInterface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = nullptr);
|
||||||
|
|
||||||
|
~OrgFreedesktopDBusObjectManagerInterface() override;
|
||||||
|
|
||||||
|
public Q_SLOTS: // METHODS
|
||||||
|
inline QDBusPendingReply<ModemManager::DBUSManagerStruct> GetManagedObjects()
|
||||||
|
{
|
||||||
|
QList<QVariant> argumentList;
|
||||||
|
return asyncCallWithArgumentList(QLatin1String("GetManagedObjects"), argumentList);
|
||||||
|
}
|
||||||
|
|
||||||
|
Q_SIGNALS: // SIGNALS
|
||||||
|
void InterfacesAdded(const QDBusObjectPath &object_path, const ModemManager::MMVariantMapMap &interfaces_and_properties);
|
||||||
|
void InterfacesRemoved(const QDBusObjectPath &object_path, const QStringList &interfaces);
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
|
@ -0,0 +1,45 @@
|
||||||
|
/*
|
||||||
|
SPDX-FileCopyrightText: 2008 Will Stephenson <wstephenson@kde.org>
|
||||||
|
SPDX-FileCopyrightText: 2010 Lamarque Souza <lamarque@kde.org>
|
||||||
|
SPDX-FileCopyrightText: 2013 Lukas Tinkl <ltinkl@redhat.com>
|
||||||
|
SPDX-FileCopyrightText: 2013 Anant Kamath <kamathanant@gmail.com>
|
||||||
|
SPDX-FileCopyrightText: 2015 Jan Grulich <jgrulich@redhat.com>
|
||||||
|
|
||||||
|
SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef MODEMMANAGER_FAKE_DBUS_H
|
||||||
|
#define MODEMMANAGER_FAKE_DBUS_H
|
||||||
|
|
||||||
|
#define DBUS_INTERFACE_PROPS QLatin1String("org.freedesktop.DBus.Properties")
|
||||||
|
#define DBUS_INTERFACE_INTROSPECT QLatin1String("org.freedesktop.DBus.Introspectable")
|
||||||
|
#define DBUS_INTERFACE_MANAGER QLatin1String("org.freedesktop.DBus.ObjectManager")
|
||||||
|
|
||||||
|
#define MMQT_DBUS_SERVICE "org.kde.fakemodem"
|
||||||
|
#define MMQT_DBUS_PATH "/org/kde/fakemodem"
|
||||||
|
/* Prefix for object paths */
|
||||||
|
#define MMQT_DBUS_MODEM_PREFIX MMQT_DBUS_PATH "/Modem"
|
||||||
|
#define MMQT_DBUS_BEARER_PREFIX MMQT_DBUS_PATH "/Bearer"
|
||||||
|
#define MMQT_DBUS_SIM_PREFIX MMQT_DBUS_PATH "/SIM"
|
||||||
|
#define MMQT_DBUS_SMS_PREFIX MMQT_DBUS_PATH "/SMS"
|
||||||
|
#define MMQT_DBUS_CALL_PREFIX MMQT_DBUS_PATH "/Call"
|
||||||
|
/* Interfaces */
|
||||||
|
#define MMQT_DBUS_INTERFACE "org.kde.fakemodem"
|
||||||
|
#define MMQT_DBUS_INTERFACE_SIM "org.kde.fakemodem.Sim"
|
||||||
|
#define MMQT_DBUS_INTERFACE_BEARER "org.kde.fakemodem.Bearer"
|
||||||
|
#define MMQT_DBUS_INTERFACE_SMS "org.kde.fakemodem.Sms"
|
||||||
|
#define MMQT_DBUS_INTERFACE_CALL "org.kde.fakemodem.Call"
|
||||||
|
#define MMQT_DBUS_INTERFACE_MODEM "org.kde.fakemodem.Modem"
|
||||||
|
#define MMQT_DBUS_INTERFACE_MODEM_SIMPLE "org.kde.fakemodem.Modem.Simple"
|
||||||
|
#define MMQT_DBUS_INTERFACE_MODEM_MODEM3GPP "org.kde.fakemodem.Modem.Modem3gpp"
|
||||||
|
#define MMQT_DBUS_INTERFACE_MODEM_MODEM3GPP_USSD "org.kde.fakemodem.Modem.Modem3gpp.Ussd"
|
||||||
|
#define MMQT_DBUS_INTERFACE_MODEM_MODEMCDMA "org.kde.fakemodem.Modem.ModemCdma"
|
||||||
|
#define MMQT_DBUS_INTERFACE_MODEM_MESSAGING "org.kde.fakemodem.Modem.Messaging"
|
||||||
|
#define MMQT_DBUS_INTERFACE_MODEM_LOCATION "org.kde.fakemodem.Modem.Location"
|
||||||
|
#define MMQT_DBUS_INTERFACE_MODEM_TIME "org.kde.fakemodem.Modem.Time"
|
||||||
|
#define MMQT_DBUS_INTERFACE_MODEM_FIRMWARE "org.kde.fakemodem.Modem.Firmware"
|
||||||
|
#define MMQT_DBUS_INTERFACE_MODEM_SIGNAL "org.kde.fakemodem.Modem.Signal"
|
||||||
|
#define MMQT_DBUS_INTERFACE_MODEM_OMA "org.kde.fakemodem.Modem.Oma"
|
||||||
|
#define MMQT_DBUS_INTERFACE_MODEM_VOICE "org.kde.fakemodem.Modem.Voice"
|
||||||
|
|
||||||
|
#endif
|
|
@ -0,0 +1,28 @@
|
||||||
|
/*
|
||||||
|
* This file was generated by qdbusxml2cpp version 0.7
|
||||||
|
* Command line was: qdbusxml2cpp -N -m -i generictypes.h -p firmwareinterface introspection/org.freedesktop.ModemManager1.Modem.Firmware.xml
|
||||||
|
*
|
||||||
|
* qdbusxml2cpp is Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
|
||||||
|
*
|
||||||
|
* This is an auto-generated file.
|
||||||
|
* This file may have been hand-edited. Look for HAND-EDIT comments
|
||||||
|
* before re-generating it.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "firmwareinterface.h"
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Implementation of interface class OrgFreedesktopModemManager1ModemFirmwareInterface
|
||||||
|
*/
|
||||||
|
|
||||||
|
OrgFreedesktopModemManager1ModemFirmwareInterface::OrgFreedesktopModemManager1ModemFirmwareInterface(const QString &service,
|
||||||
|
const QString &path,
|
||||||
|
const QDBusConnection &connection,
|
||||||
|
QObject *parent)
|
||||||
|
: QDBusAbstractInterface(service, path, staticInterfaceName(), connection, parent)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
OrgFreedesktopModemManager1ModemFirmwareInterface::~OrgFreedesktopModemManager1ModemFirmwareInterface()
|
||||||
|
{
|
||||||
|
}
|
|
@ -0,0 +1,61 @@
|
||||||
|
/*
|
||||||
|
* This file was generated by qdbusxml2cpp version 0.7
|
||||||
|
* Command line was: qdbusxml2cpp -N -m -i generictypes.h -p firmwareinterface introspection/org.freedesktop.ModemManager1.Modem.Firmware.xml
|
||||||
|
*
|
||||||
|
* qdbusxml2cpp is Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
|
||||||
|
*
|
||||||
|
* This is an auto-generated file.
|
||||||
|
* Do not edit! All changes made to it will be lost.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef MODEMMANAGERQT_FIRMWAREINTERFACE_H
|
||||||
|
#define MODEMMANAGERQT_FIRMWAREINTERFACE_H
|
||||||
|
|
||||||
|
#include "generictypes.h"
|
||||||
|
#include <QList>
|
||||||
|
#include <QObject>
|
||||||
|
#include <QString>
|
||||||
|
#include <QVariant>
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Proxy class for interface org.freedesktop.ModemManager1.Modem.Firmware
|
||||||
|
*/
|
||||||
|
class OrgFreedesktopModemManager1ModemFirmwareInterface : public QDBusAbstractInterface
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
static inline const char *staticInterfaceName()
|
||||||
|
#ifdef MMQT_STATIC
|
||||||
|
{
|
||||||
|
return "org.kde.fakemodem.Modem.Firmware";
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
{
|
||||||
|
return "org.freedesktop.ModemManager1.Modem.Firmware";
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
public:
|
||||||
|
OrgFreedesktopModemManager1ModemFirmwareInterface(const QString &service,
|
||||||
|
const QString &path,
|
||||||
|
const QDBusConnection &connection,
|
||||||
|
QObject *parent = nullptr);
|
||||||
|
|
||||||
|
~OrgFreedesktopModemManager1ModemFirmwareInterface() override;
|
||||||
|
|
||||||
|
public Q_SLOTS: // METHODS
|
||||||
|
inline QDBusPendingReply<QString, ModemManager::QVariantMapList> List()
|
||||||
|
{
|
||||||
|
QList<QVariant> argumentList;
|
||||||
|
return asyncCallWithArgumentList(QLatin1String("List"), argumentList);
|
||||||
|
}
|
||||||
|
inline QDBusPendingReply<> Select(const QString &uniqueid)
|
||||||
|
{
|
||||||
|
QList<QVariant> argumentList;
|
||||||
|
argumentList << QVariant::fromValue(uniqueid);
|
||||||
|
return asyncCallWithArgumentList(QLatin1String("Select"), argumentList);
|
||||||
|
}
|
||||||
|
|
||||||
|
Q_SIGNALS: // SIGNALS
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
|
@ -0,0 +1,20 @@
|
||||||
|
<tp:spec
|
||||||
|
xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0"
|
||||||
|
xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||||
|
|
||||||
|
<xi:include href="org.freedesktop.ModemManager1.xml"/>
|
||||||
|
<xi:include href="org.freedesktop.ModemManager1.Sim.xml"/>
|
||||||
|
<xi:include href="org.freedesktop.ModemManager1.Bearer.xml"/>
|
||||||
|
<xi:include href="org.freedesktop.ModemManager1.Sms.xml"/>
|
||||||
|
<xi:include href="org.freedesktop.ModemManager1.Modem.xml"/>
|
||||||
|
<xi:include href="org.freedesktop.ModemManager1.Modem.Modem3gpp.xml"/>
|
||||||
|
<xi:include href="org.freedesktop.ModemManager1.Modem.Modem3gpp.Ussd.xml"/>
|
||||||
|
<xi:include href="org.freedesktop.ModemManager1.Modem.ModemCdma.xml"/>
|
||||||
|
<xi:include href="org.freedesktop.ModemManager1.Modem.Messaging.xml"/>
|
||||||
|
<xi:include href="org.freedesktop.ModemManager1.Modem.Location.xml"/>
|
||||||
|
<xi:include href="org.freedesktop.ModemManager1.Modem.Time.xml"/>
|
||||||
|
<xi:include href="org.freedesktop.ModemManager1.Modem.Firmware.xml"/>
|
||||||
|
|
||||||
|
<!--xi:include href="wip-org.freedesktop.ModemManager1.Modem.Contacts.xml"/-->
|
||||||
|
|
||||||
|
</tp:spec>
|
|
@ -0,0 +1,21 @@
|
||||||
|
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
|
||||||
|
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
|
||||||
|
<node>
|
||||||
|
<interface name="org.freedesktop.DBus.ObjectManager">
|
||||||
|
<method name="GetManagedObjects">
|
||||||
|
<arg type="a{oa{sa{sv}}}" name="object_paths_interfaces_and_properties" direction="out">
|
||||||
|
<annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="DBUSManagerStruct"/>
|
||||||
|
</arg>
|
||||||
|
</method>
|
||||||
|
<signal name="InterfacesAdded">
|
||||||
|
<arg type="o" name="object_path"/>
|
||||||
|
<arg type="a{sa{sv}}" name="interfaces_and_properties">
|
||||||
|
<annotation name="com.trolltech.QtDBus.QtTypeName.In1" value="QVariantMapMap"/>
|
||||||
|
</arg>
|
||||||
|
</signal>
|
||||||
|
<signal name="InterfacesRemoved">
|
||||||
|
<arg type="o" name="object_path"/>
|
||||||
|
<arg type="as" name="interfaces"/>
|
||||||
|
</signal>
|
||||||
|
</interface>
|
||||||
|
</node>
|
|
@ -0,0 +1,242 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
ModemManager 1.0 Interface Specification
|
||||||
|
|
||||||
|
Copyright (C) 2011-2013 Red Hat, Inc.
|
||||||
|
Copyright (C) 2011-2013 Google, Inc.
|
||||||
|
Copyright (C) 2011-2013 Lanedo GmbH
|
||||||
|
-->
|
||||||
|
|
||||||
|
<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
|
||||||
|
|
||||||
|
<!--
|
||||||
|
org.freedesktop.ModemManager1.Bearer:
|
||||||
|
@short_description: The ModemManager Bearer interface.
|
||||||
|
|
||||||
|
This interface provides access to specific actions that may be performed
|
||||||
|
on available bearers.
|
||||||
|
-->
|
||||||
|
<interface name="org.freedesktop.ModemManager1.Bearer">
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Connect:
|
||||||
|
|
||||||
|
Requests activation of a packet data connection with the network using
|
||||||
|
this bearer's properties. Upon successful activation, the modem can
|
||||||
|
send and receive packet data and, depending on the addressing
|
||||||
|
capability of the modem, a connection manager may need to start PPP,
|
||||||
|
perform DHCP, or assign the IP address returned by the modem to the
|
||||||
|
data interface. Upon successful return, the
|
||||||
|
#org.freedesktop.ModemManager1.Bearer:Ip4Config
|
||||||
|
and/or
|
||||||
|
#org.freedesktop.ModemManager1.Bearer:Ip6Config
|
||||||
|
properties become valid and may contain IP configuration information for
|
||||||
|
the data interface associated with this bearer.
|
||||||
|
-->
|
||||||
|
<method name="Connect" />
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Disconnect:
|
||||||
|
|
||||||
|
Disconnect and deactivate this packet data connection.
|
||||||
|
|
||||||
|
Any ongoing data session will be terminated and IP addresses become
|
||||||
|
invalid when this method is called.
|
||||||
|
-->
|
||||||
|
<method name="Disconnect" />
|
||||||
|
|
||||||
|
<!--
|
||||||
|
For 3GPP (GSM/UMTS/LTE) technologies, Bearer objects represent only
|
||||||
|
Primary PDP contexts; Secondary contexts are not exposed as a concept
|
||||||
|
because they share everything with their parent primary PDP context
|
||||||
|
except QoS and traffic flows. Instead, methods for setting QoS and
|
||||||
|
Traffic Flow Templates (TFTs) should be provided here which could as a
|
||||||
|
result of being called create secondary PDP contexts with those QoS and
|
||||||
|
TFT parameters.
|
||||||
|
|
||||||
|
FIXME: add methods to set QoS/TFT on the Bearer object, which should
|
||||||
|
create Secondary contexts if needed, and figure out some method of
|
||||||
|
disposing of those secondary contexts when no longer required.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Interface:
|
||||||
|
|
||||||
|
The operating system name for the network data interface that provides
|
||||||
|
packet data using this bearer.
|
||||||
|
|
||||||
|
Connection managers must configure this interface depending on the IP
|
||||||
|
<literal>"method"</literal> given by the
|
||||||
|
#org.freedesktop.ModemManager1.Bearer:Ip4Config
|
||||||
|
or
|
||||||
|
#org.freedesktop.ModemManager1.Bearer:Ip6Config
|
||||||
|
properties set by bearer activation.
|
||||||
|
|
||||||
|
If <link linkend="MM-BEARER-IP-METHOD-STATIC:CAPS">MM_BEARER_IP_METHOD_STATIC</link>
|
||||||
|
or
|
||||||
|
<link linkend="MM-BEARER-IP-METHOD-DHCP:CAPS">MM_BEARER_IP_METHOD_DHCP</link>
|
||||||
|
methods are given, the interface
|
||||||
|
will be an ethernet-style interface suitable for DHCP or setting static
|
||||||
|
IP configuration on, while if the
|
||||||
|
<link linkend="MM-BEARER-IP-METHOD-PPP:CAPS">MM_BEARER_IP_METHOD_PPP</link>
|
||||||
|
method is given, the interface
|
||||||
|
will be a serial TTY which must then have PPP run over it.
|
||||||
|
-->
|
||||||
|
<property name="Interface" type="s" access="read" />
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Connected:
|
||||||
|
|
||||||
|
Indicates whether or not the bearer is connected and thus whether
|
||||||
|
packet data communication using this bearer is possible.
|
||||||
|
-->
|
||||||
|
<property name="Connected" type="b" access="read" />
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Suspended:
|
||||||
|
|
||||||
|
In some devices, packet data service will be suspended while the device
|
||||||
|
is handling other communication, like a voice call. If packet data
|
||||||
|
service is suspended (but not deactivated) this property will be %TRUE.
|
||||||
|
-->
|
||||||
|
<property name="Suspended" type="b" access="read" />
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Ip4Config:
|
||||||
|
|
||||||
|
If the bearer was configured for IPv4 addressing, upon activation this
|
||||||
|
property contains the addressing details for assignment to the data
|
||||||
|
interface.
|
||||||
|
|
||||||
|
Mandatory items include:
|
||||||
|
<variablelist>
|
||||||
|
<varlistentry><term><literal>"method"</literal></term>
|
||||||
|
<listitem>
|
||||||
|
A <link linkend="MMBearerIpMethod">MMBearerIpMethod</link>,
|
||||||
|
given as an unsigned integer value (signature <literal>"u"</literal>).
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
</variablelist>
|
||||||
|
|
||||||
|
If the bearer specifies configuration via PPP or DHCP, only the
|
||||||
|
<literal>"method"</literal> item will be present.
|
||||||
|
|
||||||
|
Additional items which are only applicable when using the
|
||||||
|
<link linkend="MM-BEARER-IP-METHOD-STATIC:CAPS">MM_BEARER_IP_METHOD_STATIC</link>
|
||||||
|
method are:
|
||||||
|
<variablelist>
|
||||||
|
<varlistentry><term><literal>"address"</literal></term>
|
||||||
|
<listitem>
|
||||||
|
IP address, given as a string value (signature <literal>"s"</literal>).
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry><term><literal>"prefix"</literal></term>
|
||||||
|
<listitem>
|
||||||
|
Numeric CIDR network prefix (ie, 24, 32, etc), give as an unsigned integer value (signature <literal>"u"</literal>).
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry><term><literal>"dns1"</literal></term>
|
||||||
|
<listitem>
|
||||||
|
IP address of the first DNS server, given as a string value (signature <literal>"s"</literal>).
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry><term><literal>"dns2"</literal></term>
|
||||||
|
<listitem>
|
||||||
|
IP address of the second DNS server, given as a string value (signature <literal>"s"</literal>).
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry><term><literal>"dns3"</literal></term>
|
||||||
|
<listitem>
|
||||||
|
IP address of the third DNS server, given as a string value (signature <literal>"s"</literal>).
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry><term><literal>"gateway"</literal></term>
|
||||||
|
<listitem>
|
||||||
|
IP address of the default gateway, given as a string value (signature <literal>"s"</literal>).
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
</variablelist>
|
||||||
|
-->
|
||||||
|
<property name="Ip4Config" type="a{sv}" access="read">
|
||||||
|
<annotation name="org.qtproject.QtDBus.QtTypeName" value="QVariantMap"/>
|
||||||
|
</property>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Ip6Config:
|
||||||
|
|
||||||
|
If the bearer was configured for IPv6 addressing, upon activation this
|
||||||
|
property contains the addressing details for assignment to the data
|
||||||
|
interface.
|
||||||
|
|
||||||
|
Mandatory items include:
|
||||||
|
<variablelist>
|
||||||
|
<varlistentry><term><literal>"method"</literal></term>
|
||||||
|
<listitem>
|
||||||
|
A <link linkend="MMBearerIpMethod">MMBearerIpMethod</link>,
|
||||||
|
given as an unsigned integer value (signature <literal>"u"</literal>).
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
</variablelist>
|
||||||
|
|
||||||
|
If the bearer specifies configuration via PPP or DHCP, only the
|
||||||
|
<literal>"method"</literal> item will be present.
|
||||||
|
|
||||||
|
Additional items which are only applicable when using the
|
||||||
|
<link linkend="MM-BEARER-IP-METHOD-STATIC:CAPS">MM_BEARER_IP_METHOD_STATIC</link>
|
||||||
|
method are:
|
||||||
|
<variablelist>
|
||||||
|
<varlistentry><term><literal>"address"</literal></term>
|
||||||
|
<listitem>
|
||||||
|
IP address, given as a string value (signature <literal>"s"</literal>).
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry><term><literal>"prefix"</literal></term>
|
||||||
|
<listitem>
|
||||||
|
Numeric CIDR network prefix (ie, 24, 32, etc), give as an unsigned integer value (signature <literal>"u"</literal>).
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry><term><literal>"dns1"</literal></term>
|
||||||
|
<listitem>
|
||||||
|
IP address of the first DNS server, given as a string value (signature <literal>"s"</literal>).
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry><term><literal>"dns2"</literal></term>
|
||||||
|
<listitem>
|
||||||
|
IP address of the second DNS server, given as a string value (signature <literal>"s"</literal>).
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry><term><literal>"dns3"</literal></term>
|
||||||
|
<listitem>
|
||||||
|
IP address of the third DNS server, given as a string value (signature <literal>"s"</literal>).
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry><term><literal>"gateway"</literal></term>
|
||||||
|
<listitem>
|
||||||
|
IP address of the default gateway, given as a string value (signature <literal>"s"</literal>).
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
</variablelist>
|
||||||
|
-->
|
||||||
|
<property name="Ip6Config" type="a{sv}" access="read">
|
||||||
|
<annotation name="org.qtproject.QtDBus.QtTypeName" value="QVariantMap"/>
|
||||||
|
</property>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
IpTimeout:
|
||||||
|
|
||||||
|
Maximum time to wait for a successful IP establishment, when PPP is used.
|
||||||
|
-->
|
||||||
|
<property name="IpTimeout" type="u" access="read" />
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Properties:
|
||||||
|
|
||||||
|
List of properties used when creating the bearer.
|
||||||
|
-->
|
||||||
|
<property name="Properties" type="a{sv}" access="read">
|
||||||
|
<annotation name="org.qtproject.QtDBus.QtTypeName" value="QVariantMap"/>
|
||||||
|
</property>
|
||||||
|
|
||||||
|
</interface>
|
||||||
|
</node>
|
|
@ -0,0 +1,115 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
ModemManager 1.0 Interface Specification
|
||||||
|
|
||||||
|
Copyright (C) 2015 Marco Bascetta <marco.bascetta@sadel.it>
|
||||||
|
Copyright (C) 2015 Riccardo Vangelisti <riccardo.vangelisti@sadel.it>
|
||||||
|
-->
|
||||||
|
|
||||||
|
<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
|
||||||
|
|
||||||
|
<!--
|
||||||
|
org.freedesktop.ModemManager1.Call:
|
||||||
|
@short_description: The ModemManager Call interface.
|
||||||
|
|
||||||
|
The Call interface Defines operations and properties of a single Call.
|
||||||
|
-->
|
||||||
|
<interface name="org.freedesktop.ModemManager1.Call">
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Start:
|
||||||
|
|
||||||
|
If the outgoing call has not yet been started, start it.
|
||||||
|
|
||||||
|
Applicable only if state is <link linkend="MM-CALL-STATE-UNKNOWN:CAPS"><constant>MM_CALL_STATE_UNKNOWN</constant></link> and direction is
|
||||||
|
<link linkend="MM-CALL-DIRECTION-OUTGOING:CAPS"><constant>MM_CALL_DIRECTION_OUTGOING</constant></link>.
|
||||||
|
-->
|
||||||
|
<method name="Start" />
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Accept:
|
||||||
|
|
||||||
|
Accept incoming call (answer).
|
||||||
|
|
||||||
|
Applicable only if state is <link linkend="MM-CALL-STATE-RINGING-IN:CAPS"><constant>MM_CALL_STATE_RINGING_IN</constant></link> and direction is
|
||||||
|
<link linkend="MM-CALL-DIRECTION-INCOMING:CAPS"><constant>MM_CALL_DIRECTION_INCOMING</constant></link>.
|
||||||
|
-->
|
||||||
|
<method name="Accept" />
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Hangup:
|
||||||
|
|
||||||
|
Hangup the active call.
|
||||||
|
|
||||||
|
Applicable only if state is <link linkend="MM-CALL-STATE-UNKNOWN:CAPS"><constant>MM_CALL_STATE_UNKNOWN</constant></link>.
|
||||||
|
-->
|
||||||
|
<method name="Hangup"/>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
SendDtmf:
|
||||||
|
@dtmf: DTMF tone identifier [0-9A-D*#].
|
||||||
|
|
||||||
|
Send a DTMF tone (Dual Tone Multi-Frequency) (only on supported modem).
|
||||||
|
|
||||||
|
Applicable only if state is <link linkend="MM-CALL-STATE-ACTIVE:CAPS"><constant>MM_CALL_STATE_ACTIVE</constant></link>.
|
||||||
|
-->
|
||||||
|
<method name="SendDtmf">
|
||||||
|
<arg name="dtmf" type="s" direction="in"/>
|
||||||
|
</method>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
DtmfReceived:
|
||||||
|
@dtmf: DTMF tone identifier [0-9A-D*#].
|
||||||
|
|
||||||
|
Emitted when a DTMF tone is received (only on supported modem)
|
||||||
|
-->
|
||||||
|
<signal name="DtmfReceived">
|
||||||
|
<arg name="dtmf" type="s" />
|
||||||
|
</signal>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
StateChanged:
|
||||||
|
@old: Old state MMCallState
|
||||||
|
@new: New state MMCallState
|
||||||
|
@reason: A <link linkend="MMCallStateReason">MMCallStateReason</link> value, specifying the reason for this state change.
|
||||||
|
|
||||||
|
Emitted when call changes state
|
||||||
|
-->
|
||||||
|
<signal name="StateChanged">
|
||||||
|
<arg name="old" type="i" />
|
||||||
|
<arg name="new" type="i" />
|
||||||
|
<arg name="reason" type="u" />
|
||||||
|
</signal>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
State:
|
||||||
|
|
||||||
|
A <link linkend="MMCallState">MMCallState</link> value,
|
||||||
|
describing the state of the call.
|
||||||
|
-->
|
||||||
|
<property name="State" type="i" access="read" />
|
||||||
|
|
||||||
|
<!--
|
||||||
|
StateReason:
|
||||||
|
|
||||||
|
A <link linkend="MMCallStateReason">MMCallStateReason</link> value, describing why the state is changed.
|
||||||
|
-->
|
||||||
|
<property name="StateReason" type="i" access="read" />
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Direction:
|
||||||
|
|
||||||
|
A <link linkend="MMCallDirection">MMCallDirection</link> value,
|
||||||
|
describing the direction of the call.
|
||||||
|
-->
|
||||||
|
<property name="Direction" type="i" access="read" />
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Number:
|
||||||
|
|
||||||
|
The remote phone number.
|
||||||
|
-->
|
||||||
|
<property name="Number" type="s" access="read" />
|
||||||
|
</interface>
|
||||||
|
</node>
|
|
@ -0,0 +1,136 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
ModemManager 1.0 Interface Specification
|
||||||
|
|
||||||
|
Copyright (C) 2011-2013 Red Hat, Inc.
|
||||||
|
Copyright (C) 2011-2013 Google, Inc.
|
||||||
|
Copyright (C) 2011-2013 Lanedo GmbH
|
||||||
|
-->
|
||||||
|
|
||||||
|
<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
|
||||||
|
|
||||||
|
<!--
|
||||||
|
org.freedesktop.ModemManager1.Modem.Firmware:
|
||||||
|
@short_description: The ModemManager Firmware interface.
|
||||||
|
|
||||||
|
This interface allows clients to select or install firmware images on
|
||||||
|
modems.
|
||||||
|
|
||||||
|
Firmware slots and firmware images are identified by arbitrary opaque
|
||||||
|
strings.
|
||||||
|
|
||||||
|
Firmware images are represented as dictionaries of properties.
|
||||||
|
Certain properties are pre-defined, and some are required:
|
||||||
|
|
||||||
|
<variablelist>
|
||||||
|
<varlistentry><term><literal>"image-type"</literal></term>
|
||||||
|
<listitem>
|
||||||
|
(Required) Type of the firmware image, given as a
|
||||||
|
<link linkend="MMFirmwareImageType">MMFirmwareImageType</link> value
|
||||||
|
(signature <literal>"u"</literal>). Firmware images of type
|
||||||
|
<link linkend="MM-FIRMWARE-IMAGE-TYPE-GENERIC:CAPS">MM_FIRMWARE_IMAGE_TYPE_GENERIC</link>
|
||||||
|
will only expose only the mandatory properties.
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry><term><literal>"unique-id"</literal></term>
|
||||||
|
<listitem>
|
||||||
|
(Required) A user-readable unique ID for the firmware image, given as a
|
||||||
|
string value (signature <literal>"s"</literal>).
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry><term><literal>"gobi-pri-version"</literal></term>
|
||||||
|
<listitem>
|
||||||
|
(Optional) The version of the PRI firmware image, in images of type
|
||||||
|
<link linkend="MM-FIRMWARE-IMAGE-TYPE-GOBI:CAPS">MM_FIRMWARE_IMAGE_TYPE_GOBI</link>,
|
||||||
|
given as a string value (signature <literal>"s"</literal>).
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry><term><literal>"gobi-pri-info"</literal></term>
|
||||||
|
<listitem>
|
||||||
|
(Optional) Additional information of the PRI image, in images of type
|
||||||
|
<link linkend="MM-FIRMWARE-IMAGE-TYPE-GOBI:CAPS">MM_FIRMWARE_IMAGE_TYPE_GOBI</link>,
|
||||||
|
given as a string value (signature <literal>"s"</literal>).
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry><term><literal>"gobi-boot-version"</literal></term>
|
||||||
|
<listitem>
|
||||||
|
(Optional) The boot version of the PRI firmware image, in images of type
|
||||||
|
<link linkend="MM-FIRMWARE-IMAGE-TYPE-GOBI:CAPS">MM_FIRMWARE_IMAGE_TYPE_GOBI</link>,
|
||||||
|
given as a string value (signature <literal>"s"</literal>).
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry><term><literal>"gobi-pri-unique-id"</literal></term>
|
||||||
|
<listitem>
|
||||||
|
(Optional) The unique ID of the PRI firmware image, in images of type
|
||||||
|
<link linkend="MM-FIRMWARE-IMAGE-TYPE-GOBI:CAPS">MM_FIRMWARE_IMAGE_TYPE_GOBI</link>,
|
||||||
|
given as a string value (signature <literal>"s"</literal>).
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry><term><literal>"gobi-modem-unique-id"</literal></term>
|
||||||
|
<listitem>
|
||||||
|
(Optional) The unique ID of the Modem firmware image, in images of type
|
||||||
|
<link linkend="MM-FIRMWARE-IMAGE-TYPE-GOBI:CAPS">MM_FIRMWARE_IMAGE_TYPE_GOBI</link>,
|
||||||
|
given as a string value (signature <literal>"s"</literal>).
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
</variablelist>
|
||||||
|
-->
|
||||||
|
<interface name="org.freedesktop.ModemManager1.Modem.Firmware">
|
||||||
|
|
||||||
|
<!--
|
||||||
|
List:
|
||||||
|
@selected: The unique name of the selected firmware image, or the empty string if no image is selected.
|
||||||
|
@installed: An array of dictionaries containing the properties of the installed firmware images.
|
||||||
|
|
||||||
|
List installed firmware images.
|
||||||
|
|
||||||
|
Depending on the type of modem, installed images may be stored on the
|
||||||
|
host or the modem.
|
||||||
|
|
||||||
|
Installed images can be selected non-destructively.
|
||||||
|
-->
|
||||||
|
<method name="List">
|
||||||
|
<arg name="selected" type="s" direction="out" />
|
||||||
|
<arg name="installed" type="aa{sv}" direction="out" />
|
||||||
|
<annotation name="org.qtproject.QtDBus.QtTypeName.Out1" value="QVariantMapList"/>
|
||||||
|
</method>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Select:
|
||||||
|
@uniqueid: The unique ID of the firmware image to select.
|
||||||
|
|
||||||
|
Selects a different firmware image to use, and immediately resets the
|
||||||
|
modem so that it begins using the new firmware image.
|
||||||
|
|
||||||
|
The method will fail if the identifier does not match any of the names
|
||||||
|
returned by
|
||||||
|
<link linkend="gdbus-method-org-freedesktop-ModemManager1-Modem-Firmware.List">List()</link>,
|
||||||
|
or if the image could not be selected for some reason.
|
||||||
|
-->
|
||||||
|
<method name="Select">
|
||||||
|
<arg name="uniqueid" type="s" direction="in" />
|
||||||
|
</method>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Install:
|
||||||
|
@image: The identifier of the firmware image to install.
|
||||||
|
@slot: The identifier of the slot into which the firmware should be installed.
|
||||||
|
|
||||||
|
Install an available firmware image into a slot.
|
||||||
|
|
||||||
|
It does not guarantee that the image will be installed into the
|
||||||
|
specified slot, but does guarantee that, if the slot is empty, no
|
||||||
|
image will be overwritten, and if the slot is not empty, no image
|
||||||
|
other than the one in that slot will be overwritten.
|
||||||
|
|
||||||
|
The method will fail if either of the identifiers is invalid, or if the
|
||||||
|
image could not be installed into the slot for some reason.
|
||||||
|
|
||||||
|
<method name="Install">
|
||||||
|
<arg name="image" type="s" direction="in" />
|
||||||
|
<arg name="slot" type="s" direction="in" />
|
||||||
|
</method-->
|
||||||
|
|
||||||
|
</interface>
|
||||||
|
</node>
|
|
@ -0,0 +1,273 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
ModemManager 1.0 Interface Specification
|
||||||
|
|
||||||
|
Copyright (C) 2008 Novell, Inc.
|
||||||
|
Copyright (C) 2008-2013 Red Hat, Inc.
|
||||||
|
Copyright (C) 2011-2013 Google, Inc.
|
||||||
|
Copyright (C) 2011-2013 Lanedo GmbH
|
||||||
|
-->
|
||||||
|
|
||||||
|
<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
|
||||||
|
|
||||||
|
<!--
|
||||||
|
org.freedesktop.ModemManager1.Modem.Location:
|
||||||
|
@short_description: The ModemManager Location interface.
|
||||||
|
|
||||||
|
The Location interface allows devices to provide location information to
|
||||||
|
client applications. Not all devices can provide this information, or even
|
||||||
|
if they do, they may not be able to provide it while a data session is
|
||||||
|
active.
|
||||||
|
-->
|
||||||
|
<interface name="org.freedesktop.ModemManager1.Modem.Location">
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Setup:
|
||||||
|
@sources: Bitmask of <link linkend="MMModemLocationSource">MMModemLocationSource</link> flags, specifying which sources should get enabled or disabled. <link linkend="MM-MODEM-LOCATION-SOURCE-NONE:CAPS">MM_MODEM_LOCATION_SOURCE_NONE</link> will disable all location gathering.
|
||||||
|
@signal_location: Flag to control whether the device emits signals with the new location information. This argument is ignored when disabling location information gathering.
|
||||||
|
|
||||||
|
Configure the location sources to use when gathering location
|
||||||
|
information. Also enable or disable location information gathering.
|
||||||
|
This method may require the client to authenticate itself.
|
||||||
|
|
||||||
|
When signals are emitted, any client application (including malicious
|
||||||
|
ones!) can listen for location updates unless D-Bus permissions restrict
|
||||||
|
these signals from certain users. If further security is desired, the
|
||||||
|
@signal_location argument can be set to %FALSE to disable location
|
||||||
|
updates via D-Bus signals and require applications to call
|
||||||
|
authenticated APIs (like
|
||||||
|
<link linkend="gdbus-method-org-freedesktop-ModemManager1-Modem-Location.GetLocation">GetLocation()</link>
|
||||||
|
) to get
|
||||||
|
location information.
|
||||||
|
-->
|
||||||
|
<method name="Setup">
|
||||||
|
<arg name="sources" type="u" direction="in" />
|
||||||
|
<arg name="signal_location" type="b" direction="in" />
|
||||||
|
</method>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
GetLocation:
|
||||||
|
@location: Dictionary of available location information when location information gathering is enabled.
|
||||||
|
|
||||||
|
Return current location information, if any. If the modem supports
|
||||||
|
multiple location types it may return more than one. See the
|
||||||
|
#org.freedesktop.ModemManager1.Modem.Location:Location property
|
||||||
|
for more information on the dictionary returned at @location.
|
||||||
|
|
||||||
|
This method may require the client to authenticate itself.
|
||||||
|
-->
|
||||||
|
<method name="GetLocation">
|
||||||
|
<arg name="Location" type="a{uv}" direction="out">
|
||||||
|
<annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="LocationInformationMap"/>
|
||||||
|
</arg>
|
||||||
|
</method>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Capabilities:
|
||||||
|
|
||||||
|
Bitmask of <link linkend="MMModemLocationSource">MMModemLocationSource</link>
|
||||||
|
values, specifying the supported location sources.
|
||||||
|
-->
|
||||||
|
<property name="Capabilities" type="u" access="read" />
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Enabled:
|
||||||
|
|
||||||
|
Bitmask specifying which of the supported
|
||||||
|
<link linkend="MMModemLocationSource">MMModemLocationSource</link>
|
||||||
|
location sources is currently enabled in the device.
|
||||||
|
-->
|
||||||
|
<property name="Enabled" type="u" access="read" />
|
||||||
|
|
||||||
|
<!--
|
||||||
|
SignalsLocation:
|
||||||
|
|
||||||
|
%TRUE if location updates will be emitted via D-Bus signals, %FALSE if
|
||||||
|
location updates will not be emitted.
|
||||||
|
|
||||||
|
See the
|
||||||
|
<link linkend="gdbus-method-org-freedesktop-ModemManager1-Modem-Location.Setup">Setup()</link>
|
||||||
|
method for more information.
|
||||||
|
-->
|
||||||
|
<property name="SignalsLocation" type="b" access="read" />
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Location:
|
||||||
|
|
||||||
|
Dictionary of available location information when location information
|
||||||
|
gathering is enabled. If the modem supports multiple location types it
|
||||||
|
may return more than one here.
|
||||||
|
|
||||||
|
Note that if the device was told not to emit updated location
|
||||||
|
information when location information gathering was initially enabled,
|
||||||
|
this property may not return any location information for security reasons.
|
||||||
|
|
||||||
|
This dictionary is composed of a
|
||||||
|
<link linkend="MMModemLocationSource">MMModemLocationSource</link>
|
||||||
|
key, with an associated data which contains type-specific location
|
||||||
|
information:
|
||||||
|
|
||||||
|
<variablelist>
|
||||||
|
<varlistentry><term><link linkend="MM-MODEM-LOCATION-SOURCE-3GPP-LAC-CI:CAPS">MM_MODEM_LOCATION_SOURCE_3GPP_LAC_CI</link></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Devices supporting this
|
||||||
|
capability return a string in the format <literal>"MCC,MNC,LAC,CI"</literal> (without the
|
||||||
|
quotes of course) where the following applies:
|
||||||
|
</para>
|
||||||
|
<variablelist>
|
||||||
|
<varlistentry><term><literal>MCC</literal></term>
|
||||||
|
<listitem>
|
||||||
|
This is the three-digit ITU E.212 Mobile Country Code of the
|
||||||
|
network provider to which the mobile is currently registered.
|
||||||
|
e.g. <literal>"310"</literal>.
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry><term><literal>MNC</literal></term>
|
||||||
|
<listitem>
|
||||||
|
This is the two- or three-digit GSM Mobile Network Code of the
|
||||||
|
network provider to which the mobile is currently registered.
|
||||||
|
e.g. <literal>"26"</literal> or <literal>"260"</literal>.
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry><term><literal>LAC</literal></term>
|
||||||
|
<listitem>
|
||||||
|
This is the two-byte Location Area Code of the base station with
|
||||||
|
which the mobile is registered, in upper-case hexadecimal format
|
||||||
|
without leading zeros, as specified in 3GPP TS 27.007 section
|
||||||
|
10.1.19. e.g. <literal>"84CD"</literal>.
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry><term><literal>CI</literal></term>
|
||||||
|
<listitem>
|
||||||
|
This is the two- or four-byte Cell Identifier with which the mobile
|
||||||
|
is registered, in upper-case hexadecimal format without leading
|
||||||
|
zeros, as specified in 3GPP TS 27.007.
|
||||||
|
e.g. <literal>"2BAF"</literal> or <literal>"D30156"</literal>.
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
</variablelist>
|
||||||
|
<para>
|
||||||
|
The entire string may only be composed of the ASCII digits <literal>[0-9]</literal>,
|
||||||
|
the alphabetical characters <literal>[A-F]</literal>, and the comma (<literal>,</literal>) character.
|
||||||
|
No other characters are allowed. For example: <literal>"310,260,8BE3,2BAF"</literal> or
|
||||||
|
<literal>"250,40,CE00,1CEAD8F0"</literal>.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
If any of these four items (<literal>MCC</literal>, <literal>MNC</literal>,
|
||||||
|
<literal>LAC</literal>, <literal>CI</literal>) is unknown or the
|
||||||
|
mobile is not registered with a network, then the
|
||||||
|
<link linkend="MM-MODEM-LOCATION-SOURCE-3GPP-LAC-CI:CAPS">MM_MODEM_LOCATION_SOURCE_3GPP_LAC_CI</link>
|
||||||
|
location
|
||||||
|
information item should not be provided as a returned value from the
|
||||||
|
<link linkend="gdbus-method-org-freedesktop-ModemManager1-Modem-Location.GetLocation">GetLocation()</link>
|
||||||
|
method or in the #org.freedesktop.ModemManager1.Modem.Location:Location property.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry><term><link linkend="MM-MODEM-LOCATION-SOURCE-GPS-RAW:CAPS">MM_MODEM_LOCATION_SOURCE_GPS_RAW</link></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Devices supporting this
|
||||||
|
capability return a D-Bus dictionary (signature <literal>"a{sv}"</literal>) mapping well-known
|
||||||
|
keys to values with defined formats.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
The allowed key/value pairs and their formats are:
|
||||||
|
</para>
|
||||||
|
<variablelist>
|
||||||
|
<varlistentry><term><literal>"utc-time"</literal></term>
|
||||||
|
<listitem>
|
||||||
|
(Required) UTC time in ISO 8601 format, given as a string value (signature <literal>"s"</literal>). e.g. <literal>203015</literal>.
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry><term><literal>"latitude"</literal></term>
|
||||||
|
<listitem>
|
||||||
|
(Required) Latitude in Decimal Degrees (positive numbers mean N quadrasphere, negative mean S quadrasphere), given as a double value (signature <literal>"d"</literal>). e.g. <literal>38.889722</literal>, meaning 38d 53' 22" N.
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry><term><literal>"longitude"</literal></term>
|
||||||
|
<listitem>
|
||||||
|
(Required) Longitude in Decimal Degrees (positive numbers mean E quadrasphere, negative mean W quadrasphere), given as a double value (signature <literal>"d"</literal>). e.g. <literal>-77.008889</literal>, meaning 77d 0' 32" W.
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry><term><literal>"altitude"</literal></term>
|
||||||
|
<listitem>
|
||||||
|
(Optional) Altitude above sea level in meters, given as a double value (signature <literal>"d"</literal>). e.g. <literal>33.5</literal>.
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
</variablelist>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry><term><link linkend="MM-MODEM-LOCATION-SOURCE-GPS-NMEA:CAPS">MM_MODEM_LOCATION_SOURCE_GPS_NMEA</link></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Devices supporting this capability return
|
||||||
|
a string containing one or more NMEA sentences (D-Bus signature <literal>'s'</literal>).
|
||||||
|
The manager will cache the most recent NMEA sentence of each type for
|
||||||
|
a period of time not less than 30 seconds. When reporting multiple
|
||||||
|
NMEA sentences, sentences shall be separated by an ASCII Carriage
|
||||||
|
Return and Line Feed (<literal><CR><LF></literal>) sequence.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
For example, if the device sends a <literal>$GPRMC</literal> sentence immediately
|
||||||
|
followed by a <literal>$GPGGA</literal> sentence, the reported location string would be
|
||||||
|
(where of course the <literal><CR><LF></literal> is replaced with the actual
|
||||||
|
ASCII <literal>CR</literal> (0x0D) and <literal>LF</literal> (0x0A) control characters):
|
||||||
|
<para><literal>
|
||||||
|
$GPRMC,134523.92,V,,,,,,,030136,,,N*73<CR><LF>$GPGGA,,,,,,0,00,0.5,,M,0.0001999,M,0.0000099,0000*45
|
||||||
|
</literal></para>
|
||||||
|
If the device sends a new <literal>$GPRMC</literal> three seconds later, the new <literal>$GPRMC</literal>
|
||||||
|
replaces the previously received <literal>$GPRMC</literal> sentence, and the updated
|
||||||
|
string would be:
|
||||||
|
<para><literal>
|
||||||
|
$GPRMC,134526.92,V,,,,,,,030136,,,N*76<CR><LF>$GPGGA,,,,,,0,00,0.5,,M,0.0001999,M,0.0000099,0000*45
|
||||||
|
</literal></para>
|
||||||
|
If the device then sends a <literal>$GPGSA</literal> sentence about 5 seconds later, the
|
||||||
|
<literal>$GPGSA</literal> sentence is added to the string (since no <literal>$GPGSA</literal> sentence was
|
||||||
|
obviously received in this session), the updated string would be:
|
||||||
|
<para><literal>
|
||||||
|
$GPRMC,134526.92,V,,,,,,,030136,,,N*76<CR><LF>$GPGGA,,,,,,0,00,0.5,,M,0.0001999,M,0.0000099,0000*45<CR><LF>$GPGSA,A,1,,,,,,,,,,,,,1.1,0.5,1.0*34
|
||||||
|
</literal></para>
|
||||||
|
The manager may discard any cached sentences older than 30 seconds.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
This allows clients to read the latest positioning data as soon as
|
||||||
|
possible after they start, even if the device is not providing
|
||||||
|
frequent location data updates.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry><term><link linkend="MM-MODEM-LOCATION-SOURCE-CDMA-BS:CAPS">MM_MODEM_LOCATION_SOURCE_CDMA_BS</link></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Devices supporting this
|
||||||
|
capability return a D-Bus dictionary (signature <literal>"a{sv}"</literal>) mapping well-known
|
||||||
|
keys to values with defined formats.
|
||||||
|
</para>
|
||||||
|
<para>
|
||||||
|
The allowed key/value pairs and their formats are:
|
||||||
|
</para>
|
||||||
|
<variablelist>
|
||||||
|
<varlistentry><term><literal>"latitude"</literal></term>
|
||||||
|
<listitem>
|
||||||
|
(Required) Latitude in Decimal Degrees (positive numbers mean N quadrasphere, negative mean S quadrasphere), given as a double value (signature <literal>"d"</literal>). e.g. <literal>38.889722</literal>, meaning 38d 53' 22" N.
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry><term><literal>"longitude"</literal></term>
|
||||||
|
<listitem>
|
||||||
|
(Required) Longitude in Decimal Degrees (positive numbers mean E quadrasphere, negative mean W quadrasphere), given as a double value (signature <literal>"d"</literal>). e.g. <literal>-77.008889</literal>, meaning 77d 0' 32" W.
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
</variablelist>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
</variablelist>
|
||||||
|
-->
|
||||||
|
<property name="Location" type="a{uv}" access="read">
|
||||||
|
<annotation name="org.qtproject.QtDBus.QtTypeName" value="LocationInformationMap"/>
|
||||||
|
</property>
|
||||||
|
|
||||||
|
</interface>
|
||||||
|
</node>
|
|
@ -0,0 +1,127 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
ModemManager 1.0 Interface Specification
|
||||||
|
|
||||||
|
Copyright (C) 2008 Novell, Inc.
|
||||||
|
Copyright (C) 2008-2013 Red Hat, Inc.
|
||||||
|
Copyright (C) 2011-2013 Google, Inc.
|
||||||
|
Copyright (C) 2011-2013 Lanedo GmbH
|
||||||
|
-->
|
||||||
|
|
||||||
|
<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
|
||||||
|
|
||||||
|
<!--
|
||||||
|
org.freedesktop.ModemManager1.Modem.Messaging:
|
||||||
|
@short_description: The ModemManager Messaging interface.
|
||||||
|
|
||||||
|
The Messaging interface handles sending SMS messages and notification of new
|
||||||
|
incoming messages.
|
||||||
|
-->
|
||||||
|
<interface name="org.freedesktop.ModemManager1.Modem.Messaging">
|
||||||
|
|
||||||
|
<!--
|
||||||
|
List:
|
||||||
|
@result: The list of SMS object paths.
|
||||||
|
|
||||||
|
Retrieve all SMS messages.
|
||||||
|
|
||||||
|
This method should only be used once and subsequent information
|
||||||
|
retrieved either by listening for the
|
||||||
|
#org.freedesktop.ModemManager1.Modem.Messaging::Added signal,
|
||||||
|
or by querying the specific SMS object of interest.
|
||||||
|
-->
|
||||||
|
<method name="List">
|
||||||
|
<arg name="result" type="ao" direction="out" />
|
||||||
|
</method>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Delete:
|
||||||
|
@path: The object path of the SMS to delete.
|
||||||
|
|
||||||
|
Delete an SMS message.
|
||||||
|
-->
|
||||||
|
<method name="Delete">
|
||||||
|
<arg name="path" type="o" direction="in" />
|
||||||
|
</method>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Create:
|
||||||
|
@properties: Message properties from the <link linkend="gdbus-org.freedesktop.ModemManager1.Sms">SMS D-Bus interface</link>.
|
||||||
|
@path: The object path of the new message object.
|
||||||
|
|
||||||
|
Creates a new message object.
|
||||||
|
|
||||||
|
The '<link linkend="gdbus-property-org-freedesktop-ModemManager1-Sms.Number">Number</link>'
|
||||||
|
and
|
||||||
|
either '<link linkend="gdbus-property-org-freedesktop-ModemManager1-Sms.Text">Text</link>' or
|
||||||
|
'<link linkend="gdbus-property-org-freedesktop-ModemManager1-Sms.Data">Data</link>'
|
||||||
|
properties are mandatory, others are optional.
|
||||||
|
|
||||||
|
If the SMSC is not specified and one is required, the default SMSC is
|
||||||
|
used.
|
||||||
|
-->
|
||||||
|
<method name="Create">
|
||||||
|
<arg name="properties" type="a{sv}" direction="in">
|
||||||
|
<annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QVariantMap"/>
|
||||||
|
</arg>
|
||||||
|
<arg name="path" type="o" direction="out" />
|
||||||
|
</method>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Added:
|
||||||
|
@path: Object path of the new SMS.
|
||||||
|
@received: %TRUE if the message was received from the network, as opposed to being added locally.
|
||||||
|
|
||||||
|
Emitted when any part of a new SMS has been received or added (but not
|
||||||
|
for subsequent parts, if any). For messages received from the network,
|
||||||
|
not all parts may have been received and the message may not be
|
||||||
|
complete.
|
||||||
|
|
||||||
|
Check the
|
||||||
|
'<link linkend="gdbus-property-org-freedesktop-ModemManager1-Sms.State">State</link>'
|
||||||
|
property to determine if the message is complete.
|
||||||
|
-->
|
||||||
|
<signal name="Added">
|
||||||
|
<arg name="path" type="o" />
|
||||||
|
<arg name="received" type="b" />
|
||||||
|
</signal>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Deleted:
|
||||||
|
@path: Object path of the now deleted SMS.
|
||||||
|
|
||||||
|
Emitted when a message has been deleted.
|
||||||
|
-->
|
||||||
|
<signal name="Deleted">
|
||||||
|
<arg name="path" type="o" />
|
||||||
|
</signal>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Messages:
|
||||||
|
|
||||||
|
The list of SMS object paths.
|
||||||
|
-->
|
||||||
|
<property name="Messages" type="ao" access="read" />
|
||||||
|
|
||||||
|
<!--
|
||||||
|
SupportedStorages:
|
||||||
|
|
||||||
|
A list of <link linkend="MMSmsStorage">MMSmsStorage</link> values,
|
||||||
|
specifying the storages supported by this modem for storing and
|
||||||
|
receiving SMS.
|
||||||
|
-->
|
||||||
|
<property name="SupportedStorages" type="au" access="read">
|
||||||
|
<annotation name="org.qtproject.QtDBus.QtTypeName" value="UIntList"/>
|
||||||
|
</property>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
DefaultStorage:
|
||||||
|
|
||||||
|
A <link linkend="MMSmsStorage">MMSmsStorage</link> value,
|
||||||
|
specifying the storage to be used when receiving or storing SMS.
|
||||||
|
-->
|
||||||
|
<property name="DefaultStorage" type="u" access="read" />
|
||||||
|
|
||||||
|
</interface>
|
||||||
|
</node>
|
|
@ -0,0 +1,94 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
ModemManager 1.0 Interface Specification
|
||||||
|
|
||||||
|
Copyright (C) 2008 Novell, Inc.
|
||||||
|
Copyright (C) 2008-2013 Red Hat, Inc.
|
||||||
|
Copyright (C) 2011-2013 Google, Inc.
|
||||||
|
Copyright (C) 2011-2013 Lanedo GmbH
|
||||||
|
-->
|
||||||
|
|
||||||
|
<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
|
||||||
|
|
||||||
|
<!--
|
||||||
|
org.freedesktop.ModemManager1.Modem.Modem3gpp.Ussd:
|
||||||
|
@short_description: The ModemManager 3GPP USSD interface.
|
||||||
|
|
||||||
|
This interface provides access to actions based on the USSD protocol.
|
||||||
|
-->
|
||||||
|
<interface name="org.freedesktop.ModemManager1.Modem.Modem3gpp.Ussd">
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Initiate:
|
||||||
|
@command: The command to start the USSD session with.
|
||||||
|
@reply: The network response to the command which started the USSD session.
|
||||||
|
|
||||||
|
Sends a USSD command string to the network initiating a USSD session.
|
||||||
|
|
||||||
|
When the request is handled by the network, the method returns the
|
||||||
|
response or an appropriate error. The network may be awaiting further
|
||||||
|
response from the ME after returning from this method and no new command
|
||||||
|
can be initiated until this one is cancelled or ended.
|
||||||
|
-->
|
||||||
|
<method name="Initiate">
|
||||||
|
<arg name="command" type="s" direction="in" />
|
||||||
|
<arg name="reply" type="s" direction="out" />
|
||||||
|
</method>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Respond:
|
||||||
|
@response: The response to network-initiated USSD command, or a response to a request for further input.
|
||||||
|
@reply: The network reply to this response to the network-initiated USSD command. The reply may require further responses.
|
||||||
|
|
||||||
|
Respond to a USSD request that is either initiated by the mobile network,
|
||||||
|
or that is awaiting further input after
|
||||||
|
<link linkend="gdbus-method-org-freedesktop-ModemManager1-Modem-Modem3gpp-Ussd.Initiate">Initiate()</link>
|
||||||
|
was called.
|
||||||
|
-->
|
||||||
|
<method name="Respond">
|
||||||
|
<arg name="response" type="s" direction="in" />
|
||||||
|
<arg name="reply" type="s" direction="out" />
|
||||||
|
</method>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Cancel:
|
||||||
|
|
||||||
|
Cancel an ongoing USSD session, either mobile or network initiated.
|
||||||
|
-->
|
||||||
|
<method name="Cancel" />
|
||||||
|
|
||||||
|
<!--
|
||||||
|
State:
|
||||||
|
|
||||||
|
A <link linkend="MMModem3gppUssdSessionState">MMModem3gppUssdSessionState</link> value,
|
||||||
|
indicating the state of any ongoing USSD session.
|
||||||
|
-->
|
||||||
|
<property name="State" type="u" access="read" />
|
||||||
|
|
||||||
|
<!--
|
||||||
|
NetworkNotification:
|
||||||
|
|
||||||
|
Contains any network-initiated request to which no USSD response is
|
||||||
|
required.
|
||||||
|
|
||||||
|
When no USSD session is active, or when there is no network-
|
||||||
|
initiated request, this property will be a zero-length string.
|
||||||
|
-->
|
||||||
|
<property name="NetworkNotification" type="s" access="read" />
|
||||||
|
|
||||||
|
<!--
|
||||||
|
NetworkRequest:
|
||||||
|
|
||||||
|
Contains any pending network-initiated request for a response. Client
|
||||||
|
should call
|
||||||
|
<link linkend="gdbus-method-org-freedesktop-ModemManager1-Modem-Modem3gpp-Ussd.Respond">Respond()</link>
|
||||||
|
with the appropriate response to this request.
|
||||||
|
|
||||||
|
When no USSD session is active, or when there is no pending
|
||||||
|
network-initiated request, this property will be a zero-length string.
|
||||||
|
-->
|
||||||
|
<property name="NetworkRequest" type="s" access="read" />
|
||||||
|
|
||||||
|
</interface>
|
||||||
|
</node>
|
|
@ -0,0 +1,151 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
ModemManager 1.0 Interface Specification
|
||||||
|
|
||||||
|
Copyright (C) 2008 Novell, Inc.
|
||||||
|
Copyright (C) 2008-2013 Red Hat, Inc.
|
||||||
|
Copyright (C) 2011-2013 Google, Inc.
|
||||||
|
Copyright (C) 2011-2013 Lanedo GmbH
|
||||||
|
-->
|
||||||
|
|
||||||
|
<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
|
||||||
|
|
||||||
|
<!--
|
||||||
|
org.freedesktop.ModemManager1.Modem.Modem3gpp:
|
||||||
|
@short_description: The ModemManager 3GPP interface.
|
||||||
|
|
||||||
|
This interface provides access to specific actions that may be performed
|
||||||
|
in modems with 3GPP capabilities.
|
||||||
|
-->
|
||||||
|
<interface name="org.freedesktop.ModemManager1.Modem.Modem3gpp">
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Register:
|
||||||
|
@operator_id: The operator ID (ie, <literal>"MCCMNC"</literal>, like <literal>"310260"</literal>) to register. An empty string can be used to register to the home network.
|
||||||
|
|
||||||
|
Request registration with a given mobile network.
|
||||||
|
-->
|
||||||
|
<method name="Register">
|
||||||
|
<arg name="operator_id" type="s" direction="in" />
|
||||||
|
</method>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Scan:
|
||||||
|
@results: Array of dictionaries with the found networks.
|
||||||
|
|
||||||
|
Scan for available networks.
|
||||||
|
|
||||||
|
@results is an array of dictionaries with each array element describing
|
||||||
|
a mobile network found in the scan. Each dictionary may include one or
|
||||||
|
more of the following keys:
|
||||||
|
<variablelist>
|
||||||
|
<varlistentry><term><literal>"status"</literal></term>
|
||||||
|
<listitem>
|
||||||
|
A <link linkend="MMModem3gppNetworkAvailability">MMModem3gppNetworkAvailability</link>
|
||||||
|
value representing network availability status, given as an
|
||||||
|
unsigned integer (signature <literal>"u"</literal>). This key will
|
||||||
|
always be present.
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry><term><literal>"operator-long"</literal></term>
|
||||||
|
<listitem>
|
||||||
|
Long-format name of operator, given as a string value (signature
|
||||||
|
<literal>"s"</literal>). If the name is unknown, this field
|
||||||
|
should not be present.
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry><term><literal>"operator-short"</literal></term>
|
||||||
|
<listitem>
|
||||||
|
Short-format name of operator, given as a string value (signature
|
||||||
|
<literal>"s"</literal>). If the name is unknown, this field
|
||||||
|
should not be present.
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry><term><literal>"operator-code"</literal></term>
|
||||||
|
<listitem>
|
||||||
|
Mobile code of the operator, given as a string value (signature
|
||||||
|
<literal>"s"</literal>). Returned in the format
|
||||||
|
<literal>"MCCMNC"</literal>, where <literal>MCC</literal> is the
|
||||||
|
three-digit ITU E.212 Mobile Country Code and <literal>MNC</literal>
|
||||||
|
is the two- or three-digit GSM Mobile Network Code. e.g.
|
||||||
|
<literal>"31026"</literal> or <literal>"310260"</literal>.
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry><term><literal>"access-technology"</literal></term>
|
||||||
|
<listitem>
|
||||||
|
A <link linkend="MMModemAccessTechnology">MMModemAccessTechnology</link> value
|
||||||
|
representing the generic access technology used by this mobile network,
|
||||||
|
given as an unsigned integer (signature <literal>"u"</literal>).
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
</variablelist>
|
||||||
|
-->
|
||||||
|
<method name="Scan">
|
||||||
|
<arg name="results" type="aa{sv}" direction="out">
|
||||||
|
<annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QVariantMapList"/>
|
||||||
|
</arg>
|
||||||
|
</method>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Imei:
|
||||||
|
|
||||||
|
The <ulink url="http://en.wikipedia.org/wiki/Imei">IMEI</ulink> of the device.
|
||||||
|
-->
|
||||||
|
<property name="Imei" type="s" access="read" />
|
||||||
|
|
||||||
|
<!--
|
||||||
|
RegistrationState:
|
||||||
|
|
||||||
|
A <link linkend="MMModem3gppRegistrationState">MMModem3gppRegistrationState</link>
|
||||||
|
value specifying the mobile registration status as defined in 3GPP TS 27.007
|
||||||
|
section 10.1.19.
|
||||||
|
-->
|
||||||
|
<property name="RegistrationState" type="u" access="read" />
|
||||||
|
|
||||||
|
<!--
|
||||||
|
OperatorCode:
|
||||||
|
|
||||||
|
Code of the operator to which the mobile is currently registered.
|
||||||
|
|
||||||
|
Returned in the format <literal>"MCCMNC"</literal>, where
|
||||||
|
<literal>MCC</literal> is the three-digit ITU E.212 Mobile Country Code
|
||||||
|
and <literal>MNC</literal> is the two- or three-digit GSM Mobile Network
|
||||||
|
Code. e.g. e<literal>"31026"</literal> or <literal>"310260"</literal>.
|
||||||
|
|
||||||
|
If the <literal>MCC</literal> and <literal>MNC</literal> are not known
|
||||||
|
or the mobile is not registered to a mobile network, this property will
|
||||||
|
be a zero-length (blank) string.
|
||||||
|
-->
|
||||||
|
<property name="OperatorCode" type="s" access="read" />
|
||||||
|
|
||||||
|
<!--
|
||||||
|
OperatorName:
|
||||||
|
|
||||||
|
Name of the operator to which the mobile is currently registered.
|
||||||
|
|
||||||
|
If the operator name is not known or the mobile is not
|
||||||
|
registered to a mobile network, this property will be a zero-length
|
||||||
|
(blank) string.
|
||||||
|
-->
|
||||||
|
<property name="OperatorName" type="s" access="read" />
|
||||||
|
|
||||||
|
<!--
|
||||||
|
EnabledFacilityLocks:
|
||||||
|
|
||||||
|
Bitmask of <link linkend="MMModem3gppFacility">MMModem3gppFacility</link> values
|
||||||
|
for which PIN locking is enabled.
|
||||||
|
-->
|
||||||
|
<property name="EnabledFacilityLocks" type="u" access="read" />
|
||||||
|
|
||||||
|
<!--
|
||||||
|
SubscriptionState:
|
||||||
|
|
||||||
|
A <link linkend="MMModem3gppSubscriptionState">MMModem3gppSubscriptionState</link>
|
||||||
|
value representing the subscription status of the account and whether there
|
||||||
|
is any data remaining, given as an unsigned integer (signature <literal>"u"</literal>).
|
||||||
|
-->
|
||||||
|
<property name="SubscriptionState" type="u" access="read" />
|
||||||
|
|
||||||
|
</interface>
|
||||||
|
</node>
|
|
@ -0,0 +1,189 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
ModemManager 1.0 Interface Specification
|
||||||
|
|
||||||
|
Copyright (C) 2008 Novell, Inc.
|
||||||
|
Copyright (C) 2008-2013 Red Hat, Inc.
|
||||||
|
Copyright (C) 2011-2013 Google, Inc.
|
||||||
|
Copyright (C) 2011-2013 Lanedo GmbH
|
||||||
|
-->
|
||||||
|
|
||||||
|
<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
|
||||||
|
|
||||||
|
<!--
|
||||||
|
org.freedesktop.ModemManager1.Modem.ModemCdma:
|
||||||
|
@short_description: The ModemManager CDMA interface.
|
||||||
|
|
||||||
|
This interface provides access to specific actions that may be performed
|
||||||
|
in modems with CDMA capabilities.
|
||||||
|
-->
|
||||||
|
<interface name="org.freedesktop.ModemManager1.Modem.ModemCdma">
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Activate:
|
||||||
|
@carrier_code: Name of carrier, or carrier-specific code.
|
||||||
|
|
||||||
|
Provisions the modem for use with a given carrier using the modem's
|
||||||
|
<ulink url="http://en.wikipedia.org/wiki/Over-the-air_programming">Over-The-Air (OTA)</ulink>
|
||||||
|
activation functionality, if any.
|
||||||
|
|
||||||
|
Some modems will reboot after this call is made.
|
||||||
|
-->
|
||||||
|
<method name="Activate">
|
||||||
|
<arg name="carrier_code" type="s" direction="in" />
|
||||||
|
</method>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
ActivateManual:
|
||||||
|
@properties: A dictionary of properties to set on the modem.
|
||||||
|
|
||||||
|
Sets the modem provisioning data directly, without contacting the
|
||||||
|
carrier over the air.
|
||||||
|
|
||||||
|
Some modems will reboot after this call is made.
|
||||||
|
|
||||||
|
This dictionary is composed of a string identifier key
|
||||||
|
with an associated data which contains type-specific location
|
||||||
|
information:
|
||||||
|
|
||||||
|
<variablelist>
|
||||||
|
<varlistentry><term>"spc"</term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
The Service Programming Code, given as a string of exactly 6 digit characters. Mandatory parameter.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry><term>"sid"</term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
The System Identification Number, given as a 16-bit unsigned integer (signature <literal>"q"</literal>). Mandatory parameter.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry><term>"mdn"</term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
The Mobile Directory Number, given as a string of maximum 15 characters. Mandatory parameter.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry><term>"min"</term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
The Mobile Identification Number, given as a string of maximum 15 characters. Mandatory parameter.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry><term>"mn-ha-key"</term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
The MN-HA key, given as a string of maximum 16 characters.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry><term>"mn-aaa-key"</term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
The MN-AAA key, given as a string of maximum 16 characters.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry><term>"prl"</term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
The Preferred Roaming List, given as an array of maximum 16384 bytes.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
</variablelist>
|
||||||
|
-->
|
||||||
|
<method name="ActivateManual">
|
||||||
|
<arg name="properties" type="a{sv}" direction="in">
|
||||||
|
<annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QVariantMap"/>
|
||||||
|
</arg>
|
||||||
|
</method>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
ActivationStateChanged:
|
||||||
|
@activation_state: Current activation state, given as a <link linkend="MMModemCdmaActivationState">MMModemCdmaActivationState</link>.
|
||||||
|
@activation_error: Carrier-specific error code, given as a <link linkend="MMCdmaActivationError">MMCdmaActivationError</link>.
|
||||||
|
@status_changes: Properties that have changed as a result of this activation state change, including <literal>"mdn"</literal> and <literal>"min"</literal>. The dictionary may be empty if the changed properties are unknown.
|
||||||
|
|
||||||
|
The device activation state changed.
|
||||||
|
-->
|
||||||
|
<signal name="ActivationStateChanged">
|
||||||
|
<arg name="activation_state" type="u" />
|
||||||
|
<arg name="activation_error" type="u" />
|
||||||
|
<arg name="status_changes" type="a{sv}">
|
||||||
|
<annotation name="org.qtproject.QtDBus.QtTypeName.In2" value="QVariantMap"/>
|
||||||
|
</arg>
|
||||||
|
</signal>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
ActivationState:
|
||||||
|
|
||||||
|
A <link linkend="MMModemCdmaActivationState">MMModemCdmaActivationState</link>
|
||||||
|
value specifying the state of the activation in the 3GPP2 network.
|
||||||
|
-->
|
||||||
|
<property name="ActivationState" type="u" access="read" />
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Meid:
|
||||||
|
|
||||||
|
The modem's <ulink url="http://en.wikipedia.org/wiki/MEID">Mobile Equipment Identifier</ulink>.
|
||||||
|
-->
|
||||||
|
<property name="Meid" type="s" access="read" />
|
||||||
|
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Esn:
|
||||||
|
|
||||||
|
The modem's
|
||||||
|
<ulink url="http://en.wikipedia.org/wiki/Electronic_serial_number">Electronic Serial Number</ulink>
|
||||||
|
(superseded by MEID but still used by older devices).
|
||||||
|
-->
|
||||||
|
<property name="Esn" type="s" access="read" />
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Sid:
|
||||||
|
|
||||||
|
The
|
||||||
|
<ulink url="http://en.wikipedia.org/wiki/System_Identification_Number">System Identifier</ulink>
|
||||||
|
of the serving CDMA 1x network, if known, and
|
||||||
|
if the modem is registered with a CDMA 1x network.
|
||||||
|
|
||||||
|
See <ulink url="http://ifast.org">ifast.org</ulink> or the mobile
|
||||||
|
broadband provider database for mappings of SIDs to network providers.
|
||||||
|
-->
|
||||||
|
<property name="Sid" type="u" access="read" />
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Nid:
|
||||||
|
|
||||||
|
The
|
||||||
|
<ulink url="http://en.wikipedia.org/wiki/Network_Identification_Number">Network Identifier</ulink>
|
||||||
|
of the serving CDMA 1x network, if known, and
|
||||||
|
if the modem is registered with a CDMA 1x network.
|
||||||
|
-->
|
||||||
|
<property name="Nid" type="u" access="read" />
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Cdma1xRegistrationState:
|
||||||
|
|
||||||
|
A <link linkend="MMModemCdmaRegistrationState">MMModemCdmaRegistrationState</link>
|
||||||
|
value specifying the CDMA 1x registration state.
|
||||||
|
-->
|
||||||
|
<property name="Cdma1xRegistrationState" type="u" access="read" />
|
||||||
|
|
||||||
|
<!--
|
||||||
|
EvdoRegistrationState:
|
||||||
|
|
||||||
|
A <link linkend="MMModemCdmaRegistrationState">MMModemCdmaRegistrationState</link>
|
||||||
|
value specifying the EVDO registration state.
|
||||||
|
-->
|
||||||
|
<property name="EvdoRegistrationState" type="u" access="read" />
|
||||||
|
|
||||||
|
</interface>
|
||||||
|
</node>
|
|
@ -0,0 +1,125 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
ModemManager 1.0 Interface Specification
|
||||||
|
|
||||||
|
Copyright (C) 2013 Google, Inc.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
|
||||||
|
|
||||||
|
<!--
|
||||||
|
org.freedesktop.ModemManager1.Modem.Oma:
|
||||||
|
@short_description: The ModemManager Open Mobile Alliance interface.
|
||||||
|
|
||||||
|
This interface allows clients to handle device management operations as
|
||||||
|
specified by the Open Mobile Alliance (OMA).
|
||||||
|
|
||||||
|
Device management sessions are either on-demand (client-initiated), or
|
||||||
|
automatically initiated by either the device itself or the network.
|
||||||
|
-->
|
||||||
|
<interface name="org.freedesktop.ModemManager1.Modem.Oma">
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Setup:
|
||||||
|
@features: Bitmask of <link linkend="MMModemOmaFeature">MMModemOmaFeature</link> flags, specifying which device management features should get enabled or disabled. <link linkend="MM-OMA-FEATURE-NONE:CAPS">MM_OMA_FEATURE_NONE</link> will disable all features.
|
||||||
|
|
||||||
|
Configures which OMA device management features should be enabled.
|
||||||
|
-->
|
||||||
|
<method name="Setup">
|
||||||
|
<arg name="features" type="u" direction="in" />
|
||||||
|
</method>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
StartClientInitiatedSession:
|
||||||
|
@session_type: Type of client-initiated device management session,given as a <link linkend="MMModemOmaSessionType">MMModemOmaSessionType</link>
|
||||||
|
|
||||||
|
Starts a client-initiated device management session.
|
||||||
|
-->
|
||||||
|
<method name="StartClientInitiatedSession">
|
||||||
|
<arg name="session_type" type="u" direction="in" />
|
||||||
|
</method>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
AcceptNetworkInitiatedSession:
|
||||||
|
@session_id: Unique ID of the network-initiated device management session.
|
||||||
|
@accept: Boolean specifying whether the session is accepted or rejected.
|
||||||
|
|
||||||
|
Accepts or rejects a network-initiated device management session.
|
||||||
|
-->
|
||||||
|
<method name="AcceptNetworkInitiatedSession">
|
||||||
|
<arg name="session_id" type="u" direction="in" />
|
||||||
|
<arg name="accept" type="b" direction="in" />
|
||||||
|
</method>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
CancelSession:
|
||||||
|
|
||||||
|
Cancels the current on-going device management session.
|
||||||
|
-->
|
||||||
|
<method name="CancelSession" />
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Features:
|
||||||
|
|
||||||
|
Bitmask of <link linkend="MMModemOmaFeature">MMModemOmaFeature</link>
|
||||||
|
flags, specifying which device management features are enabled or
|
||||||
|
disabled.
|
||||||
|
-->
|
||||||
|
<property name="Features" type="u" access="read" />
|
||||||
|
|
||||||
|
<!--
|
||||||
|
PendingNetworkInitiatedSessions:
|
||||||
|
|
||||||
|
List of network-initiated sessions which are waiting to be accepted or
|
||||||
|
rejected, given as an array of unsigned integer pairs, where:
|
||||||
|
|
||||||
|
<variablelist>
|
||||||
|
<varlistentry>
|
||||||
|
<listitem>
|
||||||
|
The first integer is a <link linkend="MMOmaSessionType">MMOmaSessionType</link>.
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry>
|
||||||
|
<listitem>
|
||||||
|
The second integer is the unique session ID.
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
</variablelist>
|
||||||
|
-->
|
||||||
|
<property name="PendingNetworkInitiatedSessions" type="a(uu)" access="read">
|
||||||
|
<annotation name="org.qtproject.QtDBus.QtTypeName" value="OmaSessionTypes"/>
|
||||||
|
</property>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
SessionType:
|
||||||
|
|
||||||
|
Type of the current on-going device management session, given as a
|
||||||
|
<link linkend="MMOmaSessionType">MMOmaSessionType</link>.
|
||||||
|
-->
|
||||||
|
<property name="SessionType" type="u" access="read" />
|
||||||
|
|
||||||
|
<!--
|
||||||
|
SessionState:
|
||||||
|
|
||||||
|
State of the current on-going device management session, given as a
|
||||||
|
<link linkend="MMOmaSessionState">MMOmaSessionState</link>.
|
||||||
|
-->
|
||||||
|
<property name="SessionState" type="i" access="read" />
|
||||||
|
|
||||||
|
<!--
|
||||||
|
SessionStateChanged:
|
||||||
|
@old_session_state: Previous session state, given as a <link linkend="MMOmaSessionState">MMOmaSessionState</link>.
|
||||||
|
@new_session_state: Current session state, given as a <link linkend="MMOmaSessionState">MMOmaSessionState</link>.
|
||||||
|
@session_state_failed_reason: Reason of failure, given as a <link linkend="MMOmaSessionStateFailedReason">MMOmaSessionStateFailedReason</link>, if @session_state is <link linkend="MM-OMA-SESSION-STATE-FAILED:CAPS">MM_OMA_SESSION_STATE_FAILED</link>.
|
||||||
|
|
||||||
|
The session state changed.
|
||||||
|
-->
|
||||||
|
<signal name="SessionStateChanged">
|
||||||
|
<arg name="old_session_state" type="i" />
|
||||||
|
<arg name="new_session_state" type="i" />
|
||||||
|
<arg name="session_state_failed_reason" type="u" />
|
||||||
|
</signal>
|
||||||
|
|
||||||
|
</interface>
|
||||||
|
</node>
|
|
@ -0,0 +1,221 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
ModemManager 0.8 Interface Specification
|
||||||
|
|
||||||
|
Copyright (C) 2013 Aleksander Morgado <aleksander@gnu.org>
|
||||||
|
-->
|
||||||
|
|
||||||
|
<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
|
||||||
|
|
||||||
|
<!--
|
||||||
|
org.freedesktop.ModemManager1.Modem.Signal:
|
||||||
|
@short_description: The ModemManager Signal interface.
|
||||||
|
|
||||||
|
This interface provides access to extended signal quality information.
|
||||||
|
-->
|
||||||
|
<interface name="org.freedesktop.ModemManager1.Modem.Signal">
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Setup:
|
||||||
|
@rate: refresh rate to set, in seconds. 0 to disable retrieval.
|
||||||
|
|
||||||
|
Setup extended signal quality information retrieval.
|
||||||
|
-->
|
||||||
|
<method name="Setup">
|
||||||
|
<arg name="rate" type="u" direction="in" />
|
||||||
|
</method>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Rate:
|
||||||
|
|
||||||
|
Refresh rate for the extended signal quality information updates,
|
||||||
|
in seconds. A value of 0 disables the retrieval of the values.
|
||||||
|
-->
|
||||||
|
<property name="Rate" type="u" access="read" />
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Cdma:
|
||||||
|
|
||||||
|
Dictionary of available signal information for the CDMA1x access
|
||||||
|
technology.
|
||||||
|
|
||||||
|
This dictionary is composed of a string key, with an associated data
|
||||||
|
which contains type-specific information.
|
||||||
|
|
||||||
|
<variablelist>
|
||||||
|
<varlistentry><term><literal>"rssi"</literal></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
The CDMA1x RSSI (Received Signal Strength Indication), in dBm,
|
||||||
|
given as a floating point value (signature <literal>"d"</literal>).
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry><term><literal>"ecio"</literal></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
The CDMA1x Ec/Io, in dBm, given as a floating point value
|
||||||
|
(signature <literal>"d"</literal>).
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
</variablelist>
|
||||||
|
-->
|
||||||
|
<property name="Cdma" type="a{sv}" access="read">
|
||||||
|
<annotation name="org.qtproject.QtDBus.QtTypeName" value="QVariantMap"/>
|
||||||
|
</property>
|
||||||
|
<!--
|
||||||
|
Evdo:
|
||||||
|
|
||||||
|
Dictionary of available signal information for the CDMA EV-DO access
|
||||||
|
technology.
|
||||||
|
|
||||||
|
This dictionary is composed of a string key, with an associated data
|
||||||
|
which contains type-specific information.
|
||||||
|
|
||||||
|
<variablelist>
|
||||||
|
<varlistentry><term><literal>"rssi"</literal></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
The CDMA EV-DO RSSI (Received Signal Strength Indication), in dBm,
|
||||||
|
given as a floating point value (signature <literal>"d"</literal>).
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry><term><literal>"ecio"</literal></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
The CDMA EV-DO Ec/Io, in dBm, given as a floating point value
|
||||||
|
(signature <literal>"d"</literal>).
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry><term><literal>"sinr"</literal></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
CDMA EV-DO SINR level, in dB, given as a floating point value
|
||||||
|
(signature <literal>"d"</literal>).
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry><term><literal>"io"</literal></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
The CDMA EV-DO Io, in dBm, given as a floating point value
|
||||||
|
(signature <literal>"d"</literal>).
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
</variablelist>
|
||||||
|
-->
|
||||||
|
<property name="Evdo" type="a{sv}" access="read">
|
||||||
|
<annotation name="org.qtproject.QtDBus.QtTypeName" value="QVariantMap"/>
|
||||||
|
</property>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Gsm:
|
||||||
|
|
||||||
|
Dictionary of available signal information for the GSM/GPRS access
|
||||||
|
technology.
|
||||||
|
|
||||||
|
This dictionary is composed of a string key, with an associated data
|
||||||
|
which contains type-specific information.
|
||||||
|
|
||||||
|
<variablelist>
|
||||||
|
<varlistentry><term><literal>"rssi"</literal></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
The GSM RSSI (Received Signal Strength Indication), in dBm,
|
||||||
|
given as a floating point value (signature <literal>"d"</literal>).
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
</variablelist>
|
||||||
|
-->
|
||||||
|
<property name="Gsm" type="a{sv}" access="read">
|
||||||
|
<annotation name="org.qtproject.QtDBus.QtTypeName" value="QVariantMap"/>
|
||||||
|
</property>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Umts:
|
||||||
|
|
||||||
|
Dictionary of available signal information for the UMTS (WCDMA) access
|
||||||
|
technology.
|
||||||
|
|
||||||
|
This dictionary is composed of a string key, with an associated data
|
||||||
|
which contains type-specific information.
|
||||||
|
|
||||||
|
<variablelist>
|
||||||
|
<varlistentry><term><literal>"rssi"</literal></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
The UMTS RSSI (Received Signal Strength Indication), in dBm,
|
||||||
|
given as a floating point value (signature <literal>"d"</literal>).
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry><term><literal>"ecio"</literal></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
The UMTS Ec/Io, in dBm, given as a floating point value
|
||||||
|
(signature <literal>"d"</literal>).
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
</variablelist>
|
||||||
|
-->
|
||||||
|
<property name="Umts" type="a{sv}" access="read">
|
||||||
|
<annotation name="org.qtproject.QtDBus.QtTypeName" value="QVariantMap"/>
|
||||||
|
</property>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Lte:
|
||||||
|
|
||||||
|
Dictionary of available signal information for the UMTS (WCDMA) access
|
||||||
|
technology.
|
||||||
|
|
||||||
|
This dictionary is composed of a string key, with an associated data
|
||||||
|
which contains type-specific information.
|
||||||
|
|
||||||
|
<variablelist>
|
||||||
|
<varlistentry><term><literal>"rssi"</literal></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
The LTE RSSI (Received Signal Strength Indication), in dBm,
|
||||||
|
given as a floating point value (signature <literal>"d"</literal>).
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry><term><literal>"rsrq"</literal></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
The LTE RSRQ (Reference Signal Received Quality), in dB, given as
|
||||||
|
a floating point value (signature <literal>"d"</literal>).
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry><term><literal>"rsrp"</literal></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
The LTE RSRP (Reference Signal Received Power), in dBm, given as
|
||||||
|
a floating point value (signature <literal>"d"</literal>).
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry><term><literal>"snr"</literal></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
The LTE S/R ratio, in dB, given as
|
||||||
|
a floating point value (signature <literal>"d"</literal>).
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
</variablelist>
|
||||||
|
-->
|
||||||
|
<property name="Lte" type="a{sv}" access="read">
|
||||||
|
<annotation name="org.qtproject.QtDBus.QtTypeName" value="QVariantMap"/>
|
||||||
|
</property>
|
||||||
|
|
||||||
|
</interface>
|
||||||
|
</node>
|
|
@ -0,0 +1,216 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
ModemManager 1.0 Interface Specification
|
||||||
|
|
||||||
|
Copyright (C) 2008 Novell, Inc.
|
||||||
|
Copyright (C) 2008-2013 Red Hat, Inc.
|
||||||
|
Copyright (C) 2011-2013 Google, Inc.
|
||||||
|
Copyright (C) 2011-2013 Lanedo GmbH
|
||||||
|
-->
|
||||||
|
|
||||||
|
<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
|
||||||
|
|
||||||
|
<!--
|
||||||
|
org.freedesktop.ModemManager1.Modem.Simple:
|
||||||
|
@short_description: The ModemManager Simple interface.
|
||||||
|
|
||||||
|
The Simple interface allows controlling and querying the status of Modems.
|
||||||
|
-->
|
||||||
|
<interface name="org.freedesktop.ModemManager1.Modem.Simple">
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Connect:
|
||||||
|
@properties: Dictionary of properties needed to get the modem connected.
|
||||||
|
@bearer: On successful connect, returns the object path of the connected packet data bearer used for the connection attempt.
|
||||||
|
|
||||||
|
Do everything needed to connect the modem using the given properties.
|
||||||
|
|
||||||
|
This method will attempt to find a matching packet data bearer and
|
||||||
|
activate it if necessary, returning the bearer's IP details. If no
|
||||||
|
matching bearer is found, a new bearer will be created and activated,
|
||||||
|
but this operation may fail if no resources are available to complete
|
||||||
|
this connection attempt (ie, if a conflicting bearer is already active).
|
||||||
|
|
||||||
|
This call may make a large number of changes to modem configuration
|
||||||
|
based on properties passed in. For example, given a PIN-locked, disabled
|
||||||
|
GSM/UMTS modem, this call may unlock the SIM PIN, alter the access
|
||||||
|
technology preference, wait for network registration (or force
|
||||||
|
registration to a specific provider), create a new packet data bearer
|
||||||
|
using the given "apn", and connect that bearer.
|
||||||
|
|
||||||
|
Allowed key/value pairs in @properties are:
|
||||||
|
<variablelist>
|
||||||
|
<varlistentry><term><literal>"pin"</literal></term>
|
||||||
|
<listitem>
|
||||||
|
SIM-PIN unlock code, given as a string value (signature <literal>"s"</literal>).
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry><term><literal>"operator-id"</literal></term>
|
||||||
|
<listitem>
|
||||||
|
ETSI MCC-MNC of a network to force registration with,
|
||||||
|
given as a string value (signature <literal>"s"</literal>).
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry><term><literal>"apn"</literal></term>
|
||||||
|
<listitem>
|
||||||
|
For GSM/UMTS and LTE devices the APN to use,
|
||||||
|
given as a string value (signature <literal>"s"</literal>).
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry><term><literal>"ip-type"</literal></term>
|
||||||
|
<listitem>
|
||||||
|
For GSM/UMTS and LTE devices the IP addressing type to use,
|
||||||
|
given as a <link linkend="MMBearerIpFamily">MMBearerIpFamily</link>
|
||||||
|
value (signature <literal>"u"</literal>).
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry><term><literal>"allowed-auth"</literal></term>
|
||||||
|
<listitem>
|
||||||
|
The authentication method to use, given as a
|
||||||
|
<link linkend="MMBearerAllowedAuth">MMBearerAllowedAuth</link>
|
||||||
|
value (signature <literal>"u"</literal>). Optional in 3GPP.
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry><term><literal>"user"</literal></term>
|
||||||
|
<listitem>
|
||||||
|
User name (if any) required by the network, given as a string
|
||||||
|
value (signature <literal>"s"</literal>). Optional in 3GPP.
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry><term><literal>"password"</literal></term>
|
||||||
|
<listitem>
|
||||||
|
Password (if any) required by the network, given as a string value
|
||||||
|
(signature <literal>"s"</literal>). Optional in 3GPP.
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry><term><literal>"number"</literal></term>
|
||||||
|
<listitem>
|
||||||
|
For POTS devices the number to dial,,
|
||||||
|
given as a string value (signature <literal>"s"</literal>).
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry><term><literal>"allow-roaming"</literal></term>
|
||||||
|
<listitem>
|
||||||
|
%FALSE to allow only connections to home networks,
|
||||||
|
given as a boolean value (signature <literal>"b"</literal>).
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry><term><literal>"rm-protocol"</literal></term>
|
||||||
|
<listitem>
|
||||||
|
For CDMA devices, the protocol of the Rm interface, given as a
|
||||||
|
<link linkend="MMModemCdmaRmProtocol">MMModemCdmaRmProtocol</link>
|
||||||
|
value (signature <literal>"u"</literal>).
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
</variablelist>
|
||||||
|
-->
|
||||||
|
<method name="Connect">
|
||||||
|
<arg name="properties" type="a{sv}" direction="in" />
|
||||||
|
<arg name="bearer" type="o" direction="out" />
|
||||||
|
</method>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Disconnect:
|
||||||
|
@bearer: If given this method will disconnect the referenced packet
|
||||||
|
data bearer, while if "/" (ie, no object given) this method will
|
||||||
|
disconnect all active packet data bearers.
|
||||||
|
|
||||||
|
Disconnect an active packet data connection.
|
||||||
|
-->
|
||||||
|
<method name="Disconnect">
|
||||||
|
<arg name="bearer" type="o" direction="in" />
|
||||||
|
</method>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
GetStatus:
|
||||||
|
@properties: Dictionary of properties.
|
||||||
|
|
||||||
|
Get the general modem status.
|
||||||
|
|
||||||
|
The predefined common properties returned are:
|
||||||
|
<variablelist>
|
||||||
|
<varlistentry><term><literal>"state"</literal></term>
|
||||||
|
<listitem>
|
||||||
|
A <link linkend="MMModemState">MMModemState</link> value
|
||||||
|
specifying the overall state of the modem, given as an
|
||||||
|
unsigned integer value (signature <literal>"u"</literal>).
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry><term><literal>"signal-quality"</literal></term>
|
||||||
|
<listitem>
|
||||||
|
Signal quality value, given only when registered,
|
||||||
|
as an unsigned integer value
|
||||||
|
(signature <literal>"u"</literal>).
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry><term><literal>"current-bands"</literal></term>
|
||||||
|
<listitem>
|
||||||
|
List of <link linkend="MMModemBand">MMModemBand</link> values,
|
||||||
|
given only when registered, as a list of
|
||||||
|
unsigned integer values (signature <literal>"au"</literal>).
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry><term><literal>"access-technology"</literal></term>
|
||||||
|
<listitem>
|
||||||
|
A <link linkend="MMModemAccessTechnology">MMModemAccessTechnology</link> value,
|
||||||
|
given only when registered, as an unsigned integer value
|
||||||
|
(signature <literal>"u"</literal>).
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry><term><literal>"m3gpp-registration-state"</literal></term>
|
||||||
|
<listitem>
|
||||||
|
A <link linkend="MMModem3gppRegistrationState">MMModem3gppRegistrationState</link> value
|
||||||
|
specifying the state of the registration, given only when registered
|
||||||
|
in a 3GPP network, as an unsigned integer value (signature
|
||||||
|
<literal>"u"</literal>).
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry><term><literal>"m3gpp-operator-code"</literal></term>
|
||||||
|
<listitem>
|
||||||
|
Operator <literal>MCC-MNC</literal>, given only when registered
|
||||||
|
in a 3GPP network, as a string value (signature <literal>"s"</literal>).
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry><term><literal>"m3gpp-operator-name"</literal></term>
|
||||||
|
<listitem>
|
||||||
|
Operator name, given only when registered in a 3GPP network,
|
||||||
|
as a string value (signature <literal>"s"</literal>).
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry><term><literal>"cdma-cdma1x-registration-state"</literal></term>
|
||||||
|
<listitem>
|
||||||
|
A <link linkend="MMModemCdmaRegistrationState">MMModemCdmaRegistrationState</link> value
|
||||||
|
specifying the state of the registration, given only when registered
|
||||||
|
in a CDMA1x network, as an unsigned integer value (signature
|
||||||
|
<literal>"u"</literal>).
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry><term><literal>"cdma-evdo-registration-state"</literal></term>
|
||||||
|
<listitem>
|
||||||
|
A <link linkend="MMModemCdmaRegistrationState">MMModemCdmaRegistrationState</link> value
|
||||||
|
specifying the state of the registration, given only when registered
|
||||||
|
in a EV-DO network, as an unsigned integer value (signature
|
||||||
|
<literal>"u"</literal>).
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry><term><literal>"cdma-sid"</literal></term>
|
||||||
|
<listitem>
|
||||||
|
The System Identifier of the serving network, if registered in a CDMA1x network and if known.
|
||||||
|
Given as an unsigned integer value (signature <literal>"u"</literal>).
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry><term><literal>"cdma-nid"</literal></term>
|
||||||
|
<listitem>
|
||||||
|
The Network Identifier of the serving network, if registered in a CDMA1x network and if known.
|
||||||
|
Given as an unsigned integer value (signature <literal>"u"</literal>).
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
</variablelist>
|
||||||
|
-->
|
||||||
|
<method name="GetStatus">
|
||||||
|
<arg name="properties" type="a{sv}" direction="out" />
|
||||||
|
</method>
|
||||||
|
|
||||||
|
</interface>
|
||||||
|
</node>
|
|
@ -0,0 +1,80 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
ModemManager 1.0 Interface Specification
|
||||||
|
|
||||||
|
Copyright (C) 2011-2013 Red Hat, Inc.
|
||||||
|
Copyright (C) 2011-2013 Google, Inc.
|
||||||
|
Copyright (C) 2011-2013 Lanedo GmbH
|
||||||
|
-->
|
||||||
|
|
||||||
|
<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
|
||||||
|
|
||||||
|
<!--
|
||||||
|
org.freedesktop.ModemManager1.Modem.Time:
|
||||||
|
@short_description: The ModemManager Time interface.
|
||||||
|
|
||||||
|
This interface allows clients to receive network time and timezone
|
||||||
|
updates broadcast by mobile networks.
|
||||||
|
-->
|
||||||
|
<interface name="org.freedesktop.ModemManager1.Modem.Time">
|
||||||
|
|
||||||
|
<!--
|
||||||
|
GetNetworkTime:
|
||||||
|
@time: If the network time is known, a string containing local date,
|
||||||
|
time, and (if available) UTC offset in ISO 8601 format. If the network
|
||||||
|
time is unknown, the empty string.
|
||||||
|
|
||||||
|
Gets the current network time in local time.
|
||||||
|
|
||||||
|
This method will only work if the modem tracks, or can request, the
|
||||||
|
current network time; it will not attempt to use previously-received
|
||||||
|
network time updates on the host to guess the current network time.
|
||||||
|
-->
|
||||||
|
<method name="GetNetworkTime">
|
||||||
|
<arg name="time" type="s" direction="out" />
|
||||||
|
</method>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
NetworkTimezone:
|
||||||
|
|
||||||
|
The timezone data provided by the network. It may include one or more
|
||||||
|
of the following fields:
|
||||||
|
|
||||||
|
<variablelist>
|
||||||
|
<varlistentry><term><literal>"offset"</literal></term>
|
||||||
|
<listitem>
|
||||||
|
Offset of the timezone from UTC, in minutes (including DST, if applicable),
|
||||||
|
given as a signed integer value (signature <literal>"i"</literal>).
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry><term><literal>"dst-offset"</literal></term>
|
||||||
|
<listitem>
|
||||||
|
Amount of offset that is due to DST (daylight saving time),
|
||||||
|
given as a signed integer value (signature <literal>"i"</literal>).
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry><term><literal>"leap-seconds"</literal></term>
|
||||||
|
<listitem>
|
||||||
|
Number of leap seconds included in the network time,
|
||||||
|
given as a signed integer value (signature <literal>"i"</literal>).
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
</variablelist>
|
||||||
|
-->
|
||||||
|
<property name="NetworkTimezone" type="a{sv}" access="read">
|
||||||
|
<annotation name="org.qtproject.QtDBus.QtTypeName" value="QVariantMap"/>
|
||||||
|
</property>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
NetworkTimeChanged:
|
||||||
|
@time: A string containing date and time in ISO 8601 format.
|
||||||
|
|
||||||
|
Sent when the network time is updated.
|
||||||
|
-->
|
||||||
|
<signal name="NetworkTimeChanged">
|
||||||
|
<arg name="time" type="s" />
|
||||||
|
</signal>
|
||||||
|
|
||||||
|
</interface>
|
||||||
|
</node>
|
|
@ -0,0 +1,90 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
ModemManager 1.0 Interface Specification
|
||||||
|
|
||||||
|
Copyright (C) 2015 Marco Bascetta <marco.bascetta@sadel.it>
|
||||||
|
Copyright (C) 2015 Riccardo Vangelisti <riccardo.vangelisti@sadel.it>
|
||||||
|
-->
|
||||||
|
|
||||||
|
<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
|
||||||
|
|
||||||
|
<!--
|
||||||
|
org.freedesktop.ModemManager1.Modem.Voice:
|
||||||
|
@short_description: The ModemManager Voice interface.
|
||||||
|
|
||||||
|
The Voice interface handles Calls.
|
||||||
|
-->
|
||||||
|
<interface name="org.freedesktop.ModemManager1.Modem.Voice">
|
||||||
|
|
||||||
|
<!--
|
||||||
|
ListCalls:
|
||||||
|
@result: The list of call object paths.
|
||||||
|
|
||||||
|
Retrieve all Calls.
|
||||||
|
|
||||||
|
This method should only be used once and subsequent information
|
||||||
|
retrieved either by listening for the
|
||||||
|
#org.freedesktop.ModemManager1.Modem.Voice::Added signal,
|
||||||
|
or by querying the specific Call object of interest.
|
||||||
|
-->
|
||||||
|
<method name="ListCalls">
|
||||||
|
<arg name="result" type="ao" direction="out" />
|
||||||
|
</method>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
DeleteCall:
|
||||||
|
@path: The object path of the Call to delete.
|
||||||
|
|
||||||
|
Delete a Call from the list of calls.
|
||||||
|
|
||||||
|
The call will be hangup if it is still active.
|
||||||
|
-->
|
||||||
|
<method name="DeleteCall">
|
||||||
|
<arg name="path" type="o" direction="in" />
|
||||||
|
</method>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
CreateCall:
|
||||||
|
@properties: Call properties from the <link linkend="gdbus-org.freedesktop.ModemManager1.Call">Call D-Bus interface</link>.
|
||||||
|
@path: The object path of the new call object.
|
||||||
|
|
||||||
|
Creates a new call object.
|
||||||
|
|
||||||
|
The '<link linkend="gdbus-property-org-freedesktop-ModemManager1-Call.Number">Number</link>' is mandatory
|
||||||
|
-->
|
||||||
|
<method name="CreateCall">
|
||||||
|
<arg name="properties" type="a{sv}" direction="in"/>
|
||||||
|
<arg name="path" type="o" direction="out" />
|
||||||
|
<annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QVariantMap"/>
|
||||||
|
</method>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
CallAdded:
|
||||||
|
@path: Object path of the new call.
|
||||||
|
|
||||||
|
Emitted when any part of a Call has been received or added.
|
||||||
|
-->
|
||||||
|
<signal name="CallAdded">
|
||||||
|
<arg name="path" type="o" />
|
||||||
|
</signal>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
CallDeleted:
|
||||||
|
@path: Object path of the now deleted Call.
|
||||||
|
|
||||||
|
Emitted when a call has been deleted.
|
||||||
|
-->
|
||||||
|
<signal name="CallDeleted">
|
||||||
|
<arg name="path" type="o" />
|
||||||
|
</signal>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Calls:
|
||||||
|
|
||||||
|
The list of calls object paths.
|
||||||
|
-->
|
||||||
|
<property name="Calls" type="ao" access="read" />
|
||||||
|
|
||||||
|
</interface>
|
||||||
|
</node>
|
|
@ -0,0 +1,530 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
ModemManager 1.0 Interface Specification
|
||||||
|
|
||||||
|
Copyright (C) 2008 Novell, Inc.
|
||||||
|
Copyright (C) 2008-2013 Red Hat, Inc.
|
||||||
|
Copyright (C) 2011-2013 Google, Inc.
|
||||||
|
Copyright (C) 2011-2013 Lanedo GmbH
|
||||||
|
-->
|
||||||
|
|
||||||
|
<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
|
||||||
|
|
||||||
|
<!--
|
||||||
|
org.freedesktop.ModemManager1.Modem:
|
||||||
|
@short_description: The ModemManager Modem interface.
|
||||||
|
|
||||||
|
The Modem interface controls the status and actions in a given modem
|
||||||
|
object.
|
||||||
|
-->
|
||||||
|
<interface name="org.freedesktop.ModemManager1.Modem">
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Enable:
|
||||||
|
@enable: %TRUE to enable the modem and %FALSE to disable it.
|
||||||
|
|
||||||
|
Enable or disable the modem.
|
||||||
|
|
||||||
|
When enabled, the modem's radio is powered on and data sessions, voice
|
||||||
|
calls, location services, and Short Message Service may be available.
|
||||||
|
|
||||||
|
When disabled, the modem enters low-power state and no network-related
|
||||||
|
operations are available.
|
||||||
|
-->
|
||||||
|
<method name="Enable">
|
||||||
|
<arg name="enable" type="b" direction="in" />
|
||||||
|
</method>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
ListBearers:
|
||||||
|
@bearers: The list of bearer object paths.
|
||||||
|
|
||||||
|
List configured packet data bearers (EPS Bearers, PDP Contexts, or
|
||||||
|
CDMA2000 Packet Data Sessions).
|
||||||
|
-->
|
||||||
|
<method name="ListBearers">
|
||||||
|
<arg name="bearers" type="ao" direction="out" />
|
||||||
|
</method>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
CreateBearer:
|
||||||
|
@properties: List of properties to assign to the bearer after creating it.
|
||||||
|
@path: On success, the object path of the newly created bearer.
|
||||||
|
|
||||||
|
Create a new packet data bearer using the given characteristics.
|
||||||
|
|
||||||
|
This request may fail if the modem does not support additional bearers,
|
||||||
|
if too many bearers are already defined, or if properties are invalid.
|
||||||
|
|
||||||
|
Allowed properties are:
|
||||||
|
<variablelist>
|
||||||
|
<varlistentry><term><literal>"apn"</literal></term>
|
||||||
|
<listitem><para>Access Point Name, given as a string value (signature <literal>"s"</literal>). Required in 3GPP.</para></listitem></varlistentry>
|
||||||
|
<varlistentry><term><literal>"ip-type"</literal></term>
|
||||||
|
<listitem><para>Addressing type, given as a <link linkend="MMBearerIpFamily">MMBearerIpFamily</link> value (signature <literal>"u"</literal>). Optional in 3GPP and CDMA.</para></listitem></varlistentry>
|
||||||
|
<varlistentry><term><literal>"allowed-auth"</literal></term>
|
||||||
|
<listitem><para>The authentication method to use, given as a <link linkend="MMBearerAllowedAuth">MMBearerAllowedAuth</link> value (signature <literal>"u"</literal>). Optional in 3GPP.</para></listitem></varlistentry>
|
||||||
|
<varlistentry><term><literal>"user"</literal></term>
|
||||||
|
<listitem><para>User name (if any) required by the network, given as a string value (signature <literal>"s"</literal>). Optional in 3GPP.</para></listitem></varlistentry>
|
||||||
|
<varlistentry><term><literal>"password"</literal></term>
|
||||||
|
<listitem><para>Password (if any) required by the network, given as a string value (signature <literal>"s"</literal>). Optional in 3GPP.</para></listitem></varlistentry>
|
||||||
|
<varlistentry><term><literal>"allow-roaming"</literal></term>
|
||||||
|
<listitem><para>Flag to tell whether connection is allowed during roaming, given as a boolean value (signature <literal>"b"</literal>). Optional in 3GPP.</para></listitem></varlistentry>
|
||||||
|
<varlistentry><term><literal>"rm-protocol"</literal></term>
|
||||||
|
<listitem><para>Protocol of the Rm interface, given as a <link linkend="MMModemCdmaRmProtocol">MMModemCdmaRmProtocol</link> value (signature <literal>"u"</literal>). Optional in CDMA.</para></listitem></varlistentry>
|
||||||
|
<varlistentry><term><literal>"number"</literal></term>
|
||||||
|
<listitem><para>Telephone number to dial, given as a string value (signature <literal>"s"</literal>). Required in POTS.</para></listitem></varlistentry>
|
||||||
|
</variablelist>
|
||||||
|
|
||||||
|
Some properties are only applicable to a bearer of certain access
|
||||||
|
technologies, for example the <literal>"apn"</literal> property is not
|
||||||
|
applicable to CDMA2000 Packet Data Session bearers.
|
||||||
|
-->
|
||||||
|
<method name="CreateBearer">
|
||||||
|
<arg name="properties" type="a{sv}" direction="in">
|
||||||
|
<annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QVariantMap" />
|
||||||
|
</arg>
|
||||||
|
<arg name="path" type="o" direction="out" />
|
||||||
|
</method>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
DeleteBearer:
|
||||||
|
@bearer: Object path of the bearer to delete.
|
||||||
|
|
||||||
|
Delete an existing packet data bearer.
|
||||||
|
|
||||||
|
If the bearer is currently active and providing packet data server, it
|
||||||
|
will be disconnected and that packet data service will terminate.
|
||||||
|
-->
|
||||||
|
<method name="DeleteBearer">
|
||||||
|
<arg name="bearer" type="o" direction="in" />
|
||||||
|
</method>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Reset:
|
||||||
|
|
||||||
|
Clear non-persistent configuration and state, and return the device to
|
||||||
|
a newly-powered-on state.
|
||||||
|
|
||||||
|
This command may power-cycle the device.
|
||||||
|
-->
|
||||||
|
<method name="Reset" />
|
||||||
|
|
||||||
|
<!--
|
||||||
|
FactoryReset:
|
||||||
|
@code: Carrier-supplied code required to reset the modem.
|
||||||
|
|
||||||
|
Clear the modem's configuration (including persistent configuration and
|
||||||
|
state), and return the device to a factory-default state.
|
||||||
|
|
||||||
|
If not required by the modem, @code may be ignored.
|
||||||
|
|
||||||
|
This command may or may not power-cycle the device.
|
||||||
|
-->
|
||||||
|
<method name="FactoryReset">
|
||||||
|
<arg name="code" type="s" direction="in" />
|
||||||
|
</method>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
SetPowerState:
|
||||||
|
@state: A <link linkend="MMModemPowerState">MMModemPowerState</link> value, to specify the desired power state.
|
||||||
|
|
||||||
|
Set the power state of the modem. This action can only be run when the
|
||||||
|
modem is in <link linkend="MM-MODEM-STATE-DISABLED:CAPS"><constant>MM_MODEM_STATE_DISABLED</constant></link>
|
||||||
|
state.
|
||||||
|
-->
|
||||||
|
<method name="SetPowerState">
|
||||||
|
<arg name="state" type="u" direction="in" />
|
||||||
|
</method>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
SetCurrentCapabilities:
|
||||||
|
@capabilities: Bitmask of <link linkend="MMModemCapability">MMModemCapability</link> values, to specify the capabilities to use.
|
||||||
|
|
||||||
|
Set the capabilities of the device. A restart of the modem may be required.
|
||||||
|
-->
|
||||||
|
<method name="SetCurrentCapabilities">
|
||||||
|
<arg name="capabilities" type="u" direction="in" />
|
||||||
|
</method>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
SetCurrentModes:
|
||||||
|
@modes: A pair of <link linkend="MMModemMode">MMModemMode</link> values, where the first one is a bitmask of allowed modes, and the second one the preferred mode, if any.
|
||||||
|
|
||||||
|
Set the access technologies (e.g. 2G/3G/4G preference) the device is
|
||||||
|
currently allowed to use when connecting to a network.
|
||||||
|
|
||||||
|
The given combination should be supported by the modem, as specified in the
|
||||||
|
#org.freedesktop.ModemManager1.Modem:SupportedModes property.
|
||||||
|
-->
|
||||||
|
<method name="SetCurrentModes">
|
||||||
|
<arg name="modes" type="(uu)" direction="in">
|
||||||
|
<annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="CurrentModesType"/>
|
||||||
|
</arg>
|
||||||
|
</method>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
SetCurrentBands:
|
||||||
|
@bands: List of <link linkend="MMModemBand">MMModemBand</link> values, to specify the bands to be used.
|
||||||
|
|
||||||
|
Set the radio frequency and technology bands the device is currently
|
||||||
|
allowed to use when connecting to a network.
|
||||||
|
-->
|
||||||
|
<method name="SetCurrentBands">
|
||||||
|
<arg name="bands" type="au" direction="in">
|
||||||
|
<annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QList<uint>" />
|
||||||
|
</arg>
|
||||||
|
</method>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Command
|
||||||
|
@cmd The command string, e.g. "AT+GCAP" or "+GCAP" (leading AT is inserted if necessary).
|
||||||
|
@timeout The number of seconds to wait for a response.
|
||||||
|
@response The modem's response.
|
||||||
|
|
||||||
|
Send an arbitrary AT command to a modem and get the response.
|
||||||
|
|
||||||
|
Note that using this interface call is only allowed when running
|
||||||
|
ModemManager in debug mode.
|
||||||
|
-->
|
||||||
|
<method name="Command">
|
||||||
|
<arg name="cmd" type="s" direction="in" />
|
||||||
|
<arg name="timeout" type="u" direction="in" />
|
||||||
|
<arg name="response" type="s" direction="out" />
|
||||||
|
</method>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
StateChanged:
|
||||||
|
@old: A <link linkend="MMModemState">MMModemState</link> value, specifying the new state.
|
||||||
|
@new: A <link linkend="MMModemState">MMModemState</link> value, specifying the new state.
|
||||||
|
@reason: A <link linkend="MMModemStateChangeReason">MMModemStateChangeReason</link> value, specifying the reason for this state change.
|
||||||
|
|
||||||
|
The modem's state (see #org.freedesktop.ModemManager1.Modem:State) changed.
|
||||||
|
-->
|
||||||
|
<signal name="StateChanged">
|
||||||
|
<arg name="old" type="i" />
|
||||||
|
<arg name="new" type="i" />
|
||||||
|
<arg name="reason" type="u" />
|
||||||
|
</signal>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Sim:
|
||||||
|
|
||||||
|
The path of the SIM object available in this device, if any.
|
||||||
|
-->
|
||||||
|
<property name="Sim" type="o" access="read" />
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Bearers:
|
||||||
|
|
||||||
|
The list of bearer object paths (EPS Bearers, PDP Contexts, or
|
||||||
|
CDMA2000 Packet Data Sessions).
|
||||||
|
-->
|
||||||
|
<property name="Bearers" type="ao" access="read" />
|
||||||
|
|
||||||
|
<!--
|
||||||
|
SupportedCapabilities:
|
||||||
|
|
||||||
|
List of <link linkend="MMModemCapability">MMModemCapability</link>
|
||||||
|
values, specifying the combinations of generic family of access
|
||||||
|
technologies the modem supports.
|
||||||
|
|
||||||
|
If the modem doesn't allow changing the current capabilities, a single entry with
|
||||||
|
<link linkend="MM-MODEM-CAPABILITY-ANY:CAPS"><constant>MM_MODEM_CAPABILITY_ANY</constant></link>
|
||||||
|
will be given.
|
||||||
|
-->
|
||||||
|
<property name="SupportedCapabilities" type="au" access="read">
|
||||||
|
<annotation name="org.qtproject.QtDBus.QtTypeName" value="UIntList"/>
|
||||||
|
</property>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
CurrentCapabilities:
|
||||||
|
|
||||||
|
Bitmask of <link linkend="MMModemCapability">MMModemCapability</link>
|
||||||
|
values, specifying the generic family of access technologies the modem
|
||||||
|
currently supports without a firmware reload or reinitialization.
|
||||||
|
-->
|
||||||
|
<property name="CurrentCapabilities" type="u" access="read" />
|
||||||
|
|
||||||
|
<!--
|
||||||
|
MaxBearers:
|
||||||
|
|
||||||
|
The maximum number of defined packet data bearers the modem supports.
|
||||||
|
|
||||||
|
This is not the number of active/connected bearers the modem supports,
|
||||||
|
but simply the number of bearers that may be defined at any given time.
|
||||||
|
For example, POTS and CDMA2000-only devices support only one bearer,
|
||||||
|
while GSM/UMTS devices typically support three or more, and any
|
||||||
|
LTE-capable device (whether LTE-only, GSM/UMTS-capable, and/or
|
||||||
|
CDMA2000-capable) also typically support three or more.
|
||||||
|
-->
|
||||||
|
<property name="MaxBearers" type="u" access="read" />
|
||||||
|
|
||||||
|
<!--
|
||||||
|
MaxActiveBearers:
|
||||||
|
|
||||||
|
The maximum number of active packet data bearers the modem supports.
|
||||||
|
|
||||||
|
POTS and CDMA2000-only devices support one active bearer, while GSM/UMTS
|
||||||
|
and LTE-capable devices (including LTE/CDMA devices) typically support
|
||||||
|
at least two active bearers.
|
||||||
|
-->
|
||||||
|
<property name="MaxActiveBearers" type="u" access="read" />
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Manufacturer:
|
||||||
|
|
||||||
|
The equipment manufacturer, as reported by the modem.
|
||||||
|
-->
|
||||||
|
<property name="Manufacturer" type="s" access="read" />
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Model:
|
||||||
|
|
||||||
|
The equipment model, as reported by the modem.
|
||||||
|
-->
|
||||||
|
<property name="Model" type="s" access="read" />
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Revision:
|
||||||
|
|
||||||
|
The revision identification of the software, as reported by the modem.
|
||||||
|
-->
|
||||||
|
<property name="Revision" type="s" access="read" />
|
||||||
|
|
||||||
|
<!--
|
||||||
|
DeviceIdentifier:
|
||||||
|
|
||||||
|
A best-effort device identifier based on various device information like
|
||||||
|
model name, firmware revision, USB/PCI/PCMCIA IDs, and other properties.
|
||||||
|
|
||||||
|
This ID is not guaranteed to be unique and may be shared between
|
||||||
|
identical devices with the same firmware, but is intended to be "unique
|
||||||
|
enough" for use as a casual device identifier for various user
|
||||||
|
experience operations.
|
||||||
|
|
||||||
|
This is not the device's IMEI or ESN since those may not be available
|
||||||
|
before unlocking the device via a PIN.
|
||||||
|
-->
|
||||||
|
<property name="DeviceIdentifier" type="s" access="read" />
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Device:
|
||||||
|
|
||||||
|
The physical modem device reference (ie, USB, PCI, PCMCIA device), which
|
||||||
|
may be dependent upon the operating system.
|
||||||
|
|
||||||
|
In Linux for example, this points to a sysfs path of the usb_device
|
||||||
|
object.
|
||||||
|
-->
|
||||||
|
<property name="Device" type="s" access="read" />
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Drivers:
|
||||||
|
|
||||||
|
The Operating System device drivers handling communication with the modem
|
||||||
|
hardware.
|
||||||
|
-->
|
||||||
|
<property name="Drivers" type="as" access="read" />
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Plugin:
|
||||||
|
|
||||||
|
The name of the plugin handling this modem.
|
||||||
|
-->
|
||||||
|
<property name="Plugin" type="s" access="read" />
|
||||||
|
|
||||||
|
<!--
|
||||||
|
PrimaryPort:
|
||||||
|
|
||||||
|
The name of the primary port using to control the modem.
|
||||||
|
-->
|
||||||
|
<property name="PrimaryPort" type="s" access="read" />
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Ports:
|
||||||
|
|
||||||
|
The list of ports in the modem, given as an array of string and unsigned
|
||||||
|
integer pairs. The string is the port name or path, and the integer is
|
||||||
|
the port type given as a
|
||||||
|
<link linkend="MMModemPortType">MMModemPortType</link> value.
|
||||||
|
-->
|
||||||
|
<property name="Ports" type="a(su)" access="read">
|
||||||
|
<annotation name="org.qtproject.QtDBus.QtTypeName" value="PortList"/>
|
||||||
|
</property>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
EquipmentIdentifier:
|
||||||
|
|
||||||
|
The identity of the device.
|
||||||
|
|
||||||
|
This will be the IMEI number for GSM devices and the hex-format ESN/MEID
|
||||||
|
for CDMA devices.
|
||||||
|
-->
|
||||||
|
<property name="EquipmentIdentifier" type="s" access="read" />
|
||||||
|
|
||||||
|
<!--
|
||||||
|
UnlockRequired:
|
||||||
|
|
||||||
|
Current lock state of the device, given as a
|
||||||
|
<link linkend="MMModemLock">MMModemLock</link> value.
|
||||||
|
-->
|
||||||
|
<property name="UnlockRequired" type="u" access="read" />
|
||||||
|
|
||||||
|
<!--
|
||||||
|
UnlockRetries:
|
||||||
|
|
||||||
|
A dictionary in which the keys are <link linkend="MMModemLock">MMModemLock</link>
|
||||||
|
flags, and the values are integers giving the number of PIN tries remaining
|
||||||
|
before the code becomes blocked (requiring a PUK) or permanently blocked. Dictionary
|
||||||
|
entries exist only for the codes for which the modem is able to report retry
|
||||||
|
counts.
|
||||||
|
-->
|
||||||
|
<property name="UnlockRetries" type="a{uu}" access="read">
|
||||||
|
<annotation name="org.qtproject.QtDBus.QtTypeName" value="UnlockRetriesMap"/>
|
||||||
|
</property>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
State:
|
||||||
|
|
||||||
|
Overall state of the modem, given as a
|
||||||
|
<link linkend="MMModemState">MMModemState</link> value.
|
||||||
|
|
||||||
|
If the device's state cannot be determined,
|
||||||
|
<link linkend="MM-MODEM-STATE-UNKNOWN:CAPS"><constant>MM_MODEM_STATE_UNKNOWN</constant></link>
|
||||||
|
will be reported.
|
||||||
|
-->
|
||||||
|
<property name="State" type="i" access="read" />
|
||||||
|
|
||||||
|
<!--
|
||||||
|
StateFailedReason:
|
||||||
|
|
||||||
|
Error specifying why the modem is in
|
||||||
|
<link linkend="MM-MODEM-STATE-FAILED:CAPS"><constant>MM_MODEM_STATE_FAILED</constant></link>
|
||||||
|
state, given as a
|
||||||
|
<link linkend="MMModemStateFailedReason">MMModemStateFailedReason</link> value.
|
||||||
|
-->
|
||||||
|
<property name="StateFailedReason" type="u" access="read" />
|
||||||
|
|
||||||
|
<!--
|
||||||
|
AccessTechnologies:
|
||||||
|
|
||||||
|
Bitmask of <link linkend="MMModemAccessTechnology">MMModemAccessTechnology</link> values,
|
||||||
|
specifying the current network access technologies used by the device to communicate
|
||||||
|
with the network.
|
||||||
|
|
||||||
|
If the device's access technology cannot be determined,
|
||||||
|
<link linkend="MM-MODEM-ACCESS-TECHNOLOGY-UNKNOWN:CAPS"><constant>MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN</constant></link>
|
||||||
|
will be reported.
|
||||||
|
-->
|
||||||
|
<property name="AccessTechnologies" type="u" access="read" />
|
||||||
|
|
||||||
|
<!--
|
||||||
|
SignalQuality:
|
||||||
|
|
||||||
|
Signal quality in percent (0 - 100) of the dominant access technology
|
||||||
|
the device is using to communicate with the network. Always 0 for POTS
|
||||||
|
devices.
|
||||||
|
|
||||||
|
The additional boolean value indicates if the quality value given was
|
||||||
|
recently taken.
|
||||||
|
-->
|
||||||
|
<property name="SignalQuality" type="(ub)" access="read">
|
||||||
|
<annotation name="org.qtproject.QtDBus.QtTypeName" value="SignalQualityPair"/>
|
||||||
|
</property>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
OwnNumbers:
|
||||||
|
|
||||||
|
List of numbers (e.g. MSISDN in 3GPP) being currently handled by this
|
||||||
|
modem.
|
||||||
|
-->
|
||||||
|
<property name="OwnNumbers" type="as" access="read" />
|
||||||
|
|
||||||
|
<!--
|
||||||
|
PowerState:
|
||||||
|
|
||||||
|
A <link linkend="MMModemPowerState">MMModemPowerState</link> value
|
||||||
|
specifying the current power state of the modem.
|
||||||
|
-->
|
||||||
|
<property name="PowerState" type="u" access="read" />
|
||||||
|
|
||||||
|
<!--
|
||||||
|
SupportedModes:
|
||||||
|
|
||||||
|
This property exposes the supported mode combinations, given as an array of unsigned
|
||||||
|
integer pairs, where:
|
||||||
|
|
||||||
|
<variablelist>
|
||||||
|
<varlistentry>
|
||||||
|
<listitem>
|
||||||
|
The first integer is a bitmask of <link linkend="MMModemMode">MMModemMode</link> values,
|
||||||
|
specifying the allowed modes.
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry>
|
||||||
|
<listitem>
|
||||||
|
The second integer is a single <link linkend="MMModemMode">MMModemMode</link>, which
|
||||||
|
specifies the preferred access technology, among the ones defined in the allowed modes.
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
</variablelist>
|
||||||
|
-->
|
||||||
|
<property name="SupportedModes" type="a(uu)" access="read">
|
||||||
|
<annotation name="org.qtproject.QtDBus.QtTypeName" value="SupportedModesType"/>
|
||||||
|
</property>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
CurrentModes:
|
||||||
|
|
||||||
|
A pair of <link linkend="MMModemMode">MMModemMode</link> values, where the first one
|
||||||
|
is a bitmask specifying the access technologies (eg 2G/3G/4G) the device
|
||||||
|
is currently allowed to use when connecting to a network, and the second one is the
|
||||||
|
preferred mode of those specified as allowed.
|
||||||
|
|
||||||
|
The pair must be one of those specified in
|
||||||
|
#org.freedesktop.ModemManager1.Modem:SupportedModes.
|
||||||
|
-->
|
||||||
|
<property name="CurrentModes" type="(uu)" access="read">
|
||||||
|
<annotation name="org.qtproject.QtDBus.QtTypeName" value="CurrentModesType"/>
|
||||||
|
</property>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
SupportedBands:
|
||||||
|
|
||||||
|
List of <link linkend="MMModemBand">MMModemBand</link> values,
|
||||||
|
specifying the radio frequency and technology bands supported by the
|
||||||
|
device.
|
||||||
|
|
||||||
|
For POTS devices, only the
|
||||||
|
<link linkend="MM-MODEM-BAND-ANY:CAPS"><constant>MM_MODEM_BAND_ANY</constant></link>
|
||||||
|
mode will be returned.
|
||||||
|
-->
|
||||||
|
<property name="SupportedBands" type="au" access="read">
|
||||||
|
<annotation name="org.qtproject.QtDBus.QtTypeName" value="UIntList"/>
|
||||||
|
</property>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
CurrentBands:
|
||||||
|
|
||||||
|
List of <link linkend="MMModemBand">MMModemBand</link> values,
|
||||||
|
specifying the radio frequency and technology bands the device is
|
||||||
|
currently using when connecting to a network.
|
||||||
|
|
||||||
|
It must be a subset of #org.freedesktop.ModemManager1.Modem:SupportedBands.
|
||||||
|
-->
|
||||||
|
<property name="CurrentBands" type="au" access="read">
|
||||||
|
<annotation name="org.qtproject.QtDBus.QtTypeName" value="UIntList"/>
|
||||||
|
</property>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
SupportedIpFamilies:
|
||||||
|
|
||||||
|
Bitmask of <link linkend="MMBearerIpFamily">MMBearerIpFamily</link> values,
|
||||||
|
specifying the IP families supported by the device.
|
||||||
|
-->
|
||||||
|
<property name="SupportedIpFamilies" type="u" access="read" />
|
||||||
|
|
||||||
|
</interface>
|
||||||
|
</node>
|
|
@ -0,0 +1,102 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
ModemManager 1.0 Interface Specification
|
||||||
|
|
||||||
|
Copyright (C) 2011-2013 Red Hat, Inc.
|
||||||
|
Copyright (C) 2011-2013 Google, Inc.
|
||||||
|
Copyright (C) 2011-2013 Lanedo GmbH
|
||||||
|
-->
|
||||||
|
|
||||||
|
<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
|
||||||
|
|
||||||
|
<!--
|
||||||
|
org.freedesktop.ModemManager1.Sim:
|
||||||
|
@short_description: The ModemManager SIM interface.
|
||||||
|
|
||||||
|
The SIM interface handles communication with SIM, USIM, and RUIM (CDMA
|
||||||
|
SIM) cards.
|
||||||
|
-->
|
||||||
|
<interface name="org.freedesktop.ModemManager1.Sim">
|
||||||
|
|
||||||
|
<!--
|
||||||
|
SendPin:
|
||||||
|
@pin: A string containing the PIN code.
|
||||||
|
|
||||||
|
Send the PIN to unlock the SIM card.
|
||||||
|
-->
|
||||||
|
<method name="SendPin">
|
||||||
|
<arg name="pin" type="s" direction="in" />
|
||||||
|
</method>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
SendPuk:
|
||||||
|
@puk: A string containing the PUK code.
|
||||||
|
@pin: A string containing the PIN code.
|
||||||
|
|
||||||
|
Send the PUK and a new PIN to unlock the SIM card.
|
||||||
|
-->
|
||||||
|
<method name="SendPuk">
|
||||||
|
<arg name="puk" type="s" direction="in" />
|
||||||
|
<arg name="pin" type="s" direction="in" />
|
||||||
|
</method>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
EnablePin:
|
||||||
|
@pin: A string containing the PIN code.
|
||||||
|
@enabled: %TRUE to enable PIN checking, %FALSE otherwise.
|
||||||
|
|
||||||
|
Enable or disable the PIN checking.
|
||||||
|
-->
|
||||||
|
<method name="EnablePin">
|
||||||
|
<arg name="pin" type="s" direction="in" />
|
||||||
|
<arg name="enabled" type="b" direction="in" />
|
||||||
|
</method>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
ChangePin:
|
||||||
|
@old_pin: A string containing the current PIN code.
|
||||||
|
@new_pin: A string containing the new PIN code.
|
||||||
|
|
||||||
|
Change the PIN code.
|
||||||
|
-->
|
||||||
|
<method name="ChangePin">
|
||||||
|
<arg name="old_pin" type="s" direction="in" />
|
||||||
|
<arg name="new_pin" type="s" direction="in" />
|
||||||
|
</method>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
SimIdentifier:
|
||||||
|
|
||||||
|
An obfuscated SIM identifier based on the IMSI or the
|
||||||
|
ICCID.
|
||||||
|
|
||||||
|
This may be available before the PIN has been entered depending
|
||||||
|
on the device itself.
|
||||||
|
-->
|
||||||
|
<property name="SimIdentifier" type="s" access="read" />
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Imsi:
|
||||||
|
|
||||||
|
The IMSI of the SIM card, if any.
|
||||||
|
-->
|
||||||
|
<property name="Imsi" type="s" access="read" />
|
||||||
|
|
||||||
|
<!--
|
||||||
|
OperatorId:
|
||||||
|
|
||||||
|
The ID of the network operator that issued the SIM card,
|
||||||
|
formatted as a 5 or 6-digit MCC/MNC code (e.g. <literal>"310410"</literal>).
|
||||||
|
-->
|
||||||
|
<property name="OperatorIdentifier" type="s" access="read" />
|
||||||
|
|
||||||
|
<!--
|
||||||
|
OperatorName:
|
||||||
|
|
||||||
|
The name of the network operator, as given by the SIM card, if known.
|
||||||
|
-->
|
||||||
|
<property name="OperatorName" type="s" access="read" />
|
||||||
|
|
||||||
|
</interface>
|
||||||
|
</node>
|
|
@ -0,0 +1,214 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
ModemManager 1.0 Interface Specification
|
||||||
|
|
||||||
|
Copyright (C) 2011-2013 Red Hat, Inc.
|
||||||
|
Copyright (C) 2011-2013 Google, Inc.
|
||||||
|
Copyright (C) 2011-2013 Lanedo GmbH
|
||||||
|
-->
|
||||||
|
|
||||||
|
<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
|
||||||
|
|
||||||
|
<!--
|
||||||
|
org.freedesktop.ModemManager1.Sms:
|
||||||
|
@short_description: The ModemManager SMS interface.
|
||||||
|
|
||||||
|
The SMS interface Defines operations and properties of a single SMS message.
|
||||||
|
-->
|
||||||
|
<interface name="org.freedesktop.ModemManager1.Sms">
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Send:
|
||||||
|
|
||||||
|
If the message has not yet been sent, queue it for delivery.
|
||||||
|
-->
|
||||||
|
<method name="Send" />
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Store:
|
||||||
|
|
||||||
|
Store the message in the device if not already done.
|
||||||
|
|
||||||
|
This method requires a <link linkend="MMSmsStorage">MMSmsStorage</link>
|
||||||
|
value, describing the storage where this message is to be kept; or
|
||||||
|
<link linkend="MM-SMS-STORAGE-UNKNOWN:CAPS"><constant>MM_SMS_STORAGE_UNKNOWN</constant></link>
|
||||||
|
if the default storage should be used.
|
||||||
|
-->
|
||||||
|
<method name="Store">
|
||||||
|
<arg name="storage" type="u" direction="in" />
|
||||||
|
</method>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
State:
|
||||||
|
|
||||||
|
A <link linkend="MMSmsState">MMSmsState</link> value,
|
||||||
|
describing the state of the message.
|
||||||
|
-->
|
||||||
|
<property name="State" type="u" access="read" />
|
||||||
|
|
||||||
|
<!--
|
||||||
|
PduType:
|
||||||
|
|
||||||
|
A <link linkend="MMSmsPduType">MMSmsPduType</link> value,
|
||||||
|
describing the type of PDUs used in the SMS message.
|
||||||
|
-->
|
||||||
|
<property name="PduType" type="u" access="read" />
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Number:
|
||||||
|
|
||||||
|
Number to which the message is addressed.
|
||||||
|
-->
|
||||||
|
<property name="Number" type="s" access="read" />
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Text:
|
||||||
|
|
||||||
|
Message text, in UTF-8.
|
||||||
|
|
||||||
|
When sending, if the text is larger than the limit of the technology or
|
||||||
|
modem, the message will be broken into multiple parts or messages.
|
||||||
|
|
||||||
|
Note that Text and Data are never given at the same time.
|
||||||
|
-->
|
||||||
|
<property name="Text" type="s" access="read" />
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Data:
|
||||||
|
|
||||||
|
Message data.
|
||||||
|
|
||||||
|
When sending, if the data is larger than the limit of the technology or
|
||||||
|
modem, the message will be broken into multiple parts or messages.
|
||||||
|
|
||||||
|
Note that Text and Data are never given at the same time.
|
||||||
|
-->
|
||||||
|
<property name="Data" type="ay" access="read" />
|
||||||
|
|
||||||
|
<!--
|
||||||
|
SMSC:
|
||||||
|
|
||||||
|
Indicates the SMS service center number.
|
||||||
|
|
||||||
|
Always empty for 3GPP2/CDMA.
|
||||||
|
-->
|
||||||
|
<property name="SMSC" type="s" access="read" />
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Validity:
|
||||||
|
|
||||||
|
Indicates when the SMS expires in the SMSC.
|
||||||
|
|
||||||
|
This value is composed of a
|
||||||
|
<link linkend="MMSmsValidityType">MMSmsValidityType</link>
|
||||||
|
key, with an associated data which contains type-specific validity
|
||||||
|
information:
|
||||||
|
|
||||||
|
<variablelist>
|
||||||
|
<varlistentry><term><link linkend="MM-SMS-VALIDITY-TYPE-RELATIVE:CAPS">MM_SMS_VALIDITY_TYPE_RELATIVE</link></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
The value is the length of the validity period in minutes, given
|
||||||
|
as an unsigned integer (D-Bus signature <literal>'u'</literal>).
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
</variablelist>
|
||||||
|
-->
|
||||||
|
<property name="Validity" type="(uv)" access="read">
|
||||||
|
<annotation name="org.qtproject.QtDBus.QtTypeName" value="ValidityPair"/>
|
||||||
|
</property>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Class:
|
||||||
|
|
||||||
|
3GPP message class (-1..3). -1 means class is not available or
|
||||||
|
is not used for this message, otherwise the 3GPP SMS message class.
|
||||||
|
|
||||||
|
Always -1 for 3GPP2/CDMA.
|
||||||
|
-->
|
||||||
|
<property name="Class" type="i" access="read" />
|
||||||
|
|
||||||
|
<!--
|
||||||
|
TeleserviceId:
|
||||||
|
|
||||||
|
A <link linkend="MMSmsCdmaTeleserviceId">MMSmsCdmaTeleserviceId</link> value.
|
||||||
|
|
||||||
|
Always <link linkend="MM-SMS-CDMA-TELESERVICE-ID-UNKNOWN:CAPS">MM_SMS_CDMA_TELESERVICE_ID_UNKNOWN</link> for 3GPP.
|
||||||
|
-->
|
||||||
|
<property name="TeleserviceId" type="u" access="read" />
|
||||||
|
|
||||||
|
<!--
|
||||||
|
ServiceCategory:
|
||||||
|
|
||||||
|
A <link linkend="MMSmsCdmaServiceCategory">MMSmsCdmaServiceCategory</link> value.
|
||||||
|
|
||||||
|
Always <link linkend="MM-SMS-CDMA-SERVICE-CATEGORY-UNKNOWN:CAPS">MM_SMS_CDMA_SERVICE_CATEGORY_UNKNOWN</link> for 3GPP.
|
||||||
|
-->
|
||||||
|
<property name="ServiceCategory" type="u" access="read" />
|
||||||
|
|
||||||
|
<!--
|
||||||
|
DeliveryReportRequest:
|
||||||
|
|
||||||
|
#TRUE if delivery report request is required, #FALSE otherwise.
|
||||||
|
-->
|
||||||
|
<property name="DeliveryReportRequest" type="b" access="read" />
|
||||||
|
|
||||||
|
<!--
|
||||||
|
MessageReference:
|
||||||
|
|
||||||
|
Message Reference of the last PDU sent/received within this SMS.
|
||||||
|
|
||||||
|
If the PDU type is
|
||||||
|
<link linkend="MM-SMS-PDU-TYPE-STATUS-REPORT:CAPS"><constant>MM_SMS_PDU_TYPE_STATUS_REPORT</constant></link>,
|
||||||
|
this field identifies the Message Reference of the PDU associated to the status report.
|
||||||
|
-->
|
||||||
|
<property name="MessageReference" type="u" access="read" />
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Timestamp:
|
||||||
|
|
||||||
|
Time when the first PDU of the SMS message arrived the SMSC, in
|
||||||
|
<ulink url="http://en.wikipedia.org/wiki/ISO_8601">ISO8601</ulink>
|
||||||
|
format.
|
||||||
|
This field is only applicable if the PDU type is
|
||||||
|
<link linkend="MM-SMS-PDU-TYPE-DELIVER:CAPS"><constant>MM_SMS_PDU_TYPE_DELIVER</constant></link>.
|
||||||
|
or
|
||||||
|
<link linkend="MM-SMS-PDU-TYPE-STATUS-REPORT:CAPS"><constant>MM_SMS_PDU_TYPE_STATUS_REPORT</constant></link>.
|
||||||
|
-->
|
||||||
|
<property name="Timestamp" type="s" access="read" />
|
||||||
|
|
||||||
|
<!--
|
||||||
|
DischargeTimestamp:
|
||||||
|
|
||||||
|
Time when the first PDU of the SMS message left the SMSC, in
|
||||||
|
<ulink url="http://en.wikipedia.org/wiki/ISO_8601">ISO8601</ulink>
|
||||||
|
format.
|
||||||
|
|
||||||
|
This field is only applicable if the PDU type is
|
||||||
|
<link linkend="MM-SMS-PDU-TYPE-STATUS-REPORT:CAPS"><constant>MM_SMS_PDU_TYPE_STATUS_REPORT</constant></link>.
|
||||||
|
-->
|
||||||
|
<property name="DischargeTimestamp" type="s" access="read" />
|
||||||
|
|
||||||
|
<!--
|
||||||
|
DeliveryState:
|
||||||
|
|
||||||
|
A <link linkend="MMSmsDeliveryState">MMSmsDeliveryState</link> value,
|
||||||
|
describing the state of the delivery reported in the Status Report message.
|
||||||
|
|
||||||
|
This field is only applicable if the PDU type is
|
||||||
|
<link linkend="MM-SMS-PDU-TYPE-STATUS-REPORT:CAPS"><constant>MM_SMS_PDU_TYPE_STATUS_REPORT</constant></link>.
|
||||||
|
-->
|
||||||
|
<property name="DeliveryState" type="u" access="read" />
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Storage:
|
||||||
|
|
||||||
|
A <link linkend="MMSmsStorage">MMSmsStorage</link> value,
|
||||||
|
describing the storage where this message is kept.
|
||||||
|
-->
|
||||||
|
<property name="Storage" type="u" access="read" />
|
||||||
|
|
||||||
|
</interface>
|
||||||
|
</node>
|
|
@ -0,0 +1,41 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
ModemManager 1.0 Interface Specification
|
||||||
|
|
||||||
|
Copyright (C) 2008 Novell, Inc.
|
||||||
|
Copyright (C) 2008-2013 Red Hat, Inc.
|
||||||
|
Copyright (C) 2011-2013 Google, Inc.
|
||||||
|
Copyright (C) 2011-2013 Lanedo GmbH
|
||||||
|
-->
|
||||||
|
|
||||||
|
<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
|
||||||
|
|
||||||
|
<!--
|
||||||
|
org.freedesktop.ModemManager1:
|
||||||
|
@short_description: The ModemManager Manager interface.
|
||||||
|
|
||||||
|
The Manager interface allows controlling and querying the status of the
|
||||||
|
ModemManager daemon.
|
||||||
|
-->
|
||||||
|
<interface name="org.freedesktop.ModemManager1">
|
||||||
|
|
||||||
|
<!--
|
||||||
|
ScanDevices:
|
||||||
|
|
||||||
|
Start a new scan for connected modem devices.
|
||||||
|
-->
|
||||||
|
<method name="ScanDevices" />
|
||||||
|
|
||||||
|
<!--
|
||||||
|
SetLogging:
|
||||||
|
@level: One of <literal>"ERR"</literal>, <literal>"WARN"</literal>, <literal>"INFO"</literal>, <literal>"DEBUG"</literal>.
|
||||||
|
|
||||||
|
Set logging verbosity.
|
||||||
|
-->
|
||||||
|
<method name="SetLogging">
|
||||||
|
<arg name="level" type="s" direction="in" />
|
||||||
|
</method>
|
||||||
|
|
||||||
|
</interface>
|
||||||
|
</node>
|
|
@ -0,0 +1,187 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
ModemManager 1.0 Interface Specification
|
||||||
|
|
||||||
|
Copyright (C) 2008 Novell, Inc.
|
||||||
|
Copyright (C) 2008-2013 Red Hat, Inc.
|
||||||
|
Copyright (C) 2011-2013 Google, Inc.
|
||||||
|
Copyright (C) 2011-2013 Lanedo GmbH
|
||||||
|
-->
|
||||||
|
|
||||||
|
<node name="/" xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd">
|
||||||
|
|
||||||
|
<!--
|
||||||
|
org.freedesktop.ModemManager1.Modem.Contacts:
|
||||||
|
@short_description: The ModemManager Contacts interface.
|
||||||
|
|
||||||
|
This interface provides access to contacts stored in various locations,
|
||||||
|
including SIM cards, device storage, and other locations. Operations
|
||||||
|
generally operate on all contacts regardless of their actual storage
|
||||||
|
location.
|
||||||
|
|
||||||
|
Contacts are referred to by index numbers, which are internal to
|
||||||
|
ModemManager and do not represent indexes of SIM cards or the device.
|
||||||
|
Indexes may not be contiguous.
|
||||||
|
-->
|
||||||
|
<interface name="org.freedesktop.ModemManager1.Modem.Contacts">
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Add:
|
||||||
|
@properties: Dictionary of properties describing the contact.
|
||||||
|
@index: The index number of the new contact
|
||||||
|
|
||||||
|
Add a new contact.
|
||||||
|
|
||||||
|
If any of the property in @properties exceeds the modem's size limit,
|
||||||
|
that property will be truncated to fit.
|
||||||
|
|
||||||
|
Known properties are:
|
||||||
|
<variablelist>
|
||||||
|
<varlistentry><term><literal>"name"</literal></term>
|
||||||
|
<listitem>
|
||||||
|
Full name of the contact, given as a string value
|
||||||
|
(signature <literal>"s"</literal>).
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry><term><literal>"number"</literal></term>
|
||||||
|
<listitem>
|
||||||
|
Telephone number, given as a string value
|
||||||
|
(signature <literal>"s"</literal>).
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry><term><literal>"email"</literal></term>
|
||||||
|
<listitem>
|
||||||
|
Email address, given as a string value
|
||||||
|
(signature <literal>"s"</literal>).
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry><term><literal>"group"</literal></term>
|
||||||
|
<listitem>
|
||||||
|
Group this contact belongs to, given as a string value
|
||||||
|
(signature <literal>"s"</literal>).
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry><term><literal>"name2"</literal></term>
|
||||||
|
<listitem>
|
||||||
|
Additional contact name, given as a string value
|
||||||
|
(signature <literal>"s"</literal>).
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry><term><literal>"number2"</literal></term>
|
||||||
|
<listitem>
|
||||||
|
Additional contact telephone number, given as a string value
|
||||||
|
(signature <literal>"s"</literal>).
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry><term><literal>"hidden"</literal></term>
|
||||||
|
<listitem>
|
||||||
|
Boolean flag to specify whether this entry is hidden or not,
|
||||||
|
(signature <literal>"b"</literal>).
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry><term><literal>"storage"</literal></term>
|
||||||
|
<listitem>
|
||||||
|
Phonebook in which the contact is stored, given as a
|
||||||
|
<link linkend="MMModemContactsStorage">MMModemContactsStorage</link>,
|
||||||
|
(signature <literal>"u"</literal>).
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
</variablelist>
|
||||||
|
|
||||||
|
The @index number is an internal private number to ModemManager and does
|
||||||
|
not correspond to the index of the contact in the modem or SIM itself.
|
||||||
|
-->
|
||||||
|
<method name="Add">
|
||||||
|
<arg name="properties" type="a{sv}" direction="in">
|
||||||
|
<annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QVariantMap"/>
|
||||||
|
</arg>
|
||||||
|
<arg name="index" type="u" direction="out" />
|
||||||
|
</method>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Delete:
|
||||||
|
@index: The index of the contact to delete.
|
||||||
|
|
||||||
|
Delete a contact.
|
||||||
|
-->
|
||||||
|
<method name="Delete">
|
||||||
|
<arg name="index" type="u" direction="in" />
|
||||||
|
</method>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Get:
|
||||||
|
@index: The index of the contact.
|
||||||
|
@properties: The properties of the contact.
|
||||||
|
|
||||||
|
Retrieve a contact.
|
||||||
|
-->
|
||||||
|
<method name="Get">
|
||||||
|
<arg name="index" type="u" direction="in" />
|
||||||
|
<arg name="properties" type="a{sv}" direction="out">
|
||||||
|
<annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QVariantMap"/>
|
||||||
|
</arg>
|
||||||
|
</method>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
List:
|
||||||
|
@results: An array of dictionaries, each dictionary representing a contact.
|
||||||
|
|
||||||
|
List all contacts.
|
||||||
|
-->
|
||||||
|
<method name="List">
|
||||||
|
<arg name="results" type="aa{sv}" direction="out">
|
||||||
|
<annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QVariantMapList"/>
|
||||||
|
</arg>
|
||||||
|
</method>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Find:
|
||||||
|
@pattern: The pattern to search for.
|
||||||
|
@results: An array of dictionaries, each dictionary representing a contact.
|
||||||
|
|
||||||
|
Find a contact.
|
||||||
|
-->
|
||||||
|
<method name="Find">
|
||||||
|
<arg name="pattern" type="s" direction="in" />
|
||||||
|
<arg name="results" type="aa{sv}" direction="out">
|
||||||
|
<annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QVariantMapList"/>
|
||||||
|
</arg>
|
||||||
|
</method>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
GetCount:
|
||||||
|
@count: The number of contacts.
|
||||||
|
|
||||||
|
Get the number of contacts.
|
||||||
|
-->
|
||||||
|
<method name="GetCount">
|
||||||
|
<arg name="count" type="u" direction="out" />
|
||||||
|
</method>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Added:
|
||||||
|
@index: The index number of the new contact.
|
||||||
|
@properties: The properties of the contact.
|
||||||
|
|
||||||
|
Emitted when a new contact is added.
|
||||||
|
-->
|
||||||
|
<signal name="Added">
|
||||||
|
<arg name="index" type="u" />
|
||||||
|
<arg name="properties" type="a{sv}">
|
||||||
|
<annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QVariantMap"/>
|
||||||
|
</arg>
|
||||||
|
</signal>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Deleted:
|
||||||
|
@index: The index number of the now deleted contact.
|
||||||
|
|
||||||
|
Emitted when a new contact has been deleted.
|
||||||
|
-->
|
||||||
|
<signal name="Deleted">
|
||||||
|
<arg name="index" type="u" />
|
||||||
|
</signal>
|
||||||
|
|
||||||
|
</interface>
|
||||||
|
</node>
|
|
@ -0,0 +1,29 @@
|
||||||
|
/*
|
||||||
|
* This file was generated by qdbusxml2cpp version 0.7
|
||||||
|
* Command line was: qdbusxml2cpp -N -m -i generictypes.h -p locationinterface \
|
||||||
|
* /home/jgrulich/development/projects/libmm-qt/dbus/introspection/org.freedesktop.ModemManager1.Modem.Location.xml
|
||||||
|
*
|
||||||
|
* qdbusxml2cpp is Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
|
||||||
|
*
|
||||||
|
* This is an auto-generated file.
|
||||||
|
* This file may have been hand-edited. Look for HAND-EDIT comments
|
||||||
|
* before re-generating it.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "locationinterface.h"
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Implementation of interface class OrgFreedesktopModemManager1ModemLocationInterface
|
||||||
|
*/
|
||||||
|
|
||||||
|
OrgFreedesktopModemManager1ModemLocationInterface::OrgFreedesktopModemManager1ModemLocationInterface(const QString &service,
|
||||||
|
const QString &path,
|
||||||
|
const QDBusConnection &connection,
|
||||||
|
QObject *parent)
|
||||||
|
: QDBusAbstractInterface(service, path, staticInterfaceName(), connection, parent)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
OrgFreedesktopModemManager1ModemLocationInterface::~OrgFreedesktopModemManager1ModemLocationInterface()
|
||||||
|
{
|
||||||
|
}
|
|
@ -0,0 +1,87 @@
|
||||||
|
/*
|
||||||
|
* This file was generated by qdbusxml2cpp version 0.7
|
||||||
|
* Command line was: qdbusxml2cpp -N -m -i generictypes.h -p locationinterface \
|
||||||
|
* /home/jgrulich/development/projects/libmm-qt/dbus/introspection/org.freedesktop.ModemManager1.Modem.Location.xml
|
||||||
|
*
|
||||||
|
* qdbusxml2cpp is Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
|
||||||
|
*
|
||||||
|
* This is an auto-generated file.
|
||||||
|
* Do not edit! All changes made to it will be lost.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef MODEMMANAGERQT_LOCATIONINTERFACE_H
|
||||||
|
#define MODEMMANAGERQT_LOCATIONINTERFACE_H
|
||||||
|
|
||||||
|
#include "generictypes.h"
|
||||||
|
#include <QList>
|
||||||
|
#include <QObject>
|
||||||
|
#include <QString>
|
||||||
|
#include <QVariant>
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Proxy class for interface org.freedesktop.ModemManager1.Modem.Location
|
||||||
|
*/
|
||||||
|
class OrgFreedesktopModemManager1ModemLocationInterface : public QDBusAbstractInterface
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
static inline const char *staticInterfaceName()
|
||||||
|
#ifdef MMQT_STATIC
|
||||||
|
{
|
||||||
|
return "org.kde.fakemodem.Modem.Location";
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
{
|
||||||
|
return "org.freedesktop.ModemManager1.Modem.Location";
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
public:
|
||||||
|
OrgFreedesktopModemManager1ModemLocationInterface(const QString &service,
|
||||||
|
const QString &path,
|
||||||
|
const QDBusConnection &connection,
|
||||||
|
QObject *parent = nullptr);
|
||||||
|
|
||||||
|
~OrgFreedesktopModemManager1ModemLocationInterface() override;
|
||||||
|
|
||||||
|
Q_PROPERTY(uint Capabilities READ capabilities)
|
||||||
|
inline uint capabilities() const
|
||||||
|
{
|
||||||
|
return qvariant_cast<uint>(property("Capabilities"));
|
||||||
|
}
|
||||||
|
|
||||||
|
Q_PROPERTY(uint Enabled READ enabled)
|
||||||
|
inline uint enabled() const
|
||||||
|
{
|
||||||
|
return qvariant_cast<uint>(property("Enabled"));
|
||||||
|
}
|
||||||
|
|
||||||
|
Q_PROPERTY(ModemManager::LocationInformationMap Location READ location)
|
||||||
|
inline ModemManager::LocationInformationMap location() const
|
||||||
|
{
|
||||||
|
return qvariant_cast<ModemManager::LocationInformationMap>(property("Location"));
|
||||||
|
}
|
||||||
|
|
||||||
|
Q_PROPERTY(bool SignalsLocation READ signalsLocation)
|
||||||
|
inline bool signalsLocation() const
|
||||||
|
{
|
||||||
|
return qvariant_cast<bool>(property("SignalsLocation"));
|
||||||
|
}
|
||||||
|
|
||||||
|
public Q_SLOTS: // METHODS
|
||||||
|
inline QDBusPendingReply<ModemManager::LocationInformationMap> GetLocation()
|
||||||
|
{
|
||||||
|
QList<QVariant> argumentList;
|
||||||
|
return asyncCallWithArgumentList(QLatin1String("GetLocation"), argumentList);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline QDBusPendingReply<> Setup(uint sources, bool signal_location)
|
||||||
|
{
|
||||||
|
QList<QVariant> argumentList;
|
||||||
|
argumentList << QVariant::fromValue(sources) << QVariant::fromValue(signal_location);
|
||||||
|
return asyncCallWithArgumentList(QLatin1String("Setup"), argumentList);
|
||||||
|
}
|
||||||
|
|
||||||
|
Q_SIGNALS: // SIGNALS
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
|
@ -0,0 +1,29 @@
|
||||||
|
/*
|
||||||
|
* This file was generated by qdbusxml2cpp version 0.7
|
||||||
|
* Command line was: qdbusxml2cpp -N -m -i generictypes.h -p messaginginterface \
|
||||||
|
* /home/jgrulich/development/projects/libmm-qt/dbus/introspection/org.freedesktop.ModemManager1.Modem.Messaging.xml
|
||||||
|
*
|
||||||
|
* qdbusxml2cpp is Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
|
||||||
|
*
|
||||||
|
* This is an auto-generated file.
|
||||||
|
* This file may have been hand-edited. Look for HAND-EDIT comments
|
||||||
|
* before re-generating it.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "messaginginterface.h"
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Implementation of interface class OrgFreedesktopModemManager1ModemMessagingInterface
|
||||||
|
*/
|
||||||
|
|
||||||
|
OrgFreedesktopModemManager1ModemMessagingInterface::OrgFreedesktopModemManager1ModemMessagingInterface(const QString &service,
|
||||||
|
const QString &path,
|
||||||
|
const QDBusConnection &connection,
|
||||||
|
QObject *parent)
|
||||||
|
: QDBusAbstractInterface(service, path, staticInterfaceName(), connection, parent)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
OrgFreedesktopModemManager1ModemMessagingInterface::~OrgFreedesktopModemManager1ModemMessagingInterface()
|
||||||
|
{
|
||||||
|
}
|
|
@ -0,0 +1,91 @@
|
||||||
|
/*
|
||||||
|
* This file was generated by qdbusxml2cpp version 0.7
|
||||||
|
* Command line was: qdbusxml2cpp -N -m -i generictypes.h -p messaginginterface \
|
||||||
|
* /home/jgrulich/development/projects/libmm-qt/dbus/introspection/org.freedesktop.ModemManager1.Modem.Messaging.xml
|
||||||
|
*
|
||||||
|
* qdbusxml2cpp is Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
|
||||||
|
*
|
||||||
|
* This is an auto-generated file.
|
||||||
|
* Do not edit! All changes made to it will be lost.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef MODEMMANAGERQT_MESSAGINGINTERFACE_H
|
||||||
|
#define MODEMMANAGERQT_MESSAGINGINTERFACE_H
|
||||||
|
|
||||||
|
#include "generictypes.h"
|
||||||
|
#include "generictypes_p.h"
|
||||||
|
#include <QList>
|
||||||
|
#include <QObject>
|
||||||
|
#include <QString>
|
||||||
|
#include <QVariant>
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Proxy class for interface org.freedesktop.ModemManager1.Modem.Messaging
|
||||||
|
*/
|
||||||
|
class OrgFreedesktopModemManager1ModemMessagingInterface : public QDBusAbstractInterface
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
static inline const char *staticInterfaceName()
|
||||||
|
#ifdef MMQT_STATIC
|
||||||
|
{
|
||||||
|
return "org.kde.fakemodem.Modem.Messaging";
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
{
|
||||||
|
return "org.freedesktop.ModemManager1.Modem.Messaging";
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
public:
|
||||||
|
OrgFreedesktopModemManager1ModemMessagingInterface(const QString &service,
|
||||||
|
const QString &path,
|
||||||
|
const QDBusConnection &connection,
|
||||||
|
QObject *parent = nullptr);
|
||||||
|
|
||||||
|
~OrgFreedesktopModemManager1ModemMessagingInterface() override;
|
||||||
|
|
||||||
|
Q_PROPERTY(uint DefaultStorage READ defaultStorage)
|
||||||
|
inline uint defaultStorage() const
|
||||||
|
{
|
||||||
|
return qvariant_cast<uint>(property("DefaultStorage"));
|
||||||
|
}
|
||||||
|
|
||||||
|
Q_PROPERTY(QList<QDBusObjectPath> Messages READ messages)
|
||||||
|
inline QList<QDBusObjectPath> messages() const
|
||||||
|
{
|
||||||
|
return qvariant_cast<QList<QDBusObjectPath>>(property("Messages"));
|
||||||
|
}
|
||||||
|
|
||||||
|
Q_PROPERTY(ModemManager::UIntList SupportedStorages READ supportedStorages)
|
||||||
|
inline ModemManager::UIntList supportedStorages() const
|
||||||
|
{
|
||||||
|
return qvariant_cast<ModemManager::UIntList>(property("SupportedStorages"));
|
||||||
|
}
|
||||||
|
|
||||||
|
public Q_SLOTS: // METHODS
|
||||||
|
inline QDBusPendingReply<QDBusObjectPath> Create(const QVariantMap &properties)
|
||||||
|
{
|
||||||
|
QList<QVariant> argumentList;
|
||||||
|
argumentList << QVariant::fromValue(properties);
|
||||||
|
return asyncCallWithArgumentList(QLatin1String("Create"), argumentList);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline QDBusPendingReply<> Delete(const QDBusObjectPath &path)
|
||||||
|
{
|
||||||
|
QList<QVariant> argumentList;
|
||||||
|
argumentList << QVariant::fromValue(path);
|
||||||
|
return asyncCallWithArgumentList(QLatin1String("Delete"), argumentList);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline QDBusPendingReply<QList<QDBusObjectPath>> List()
|
||||||
|
{
|
||||||
|
QList<QVariant> argumentList;
|
||||||
|
return asyncCallWithArgumentList(QLatin1String("List"), argumentList);
|
||||||
|
}
|
||||||
|
|
||||||
|
Q_SIGNALS: // SIGNALS
|
||||||
|
void Added(const QDBusObjectPath &path, bool received);
|
||||||
|
void Deleted(const QDBusObjectPath &path);
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
|
@ -0,0 +1,29 @@
|
||||||
|
/*
|
||||||
|
* This file was generated by qdbusxml2cpp version 0.7
|
||||||
|
* Command line was: qdbusxml2cpp -N -m -i generictypes.h -p modem3gppinterface \
|
||||||
|
* /home/jgrulich/development/projects/libmm-qt/dbus/introspection/org.freedesktop.ModemManager1.Modem.Modem3gpp.xml
|
||||||
|
*
|
||||||
|
* qdbusxml2cpp is Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
|
||||||
|
*
|
||||||
|
* This is an auto-generated file.
|
||||||
|
* This file may have been hand-edited. Look for HAND-EDIT comments
|
||||||
|
* before re-generating it.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "modem3gppinterface.h"
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Implementation of interface class OrgFreedesktopModemManager1ModemModem3gppInterface
|
||||||
|
*/
|
||||||
|
|
||||||
|
OrgFreedesktopModemManager1ModemModem3gppInterface::OrgFreedesktopModemManager1ModemModem3gppInterface(const QString &service,
|
||||||
|
const QString &path,
|
||||||
|
const QDBusConnection &connection,
|
||||||
|
QObject *parent)
|
||||||
|
: QDBusAbstractInterface(service, path, staticInterfaceName(), connection, parent)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
OrgFreedesktopModemManager1ModemModem3gppInterface::~OrgFreedesktopModemManager1ModemModem3gppInterface()
|
||||||
|
{
|
||||||
|
}
|
|
@ -0,0 +1,99 @@
|
||||||
|
/*
|
||||||
|
* This file was generated by qdbusxml2cpp version 0.7
|
||||||
|
* Command line was: qdbusxml2cpp -N -m -i generictypes.h -p modem3gppinterface \
|
||||||
|
* /home/jgrulich/development/projects/libmm-qt/dbus/introspection/org.freedesktop.ModemManager1.Modem.Modem3gpp.xml
|
||||||
|
*
|
||||||
|
* qdbusxml2cpp is Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
|
||||||
|
*
|
||||||
|
* This is an auto-generated file.
|
||||||
|
* Do not edit! All changes made to it will be lost.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef MODEMMANAGERQT_MODEM3GPPINTERFACE_H
|
||||||
|
#define MODEMMANAGERQT_MODEM3GPPINTERFACE_H
|
||||||
|
|
||||||
|
#include "generictypes.h"
|
||||||
|
#include <QList>
|
||||||
|
#include <QObject>
|
||||||
|
#include <QString>
|
||||||
|
#include <QVariant>
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Proxy class for interface org.freedesktop.ModemManager1.Modem.Modem3gpp
|
||||||
|
*/
|
||||||
|
class OrgFreedesktopModemManager1ModemModem3gppInterface : public QDBusAbstractInterface
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
static inline const char *staticInterfaceName()
|
||||||
|
#ifdef MMQT_STATIC
|
||||||
|
{
|
||||||
|
return "org.kde.fakemodem.Modem.Modem3gpp";
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
{
|
||||||
|
return "org.freedesktop.ModemManager1.Modem.Modem3gpp";
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
public:
|
||||||
|
OrgFreedesktopModemManager1ModemModem3gppInterface(const QString &service,
|
||||||
|
const QString &path,
|
||||||
|
const QDBusConnection &connection,
|
||||||
|
QObject *parent = nullptr);
|
||||||
|
|
||||||
|
~OrgFreedesktopModemManager1ModemModem3gppInterface() override;
|
||||||
|
|
||||||
|
Q_PROPERTY(uint EnabledFacilityLocks READ enabledFacilityLocks)
|
||||||
|
inline uint enabledFacilityLocks() const
|
||||||
|
{
|
||||||
|
return qvariant_cast<uint>(property("EnabledFacilityLocks"));
|
||||||
|
}
|
||||||
|
|
||||||
|
Q_PROPERTY(QString Imei READ imei)
|
||||||
|
inline QString imei() const
|
||||||
|
{
|
||||||
|
return qvariant_cast<QString>(property("Imei"));
|
||||||
|
}
|
||||||
|
|
||||||
|
Q_PROPERTY(QString OperatorCode READ operatorCode)
|
||||||
|
inline QString operatorCode() const
|
||||||
|
{
|
||||||
|
return qvariant_cast<QString>(property("OperatorCode"));
|
||||||
|
}
|
||||||
|
|
||||||
|
Q_PROPERTY(QString OperatorName READ operatorName)
|
||||||
|
inline QString operatorName() const
|
||||||
|
{
|
||||||
|
return qvariant_cast<QString>(property("OperatorName"));
|
||||||
|
}
|
||||||
|
|
||||||
|
Q_PROPERTY(uint RegistrationState READ registrationState)
|
||||||
|
inline uint registrationState() const
|
||||||
|
{
|
||||||
|
return qvariant_cast<uint>(property("RegistrationState"));
|
||||||
|
}
|
||||||
|
|
||||||
|
Q_PROPERTY(uint SubscriptionState READ subscriptionState)
|
||||||
|
inline uint subscriptionState() const
|
||||||
|
{
|
||||||
|
return qvariant_cast<uint>(property("SubscriptionState"));
|
||||||
|
}
|
||||||
|
|
||||||
|
public Q_SLOTS: // METHODS
|
||||||
|
inline QDBusPendingReply<> Register(const QString &operator_id)
|
||||||
|
{
|
||||||
|
QList<QVariant> argumentList;
|
||||||
|
argumentList << QVariant::fromValue(operator_id);
|
||||||
|
return asyncCallWithArgumentList(QLatin1String("Register"), argumentList);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline QDBusPendingReply<ModemManager::QVariantMapList> Scan()
|
||||||
|
{
|
||||||
|
QList<QVariant> argumentList;
|
||||||
|
return asyncCallWithArgumentList(QLatin1String("Scan"), argumentList);
|
||||||
|
}
|
||||||
|
|
||||||
|
Q_SIGNALS: // SIGNALS
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
|
@ -0,0 +1,29 @@
|
||||||
|
/*
|
||||||
|
* This file was generated by qdbusxml2cpp version 0.7
|
||||||
|
* Command line was: qdbusxml2cpp -N -m -i generictypes.h -p modemcdmainterface \
|
||||||
|
* /home/jgrulich/development/projects/libmm-qt/dbus/introspection/org.freedesktop.ModemManager1.Modem.ModemCdma.xml
|
||||||
|
*
|
||||||
|
* qdbusxml2cpp is Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
|
||||||
|
*
|
||||||
|
* This is an auto-generated file.
|
||||||
|
* This file may have been hand-edited. Look for HAND-EDIT comments
|
||||||
|
* before re-generating it.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "modemcdmainterface.h"
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Implementation of interface class OrgFreedesktopModemManager1ModemModemCdmaInterface
|
||||||
|
*/
|
||||||
|
|
||||||
|
OrgFreedesktopModemManager1ModemModemCdmaInterface::OrgFreedesktopModemManager1ModemModemCdmaInterface(const QString &service,
|
||||||
|
const QString &path,
|
||||||
|
const QDBusConnection &connection,
|
||||||
|
QObject *parent)
|
||||||
|
: QDBusAbstractInterface(service, path, staticInterfaceName(), connection, parent)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
OrgFreedesktopModemManager1ModemModemCdmaInterface::~OrgFreedesktopModemManager1ModemModemCdmaInterface()
|
||||||
|
{
|
||||||
|
}
|
|
@ -0,0 +1,107 @@
|
||||||
|
/*
|
||||||
|
* This file was generated by qdbusxml2cpp version 0.7
|
||||||
|
* Command line was: qdbusxml2cpp -N -m -i generictypes.h -p modemcdmainterface \
|
||||||
|
* /home/jgrulich/development/projects/libmm-qt/dbus/introspection/org.freedesktop.ModemManager1.Modem.ModemCdma.xml
|
||||||
|
*
|
||||||
|
* qdbusxml2cpp is Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
|
||||||
|
*
|
||||||
|
* This is an auto-generated file.
|
||||||
|
* Do not edit! All changes made to it will be lost.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef MODEMMANAGERQT_MODEMCDMAINTERFACE_H
|
||||||
|
#define MODEMMANAGERQT_MODEMCDMAINTERFACE_H
|
||||||
|
|
||||||
|
#include "generictypes.h"
|
||||||
|
#include <QList>
|
||||||
|
#include <QObject>
|
||||||
|
#include <QString>
|
||||||
|
#include <QVariant>
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Proxy class for interface org.freedesktop.ModemManager1.Modem.ModemCdma
|
||||||
|
*/
|
||||||
|
class OrgFreedesktopModemManager1ModemModemCdmaInterface : public QDBusAbstractInterface
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
static inline const char *staticInterfaceName()
|
||||||
|
#ifdef MMQT_STATIC
|
||||||
|
{
|
||||||
|
return "org.kde.fakemodem.Modem.ModemCdma";
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
{
|
||||||
|
return "org.freedesktop.ModemManager1.Modem.ModemCdma";
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
public:
|
||||||
|
OrgFreedesktopModemManager1ModemModemCdmaInterface(const QString &service,
|
||||||
|
const QString &path,
|
||||||
|
const QDBusConnection &connection,
|
||||||
|
QObject *parent = nullptr);
|
||||||
|
|
||||||
|
~OrgFreedesktopModemManager1ModemModemCdmaInterface() override;
|
||||||
|
|
||||||
|
Q_PROPERTY(uint ActivationState READ activationState)
|
||||||
|
inline uint activationState() const
|
||||||
|
{
|
||||||
|
return qvariant_cast<uint>(property("ActivationState"));
|
||||||
|
}
|
||||||
|
|
||||||
|
Q_PROPERTY(uint Cdma1xRegistrationState READ cdma1xRegistrationState)
|
||||||
|
inline uint cdma1xRegistrationState() const
|
||||||
|
{
|
||||||
|
return qvariant_cast<uint>(property("Cdma1xRegistrationState"));
|
||||||
|
}
|
||||||
|
|
||||||
|
Q_PROPERTY(QString Esn READ esn)
|
||||||
|
inline QString esn() const
|
||||||
|
{
|
||||||
|
return qvariant_cast<QString>(property("Esn"));
|
||||||
|
}
|
||||||
|
|
||||||
|
Q_PROPERTY(uint EvdoRegistrationState READ evdoRegistrationState)
|
||||||
|
inline uint evdoRegistrationState() const
|
||||||
|
{
|
||||||
|
return qvariant_cast<uint>(property("EvdoRegistrationState"));
|
||||||
|
}
|
||||||
|
|
||||||
|
Q_PROPERTY(QString Meid READ meid)
|
||||||
|
inline QString meid() const
|
||||||
|
{
|
||||||
|
return qvariant_cast<QString>(property("Meid"));
|
||||||
|
}
|
||||||
|
|
||||||
|
Q_PROPERTY(uint Nid READ nid)
|
||||||
|
inline uint nid() const
|
||||||
|
{
|
||||||
|
return qvariant_cast<uint>(property("Nid"));
|
||||||
|
}
|
||||||
|
|
||||||
|
Q_PROPERTY(uint Sid READ sid)
|
||||||
|
inline uint sid() const
|
||||||
|
{
|
||||||
|
return qvariant_cast<uint>(property("Sid"));
|
||||||
|
}
|
||||||
|
|
||||||
|
public Q_SLOTS: // METHODS
|
||||||
|
inline QDBusPendingReply<> Activate(const QString &carrier_code)
|
||||||
|
{
|
||||||
|
QList<QVariant> argumentList;
|
||||||
|
argumentList << QVariant::fromValue(carrier_code);
|
||||||
|
return asyncCallWithArgumentList(QLatin1String("Activate"), argumentList);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline QDBusPendingReply<> ActivateManual(const QVariantMap &properties)
|
||||||
|
{
|
||||||
|
QList<QVariant> argumentList;
|
||||||
|
argumentList << QVariant::fromValue(properties);
|
||||||
|
return asyncCallWithArgumentList(QLatin1String("ActivateManual"), argumentList);
|
||||||
|
}
|
||||||
|
|
||||||
|
Q_SIGNALS: // SIGNALS
|
||||||
|
void ActivationStateChanged(uint activation_state, uint activation_error, const QVariantMap &status_changes);
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
|
@ -0,0 +1,29 @@
|
||||||
|
/*
|
||||||
|
* This file was generated by qdbusxml2cpp version 0.7
|
||||||
|
* Command line was: qdbusxml2cpp -N -m -i generictypes.h -p modeminterface \
|
||||||
|
* /home/jgrulich/development/projects/libmm-qt/dbus/introspection/org.freedesktop.ModemManager1.Modem.xml
|
||||||
|
*
|
||||||
|
* qdbusxml2cpp is Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
|
||||||
|
*
|
||||||
|
* This is an auto-generated file.
|
||||||
|
* This file may have been hand-edited. Look for HAND-EDIT comments
|
||||||
|
* before re-generating it.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "modeminterface.h"
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Implementation of interface class OrgFreedesktopModemManager1ModemInterface
|
||||||
|
*/
|
||||||
|
|
||||||
|
OrgFreedesktopModemManager1ModemInterface::OrgFreedesktopModemManager1ModemInterface(const QString &service,
|
||||||
|
const QString &path,
|
||||||
|
const QDBusConnection &connection,
|
||||||
|
QObject *parent)
|
||||||
|
: QDBusAbstractInterface(service, path, staticInterfaceName(), connection, parent)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
OrgFreedesktopModemManager1ModemInterface::~OrgFreedesktopModemManager1ModemInterface()
|
||||||
|
{
|
||||||
|
}
|
|
@ -0,0 +1,299 @@
|
||||||
|
/*
|
||||||
|
* This file was generated by qdbusxml2cpp version 0.7
|
||||||
|
* Command line was: qdbusxml2cpp -N -m -i generictypes.h -p modeminterface \
|
||||||
|
* /home/jgrulich/development/projects/libmm-qt/dbus/introspection/org.freedesktop.ModemManager1.Modem.xml
|
||||||
|
*
|
||||||
|
* qdbusxml2cpp is Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
|
||||||
|
*
|
||||||
|
* This is an auto-generated file.
|
||||||
|
* Do not edit! All changes made to it will be lost.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef MODEMMANAGERQT_MODEMINTERFACE_H
|
||||||
|
#define MODEMMANAGERQT_MODEMINTERFACE_H
|
||||||
|
|
||||||
|
#include "generictypes.h"
|
||||||
|
#include "generictypes_p.h"
|
||||||
|
#include <QList>
|
||||||
|
#include <QObject>
|
||||||
|
#include <QString>
|
||||||
|
#include <QStringList>
|
||||||
|
#include <QVariant>
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Proxy class for interface org.freedesktop.ModemManager1.Modem
|
||||||
|
*/
|
||||||
|
class OrgFreedesktopModemManager1ModemInterface : public QDBusAbstractInterface
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
static inline const char *staticInterfaceName()
|
||||||
|
#ifdef MMQT_STATIC
|
||||||
|
{
|
||||||
|
return "org.kde.fakemodem.Modem";
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
{
|
||||||
|
return "org.freedesktop.ModemManager1.Modem";
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
public:
|
||||||
|
OrgFreedesktopModemManager1ModemInterface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = nullptr);
|
||||||
|
|
||||||
|
~OrgFreedesktopModemManager1ModemInterface() override;
|
||||||
|
|
||||||
|
Q_PROPERTY(uint AccessTechnologies READ accessTechnologies)
|
||||||
|
inline uint accessTechnologies() const
|
||||||
|
{
|
||||||
|
return qvariant_cast<uint>(property("AccessTechnologies"));
|
||||||
|
}
|
||||||
|
|
||||||
|
Q_PROPERTY(QList<QDBusObjectPath> Bearers READ bearers)
|
||||||
|
inline QList<QDBusObjectPath> bearers() const
|
||||||
|
{
|
||||||
|
return qvariant_cast<QList<QDBusObjectPath>>(property("Bearers"));
|
||||||
|
}
|
||||||
|
|
||||||
|
Q_PROPERTY(ModemManager::UIntList CurrentBands READ currentBands)
|
||||||
|
inline ModemManager::UIntList currentBands() const
|
||||||
|
{
|
||||||
|
return qvariant_cast<ModemManager::UIntList>(property("CurrentBands"));
|
||||||
|
}
|
||||||
|
|
||||||
|
Q_PROPERTY(uint CurrentCapabilities READ currentCapabilities)
|
||||||
|
inline uint currentCapabilities() const
|
||||||
|
{
|
||||||
|
return qvariant_cast<uint>(property("CurrentCapabilities"));
|
||||||
|
}
|
||||||
|
|
||||||
|
Q_PROPERTY(ModemManager::CurrentModesType CurrentModes READ currentModes)
|
||||||
|
inline ModemManager::CurrentModesType currentModes() const
|
||||||
|
{
|
||||||
|
return qvariant_cast<ModemManager::CurrentModesType>(property("CurrentModes"));
|
||||||
|
}
|
||||||
|
|
||||||
|
Q_PROPERTY(QString Device READ device)
|
||||||
|
inline QString device() const
|
||||||
|
{
|
||||||
|
return qvariant_cast<QString>(property("Device"));
|
||||||
|
}
|
||||||
|
|
||||||
|
Q_PROPERTY(QString DeviceIdentifier READ deviceIdentifier)
|
||||||
|
inline QString deviceIdentifier() const
|
||||||
|
{
|
||||||
|
return qvariant_cast<QString>(property("DeviceIdentifier"));
|
||||||
|
}
|
||||||
|
|
||||||
|
Q_PROPERTY(QStringList Drivers READ drivers)
|
||||||
|
inline QStringList drivers() const
|
||||||
|
{
|
||||||
|
return qvariant_cast<QStringList>(property("Drivers"));
|
||||||
|
}
|
||||||
|
|
||||||
|
Q_PROPERTY(QString EquipmentIdentifier READ equipmentIdentifier)
|
||||||
|
inline QString equipmentIdentifier() const
|
||||||
|
{
|
||||||
|
return qvariant_cast<QString>(property("EquipmentIdentifier"));
|
||||||
|
}
|
||||||
|
|
||||||
|
Q_PROPERTY(QString Manufacturer READ manufacturer)
|
||||||
|
inline QString manufacturer() const
|
||||||
|
{
|
||||||
|
return qvariant_cast<QString>(property("Manufacturer"));
|
||||||
|
}
|
||||||
|
|
||||||
|
Q_PROPERTY(uint MaxActiveBearers READ maxActiveBearers)
|
||||||
|
inline uint maxActiveBearers() const
|
||||||
|
{
|
||||||
|
return qvariant_cast<uint>(property("MaxActiveBearers"));
|
||||||
|
}
|
||||||
|
|
||||||
|
Q_PROPERTY(uint MaxBearers READ maxBearers)
|
||||||
|
inline uint maxBearers() const
|
||||||
|
{
|
||||||
|
return qvariant_cast<uint>(property("MaxBearers"));
|
||||||
|
}
|
||||||
|
|
||||||
|
Q_PROPERTY(QString Model READ model)
|
||||||
|
inline QString model() const
|
||||||
|
{
|
||||||
|
return qvariant_cast<QString>(property("Model"));
|
||||||
|
}
|
||||||
|
|
||||||
|
Q_PROPERTY(QStringList OwnNumbers READ ownNumbers)
|
||||||
|
inline QStringList ownNumbers() const
|
||||||
|
{
|
||||||
|
return qvariant_cast<QStringList>(property("OwnNumbers"));
|
||||||
|
}
|
||||||
|
|
||||||
|
Q_PROPERTY(QString Plugin READ plugin)
|
||||||
|
inline QString plugin() const
|
||||||
|
{
|
||||||
|
return qvariant_cast<QString>(property("Plugin"));
|
||||||
|
}
|
||||||
|
|
||||||
|
Q_PROPERTY(ModemManager::PortList Ports READ ports)
|
||||||
|
inline ModemManager::PortList ports() const
|
||||||
|
{
|
||||||
|
return qvariant_cast<ModemManager::PortList>(property("Ports"));
|
||||||
|
}
|
||||||
|
|
||||||
|
Q_PROPERTY(uint PowerState READ powerState)
|
||||||
|
inline uint powerState() const
|
||||||
|
{
|
||||||
|
return qvariant_cast<uint>(property("PowerState"));
|
||||||
|
}
|
||||||
|
|
||||||
|
Q_PROPERTY(QString PrimaryPort READ primaryPort)
|
||||||
|
inline QString primaryPort() const
|
||||||
|
{
|
||||||
|
return qvariant_cast<QString>(property("PrimaryPort"));
|
||||||
|
}
|
||||||
|
|
||||||
|
Q_PROPERTY(QString Revision READ revision)
|
||||||
|
inline QString revision() const
|
||||||
|
{
|
||||||
|
return qvariant_cast<QString>(property("Revision"));
|
||||||
|
}
|
||||||
|
|
||||||
|
Q_PROPERTY(ModemManager::SignalQualityPair SignalQuality READ signalQuality)
|
||||||
|
inline ModemManager::SignalQualityPair signalQuality() const
|
||||||
|
{
|
||||||
|
return qvariant_cast<ModemManager::SignalQualityPair>(property("SignalQuality"));
|
||||||
|
}
|
||||||
|
|
||||||
|
Q_PROPERTY(QDBusObjectPath Sim READ sim)
|
||||||
|
inline QDBusObjectPath sim() const
|
||||||
|
{
|
||||||
|
return qvariant_cast<QDBusObjectPath>(property("Sim"));
|
||||||
|
}
|
||||||
|
|
||||||
|
Q_PROPERTY(int State READ state)
|
||||||
|
inline int state() const
|
||||||
|
{
|
||||||
|
return qvariant_cast<int>(property("State"));
|
||||||
|
}
|
||||||
|
|
||||||
|
Q_PROPERTY(uint StateFailedReason READ stateFailedReason)
|
||||||
|
inline uint stateFailedReason() const
|
||||||
|
{
|
||||||
|
return qvariant_cast<uint>(property("StateFailedReason"));
|
||||||
|
}
|
||||||
|
|
||||||
|
Q_PROPERTY(ModemManager::UIntList SupportedBands READ supportedBands)
|
||||||
|
inline ModemManager::UIntList supportedBands() const
|
||||||
|
{
|
||||||
|
return qvariant_cast<ModemManager::UIntList>(property("SupportedBands"));
|
||||||
|
}
|
||||||
|
|
||||||
|
Q_PROPERTY(ModemManager::UIntList SupportedCapabilities READ supportedCapabilities)
|
||||||
|
inline ModemManager::UIntList supportedCapabilities() const
|
||||||
|
{
|
||||||
|
return qvariant_cast<ModemManager::UIntList>(property("SupportedCapabilities"));
|
||||||
|
}
|
||||||
|
|
||||||
|
Q_PROPERTY(uint SupportedIpFamilies READ supportedIpFamilies)
|
||||||
|
inline uint supportedIpFamilies() const
|
||||||
|
{
|
||||||
|
return qvariant_cast<uint>(property("SupportedIpFamilies"));
|
||||||
|
}
|
||||||
|
|
||||||
|
Q_PROPERTY(ModemManager::SupportedModesType SupportedModes READ supportedModes)
|
||||||
|
inline ModemManager::SupportedModesType supportedModes() const
|
||||||
|
{
|
||||||
|
return qvariant_cast<ModemManager::SupportedModesType>(property("SupportedModes"));
|
||||||
|
}
|
||||||
|
|
||||||
|
Q_PROPERTY(uint UnlockRequired READ unlockRequired)
|
||||||
|
inline uint unlockRequired() const
|
||||||
|
{
|
||||||
|
return qvariant_cast<uint>(property("UnlockRequired"));
|
||||||
|
}
|
||||||
|
|
||||||
|
Q_PROPERTY(ModemManager::UnlockRetriesMap UnlockRetries READ unlockRetries)
|
||||||
|
inline ModemManager::UnlockRetriesMap unlockRetries() const
|
||||||
|
{
|
||||||
|
return qvariant_cast<ModemManager::UnlockRetriesMap>(property("UnlockRetries"));
|
||||||
|
}
|
||||||
|
|
||||||
|
public Q_SLOTS: // METHODS
|
||||||
|
inline QDBusPendingReply<QString> Command(const QString &cmd, uint timeout)
|
||||||
|
{
|
||||||
|
QList<QVariant> argumentList;
|
||||||
|
argumentList << QVariant::fromValue(cmd) << QVariant::fromValue(timeout);
|
||||||
|
return asyncCallWithArgumentList(QLatin1String("Command"), argumentList);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline QDBusPendingReply<QDBusObjectPath> CreateBearer(const QVariantMap &properties)
|
||||||
|
{
|
||||||
|
QList<QVariant> argumentList;
|
||||||
|
argumentList << QVariant::fromValue(properties);
|
||||||
|
return asyncCallWithArgumentList(QLatin1String("CreateBearer"), argumentList);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline QDBusPendingReply<> DeleteBearer(const QDBusObjectPath &bearer)
|
||||||
|
{
|
||||||
|
QList<QVariant> argumentList;
|
||||||
|
argumentList << QVariant::fromValue(bearer);
|
||||||
|
return asyncCallWithArgumentList(QLatin1String("DeleteBearer"), argumentList);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline QDBusPendingReply<> Enable(bool enable)
|
||||||
|
{
|
||||||
|
QList<QVariant> argumentList;
|
||||||
|
argumentList << QVariant::fromValue(enable);
|
||||||
|
return asyncCallWithArgumentList(QLatin1String("Enable"), argumentList);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline QDBusPendingReply<> FactoryReset(const QString &code)
|
||||||
|
{
|
||||||
|
QList<QVariant> argumentList;
|
||||||
|
argumentList << QVariant::fromValue(code);
|
||||||
|
return asyncCallWithArgumentList(QLatin1String("FactoryReset"), argumentList);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline QDBusPendingReply<QList<QDBusObjectPath>> ListBearers()
|
||||||
|
{
|
||||||
|
QList<QVariant> argumentList;
|
||||||
|
return asyncCallWithArgumentList(QLatin1String("ListBearers"), argumentList);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline QDBusPendingReply<> Reset()
|
||||||
|
{
|
||||||
|
QList<QVariant> argumentList;
|
||||||
|
return asyncCallWithArgumentList(QLatin1String("Reset"), argumentList);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline QDBusPendingReply<> SetCurrentBands(const QList<uint> &bands)
|
||||||
|
{
|
||||||
|
QList<QVariant> argumentList;
|
||||||
|
argumentList << QVariant::fromValue(bands);
|
||||||
|
return asyncCallWithArgumentList(QLatin1String("SetCurrentBands"), argumentList);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline QDBusPendingReply<> SetCurrentCapabilities(uint capabilities)
|
||||||
|
{
|
||||||
|
QList<QVariant> argumentList;
|
||||||
|
argumentList << QVariant::fromValue(capabilities);
|
||||||
|
return asyncCallWithArgumentList(QLatin1String("SetCurrentCapabilities"), argumentList);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline QDBusPendingReply<> SetCurrentModes(ModemManager::CurrentModesType modes)
|
||||||
|
{
|
||||||
|
QList<QVariant> argumentList;
|
||||||
|
argumentList << QVariant::fromValue(modes);
|
||||||
|
return asyncCallWithArgumentList(QLatin1String("SetCurrentModes"), argumentList);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline QDBusPendingReply<> SetPowerState(uint state)
|
||||||
|
{
|
||||||
|
QList<QVariant> argumentList;
|
||||||
|
argumentList << QVariant::fromValue(state);
|
||||||
|
return asyncCallWithArgumentList(QLatin1String("SetPowerState"), argumentList);
|
||||||
|
}
|
||||||
|
|
||||||
|
Q_SIGNALS: // SIGNALS
|
||||||
|
void StateChanged(int oldState, int newState, uint reason);
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
|
@ -0,0 +1,29 @@
|
||||||
|
/*
|
||||||
|
* This file was generated by qdbusxml2cpp version 0.7
|
||||||
|
* Command line was: qdbusxml2cpp -N -m -i generictypes.h -p modemmanager1interface \
|
||||||
|
* /home/jgrulich/development/projects/libmm-qt/dbus/introspection/org.freedesktop.ModemManager1.xml
|
||||||
|
*
|
||||||
|
* qdbusxml2cpp is Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
|
||||||
|
*
|
||||||
|
* This is an auto-generated file.
|
||||||
|
* This file may have been hand-edited. Look for HAND-EDIT comments
|
||||||
|
* before re-generating it.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "modemmanager1interface.h"
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Implementation of interface class OrgFreedesktopModemManager1Interface
|
||||||
|
*/
|
||||||
|
|
||||||
|
OrgFreedesktopModemManager1Interface::OrgFreedesktopModemManager1Interface(const QString &service,
|
||||||
|
const QString &path,
|
||||||
|
const QDBusConnection &connection,
|
||||||
|
QObject *parent)
|
||||||
|
: QDBusAbstractInterface(service, path, staticInterfaceName(), connection, parent)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
OrgFreedesktopModemManager1Interface::~OrgFreedesktopModemManager1Interface()
|
||||||
|
{
|
||||||
|
}
|
|
@ -0,0 +1,60 @@
|
||||||
|
/*
|
||||||
|
* This file was generated by qdbusxml2cpp version 0.7
|
||||||
|
* Command line was: qdbusxml2cpp -N -m -i generictypes.h -p modemmanager1interface \
|
||||||
|
* /home/jgrulich/development/projects/libmm-qt/dbus/introspection/org.freedesktop.ModemManager1.xml
|
||||||
|
*
|
||||||
|
* qdbusxml2cpp is Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
|
||||||
|
*
|
||||||
|
* This is an auto-generated file.
|
||||||
|
* Do not edit! All changes made to it will be lost.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef MODEMMANAGERQT_MODEMMANAGER1INTERFACE_H
|
||||||
|
#define MODEMMANAGERQT_MODEMMANAGER1INTERFACE_H
|
||||||
|
|
||||||
|
#include "generictypes.h"
|
||||||
|
#include <QList>
|
||||||
|
#include <QObject>
|
||||||
|
#include <QString>
|
||||||
|
#include <QVariant>
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Proxy class for interface org.freedesktop.ModemManager1
|
||||||
|
*/
|
||||||
|
class OrgFreedesktopModemManager1Interface : public QDBusAbstractInterface
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
static inline const char *staticInterfaceName()
|
||||||
|
#ifdef MMQT_STATIC
|
||||||
|
{
|
||||||
|
return "org.kde.fakemodem";
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
{
|
||||||
|
return "org.freedesktop.ModemManager1";
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
public:
|
||||||
|
OrgFreedesktopModemManager1Interface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = nullptr);
|
||||||
|
|
||||||
|
~OrgFreedesktopModemManager1Interface() override;
|
||||||
|
|
||||||
|
public Q_SLOTS: // METHODS
|
||||||
|
inline QDBusPendingReply<> ScanDevices()
|
||||||
|
{
|
||||||
|
QList<QVariant> argumentList;
|
||||||
|
return asyncCallWithArgumentList(QLatin1String("ScanDevices"), argumentList);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline QDBusPendingReply<> SetLogging(const QString &level)
|
||||||
|
{
|
||||||
|
QList<QVariant> argumentList;
|
||||||
|
argumentList << QVariant::fromValue(level);
|
||||||
|
return asyncCallWithArgumentList(QLatin1String("SetLogging"), argumentList);
|
||||||
|
}
|
||||||
|
|
||||||
|
Q_SIGNALS: // SIGNALS
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
|
@ -0,0 +1,29 @@
|
||||||
|
/*
|
||||||
|
* This file was generated by qdbusxml2cpp version 0.7
|
||||||
|
* Command line was: qdbusxml2cpp -N -m -i generictypes.h -p omainterface \
|
||||||
|
* /home/jgrulich/development/projects/libmm-qt/dbus/introspection/org.freedesktop.ModemManager1.Modem.Oma.xml
|
||||||
|
*
|
||||||
|
* qdbusxml2cpp is Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
|
||||||
|
*
|
||||||
|
* This is an auto-generated file.
|
||||||
|
* This file may have been hand-edited. Look for HAND-EDIT comments
|
||||||
|
* before re-generating it.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "omainterface.h"
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Implementation of interface class OrgFreedesktopModemManager1ModemOmaInterface
|
||||||
|
*/
|
||||||
|
|
||||||
|
OrgFreedesktopModemManager1ModemOmaInterface::OrgFreedesktopModemManager1ModemOmaInterface(const QString &service,
|
||||||
|
const QString &path,
|
||||||
|
const QDBusConnection &connection,
|
||||||
|
QObject *parent)
|
||||||
|
: QDBusAbstractInterface(service, path, staticInterfaceName(), connection, parent)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
OrgFreedesktopModemManager1ModemOmaInterface::~OrgFreedesktopModemManager1ModemOmaInterface()
|
||||||
|
{
|
||||||
|
}
|
|
@ -0,0 +1,99 @@
|
||||||
|
/*
|
||||||
|
* This file was generated by qdbusxml2cpp version 0.7
|
||||||
|
* Command line was: qdbusxml2cpp -N -m -i generictypes.h -p omainterface \
|
||||||
|
* /home/jgrulich/development/projects/libmm-qt/dbus/introspection/org.freedesktop.ModemManager1.Modem.Oma.xml
|
||||||
|
*
|
||||||
|
* qdbusxml2cpp is Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
|
||||||
|
*
|
||||||
|
* This is an auto-generated file.
|
||||||
|
* Do not edit! All changes made to it will be lost.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef MODEMMANAGERQT_OMAINTERFACE_H
|
||||||
|
#define MODEMMANAGERQT_OMAINTERFACE_H
|
||||||
|
|
||||||
|
#include "generictypes.h"
|
||||||
|
#include <QList>
|
||||||
|
#include <QObject>
|
||||||
|
#include <QString>
|
||||||
|
#include <QVariant>
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Proxy class for interface org.freedesktop.ModemManager1.Modem.Oma
|
||||||
|
*/
|
||||||
|
class OrgFreedesktopModemManager1ModemOmaInterface : public QDBusAbstractInterface
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
static inline const char *staticInterfaceName()
|
||||||
|
#ifdef MMQT_STATIC
|
||||||
|
{
|
||||||
|
return "org.kde.fakemodem.Modem.Oma";
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
{
|
||||||
|
return "org.freedesktop.ModemManager1.Modem.Oma";
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
public:
|
||||||
|
OrgFreedesktopModemManager1ModemOmaInterface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = nullptr);
|
||||||
|
|
||||||
|
~OrgFreedesktopModemManager1ModemOmaInterface() override;
|
||||||
|
|
||||||
|
Q_PROPERTY(uint Features READ features)
|
||||||
|
inline uint features() const
|
||||||
|
{
|
||||||
|
return qvariant_cast<uint>(property("Features"));
|
||||||
|
}
|
||||||
|
|
||||||
|
Q_PROPERTY(ModemManager::OmaSessionTypes PendingNetworkInitiatedSessions READ pendingNetworkInitiatedSessions)
|
||||||
|
inline ModemManager::OmaSessionTypes pendingNetworkInitiatedSessions() const
|
||||||
|
{
|
||||||
|
return qvariant_cast<ModemManager::OmaSessionTypes>(property("PendingNetworkInitiatedSessions"));
|
||||||
|
}
|
||||||
|
|
||||||
|
Q_PROPERTY(int SessionState READ sessionState)
|
||||||
|
inline int sessionState() const
|
||||||
|
{
|
||||||
|
return qvariant_cast<int>(property("SessionState"));
|
||||||
|
}
|
||||||
|
|
||||||
|
Q_PROPERTY(uint SessionType READ sessionType)
|
||||||
|
inline uint sessionType() const
|
||||||
|
{
|
||||||
|
return qvariant_cast<uint>(property("SessionType"));
|
||||||
|
}
|
||||||
|
|
||||||
|
public Q_SLOTS: // METHODS
|
||||||
|
inline QDBusPendingReply<> AcceptNetworkInitiatedSession(uint session_id, bool accept)
|
||||||
|
{
|
||||||
|
QList<QVariant> argumentList;
|
||||||
|
argumentList << QVariant::fromValue(session_id) << QVariant::fromValue(accept);
|
||||||
|
return asyncCallWithArgumentList(QLatin1String("AcceptNetworkInitiatedSession"), argumentList);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline QDBusPendingReply<> CancelSession()
|
||||||
|
{
|
||||||
|
QList<QVariant> argumentList;
|
||||||
|
return asyncCallWithArgumentList(QLatin1String("CancelSession"), argumentList);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline QDBusPendingReply<> Setup(uint features)
|
||||||
|
{
|
||||||
|
QList<QVariant> argumentList;
|
||||||
|
argumentList << QVariant::fromValue(features);
|
||||||
|
return asyncCallWithArgumentList(QLatin1String("Setup"), argumentList);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline QDBusPendingReply<> StartClientInitiatedSession(uint session_type)
|
||||||
|
{
|
||||||
|
QList<QVariant> argumentList;
|
||||||
|
argumentList << QVariant::fromValue(session_type);
|
||||||
|
return asyncCallWithArgumentList(QLatin1String("StartClientInitiatedSession"), argumentList);
|
||||||
|
}
|
||||||
|
|
||||||
|
Q_SIGNALS: // SIGNALS
|
||||||
|
void SessionStateChanged(int old_session_state, int new_session_state, uint session_state_failed_reason);
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
|
@ -0,0 +1,29 @@
|
||||||
|
/*
|
||||||
|
* This file was generated by qdbusxml2cpp version 0.7
|
||||||
|
* Command line was: qdbusxml2cpp -N -m -i generictypes.h -p signalinterface \
|
||||||
|
* /home/jgrulich/development/projects/libmm-qt/dbus/introspection/org.freedesktop.ModemManager1.Modem.Signal.xml
|
||||||
|
*
|
||||||
|
* qdbusxml2cpp is Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
|
||||||
|
*
|
||||||
|
* This is an auto-generated file.
|
||||||
|
* This file may have been hand-edited. Look for HAND-EDIT comments
|
||||||
|
* before re-generating it.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "signalinterface.h"
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Implementation of interface class OrgFreedesktopModemManager1ModemSignalInterface
|
||||||
|
*/
|
||||||
|
|
||||||
|
OrgFreedesktopModemManager1ModemSignalInterface::OrgFreedesktopModemManager1ModemSignalInterface(const QString &service,
|
||||||
|
const QString &path,
|
||||||
|
const QDBusConnection &connection,
|
||||||
|
QObject *parent)
|
||||||
|
: QDBusAbstractInterface(service, path, staticInterfaceName(), connection, parent)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
OrgFreedesktopModemManager1ModemSignalInterface::~OrgFreedesktopModemManager1ModemSignalInterface()
|
||||||
|
{
|
||||||
|
}
|
|
@ -0,0 +1,90 @@
|
||||||
|
/*
|
||||||
|
* This file was generated by qdbusxml2cpp version 0.7
|
||||||
|
* Command line was: qdbusxml2cpp -N -m -i generictypes.h -p signalinterface \
|
||||||
|
* /home/jgrulich/development/projects/libmm-qt/dbus/introspection/org.freedesktop.ModemManager1.Modem.Signal.xml
|
||||||
|
*
|
||||||
|
* qdbusxml2cpp is Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
|
||||||
|
*
|
||||||
|
* This is an auto-generated file.
|
||||||
|
* Do not edit! All changes made to it will be lost.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef MODEMMANAGERQT_SIGNALINTERFACE_H
|
||||||
|
#define MODEMMANAGERQT_SIGNALINTERFACE_H
|
||||||
|
|
||||||
|
#include "generictypes.h"
|
||||||
|
#include <QList>
|
||||||
|
#include <QObject>
|
||||||
|
#include <QString>
|
||||||
|
#include <QVariant>
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Proxy class for interface org.freedesktop.ModemManager1.Modem.Signal
|
||||||
|
*/
|
||||||
|
class OrgFreedesktopModemManager1ModemSignalInterface : public QDBusAbstractInterface
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
static inline const char *staticInterfaceName()
|
||||||
|
#ifdef MMQT_STATIC
|
||||||
|
{
|
||||||
|
return "org.kde.fakemodem.Modem.Signal";
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
{
|
||||||
|
return "org.freedesktop.ModemManager1.Modem.Signal";
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
public:
|
||||||
|
OrgFreedesktopModemManager1ModemSignalInterface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = nullptr);
|
||||||
|
|
||||||
|
~OrgFreedesktopModemManager1ModemSignalInterface() override;
|
||||||
|
|
||||||
|
Q_PROPERTY(QVariantMap Cdma READ cdma)
|
||||||
|
inline QVariantMap cdma() const
|
||||||
|
{
|
||||||
|
return qvariant_cast<QVariantMap>(property("Cdma"));
|
||||||
|
}
|
||||||
|
|
||||||
|
Q_PROPERTY(QVariantMap Evdo READ evdo)
|
||||||
|
inline QVariantMap evdo() const
|
||||||
|
{
|
||||||
|
return qvariant_cast<QVariantMap>(property("Evdo"));
|
||||||
|
}
|
||||||
|
|
||||||
|
Q_PROPERTY(QVariantMap Gsm READ gsm)
|
||||||
|
inline QVariantMap gsm() const
|
||||||
|
{
|
||||||
|
return qvariant_cast<QVariantMap>(property("Gsm"));
|
||||||
|
}
|
||||||
|
|
||||||
|
Q_PROPERTY(QVariantMap Lte READ lte)
|
||||||
|
inline QVariantMap lte() const
|
||||||
|
{
|
||||||
|
return qvariant_cast<QVariantMap>(property("Lte"));
|
||||||
|
}
|
||||||
|
|
||||||
|
Q_PROPERTY(uint Rate READ rate)
|
||||||
|
inline uint rate() const
|
||||||
|
{
|
||||||
|
return qvariant_cast<uint>(property("Rate"));
|
||||||
|
}
|
||||||
|
|
||||||
|
Q_PROPERTY(QVariantMap Umts READ umts)
|
||||||
|
inline QVariantMap umts() const
|
||||||
|
{
|
||||||
|
return qvariant_cast<QVariantMap>(property("Umts"));
|
||||||
|
}
|
||||||
|
|
||||||
|
public Q_SLOTS: // METHODS
|
||||||
|
inline QDBusPendingReply<> Setup(uint rate)
|
||||||
|
{
|
||||||
|
QList<QVariant> argumentList;
|
||||||
|
argumentList << QVariant::fromValue(rate);
|
||||||
|
return asyncCallWithArgumentList(QLatin1String("Setup"), argumentList);
|
||||||
|
}
|
||||||
|
|
||||||
|
Q_SIGNALS: // SIGNALS
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
|
@ -0,0 +1,29 @@
|
||||||
|
/*
|
||||||
|
* This file was generated by qdbusxml2cpp version 0.7
|
||||||
|
* Command line was: qdbusxml2cpp -N -m -i generictypes.h -p siminterface \
|
||||||
|
* /home/jgrulich/development/projects/libmm-qt/dbus/introspection/org.freedesktop.ModemManager1.Sim.xml
|
||||||
|
*
|
||||||
|
* qdbusxml2cpp is Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
|
||||||
|
*
|
||||||
|
* This is an auto-generated file.
|
||||||
|
* This file may have been hand-edited. Look for HAND-EDIT comments
|
||||||
|
* before re-generating it.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "siminterface.h"
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Implementation of interface class OrgFreedesktopModemManager1SimInterface
|
||||||
|
*/
|
||||||
|
|
||||||
|
OrgFreedesktopModemManager1SimInterface::OrgFreedesktopModemManager1SimInterface(const QString &service,
|
||||||
|
const QString &path,
|
||||||
|
const QDBusConnection &connection,
|
||||||
|
QObject *parent)
|
||||||
|
: QDBusAbstractInterface(service, path, staticInterfaceName(), connection, parent)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
OrgFreedesktopModemManager1SimInterface::~OrgFreedesktopModemManager1SimInterface()
|
||||||
|
{
|
||||||
|
}
|
|
@ -0,0 +1,99 @@
|
||||||
|
/*
|
||||||
|
* This file was generated by qdbusxml2cpp version 0.7
|
||||||
|
* Command line was: qdbusxml2cpp -N -m -i generictypes.h -p siminterface \
|
||||||
|
* /home/jgrulich/development/projects/libmm-qt/dbus/introspection/org.freedesktop.ModemManager1.Sim.xml
|
||||||
|
*
|
||||||
|
* qdbusxml2cpp is Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
|
||||||
|
*
|
||||||
|
* This is an auto-generated file.
|
||||||
|
* Do not edit! All changes made to it will be lost.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef MODEMMANAGERQT_SIMINTERFACE_H
|
||||||
|
#define MODEMMANAGERQT_SIMINTERFACE_H
|
||||||
|
|
||||||
|
#include "generictypes.h"
|
||||||
|
#include <QList>
|
||||||
|
#include <QObject>
|
||||||
|
#include <QString>
|
||||||
|
#include <QVariant>
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Proxy class for interface org.freedesktop.ModemManager1.Sim
|
||||||
|
*/
|
||||||
|
class OrgFreedesktopModemManager1SimInterface : public QDBusAbstractInterface
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
static inline const char *staticInterfaceName()
|
||||||
|
#ifdef MMQT_STATIC
|
||||||
|
{
|
||||||
|
return "org.kde.fakemodem.Sim";
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
{
|
||||||
|
return "org.freedesktop.ModemManager1.Sim";
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
public:
|
||||||
|
OrgFreedesktopModemManager1SimInterface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = nullptr);
|
||||||
|
|
||||||
|
~OrgFreedesktopModemManager1SimInterface() override;
|
||||||
|
|
||||||
|
Q_PROPERTY(QString Imsi READ imsi)
|
||||||
|
inline QString imsi() const
|
||||||
|
{
|
||||||
|
return qvariant_cast<QString>(property("Imsi"));
|
||||||
|
}
|
||||||
|
|
||||||
|
Q_PROPERTY(QString OperatorIdentifier READ operatorIdentifier)
|
||||||
|
inline QString operatorIdentifier() const
|
||||||
|
{
|
||||||
|
return qvariant_cast<QString>(property("OperatorIdentifier"));
|
||||||
|
}
|
||||||
|
|
||||||
|
Q_PROPERTY(QString OperatorName READ operatorName)
|
||||||
|
inline QString operatorName() const
|
||||||
|
{
|
||||||
|
return qvariant_cast<QString>(property("OperatorName"));
|
||||||
|
}
|
||||||
|
|
||||||
|
Q_PROPERTY(QString SimIdentifier READ simIdentifier)
|
||||||
|
inline QString simIdentifier() const
|
||||||
|
{
|
||||||
|
return qvariant_cast<QString>(property("SimIdentifier"));
|
||||||
|
}
|
||||||
|
|
||||||
|
public Q_SLOTS: // METHODS
|
||||||
|
inline QDBusPendingReply<> ChangePin(const QString &old_pin, const QString &new_pin)
|
||||||
|
{
|
||||||
|
QList<QVariant> argumentList;
|
||||||
|
argumentList << QVariant::fromValue(old_pin) << QVariant::fromValue(new_pin);
|
||||||
|
return asyncCallWithArgumentList(QLatin1String("ChangePin"), argumentList);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline QDBusPendingReply<> EnablePin(const QString &pin, bool enabled)
|
||||||
|
{
|
||||||
|
QList<QVariant> argumentList;
|
||||||
|
argumentList << QVariant::fromValue(pin) << QVariant::fromValue(enabled);
|
||||||
|
return asyncCallWithArgumentList(QLatin1String("EnablePin"), argumentList);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline QDBusPendingReply<> SendPin(const QString &pin)
|
||||||
|
{
|
||||||
|
QList<QVariant> argumentList;
|
||||||
|
argumentList << QVariant::fromValue(pin);
|
||||||
|
return asyncCallWithArgumentList(QLatin1String("SendPin"), argumentList);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline QDBusPendingReply<> SendPuk(const QString &puk, const QString &pin)
|
||||||
|
{
|
||||||
|
QList<QVariant> argumentList;
|
||||||
|
argumentList << QVariant::fromValue(puk) << QVariant::fromValue(pin);
|
||||||
|
return asyncCallWithArgumentList(QLatin1String("SendPuk"), argumentList);
|
||||||
|
}
|
||||||
|
|
||||||
|
Q_SIGNALS: // SIGNALS
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
|
@ -0,0 +1,29 @@
|
||||||
|
/*
|
||||||
|
* This file was generated by qdbusxml2cpp version 0.7
|
||||||
|
* Command line was: qdbusxml2cpp -N -m -i generictypes.h -p simpleinterface \
|
||||||
|
* /home/jgrulich/development/projects/libmm-qt/dbus/introspection/org.freedesktop.ModemManager1.Modem.Simple.xml
|
||||||
|
*
|
||||||
|
* qdbusxml2cpp is Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
|
||||||
|
*
|
||||||
|
* This is an auto-generated file.
|
||||||
|
* This file may have been hand-edited. Look for HAND-EDIT comments
|
||||||
|
* before re-generating it.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "simpleinterface.h"
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Implementation of interface class OrgFreedesktopModemManager1ModemSimpleInterface
|
||||||
|
*/
|
||||||
|
|
||||||
|
OrgFreedesktopModemManager1ModemSimpleInterface::OrgFreedesktopModemManager1ModemSimpleInterface(const QString &service,
|
||||||
|
const QString &path,
|
||||||
|
const QDBusConnection &connection,
|
||||||
|
QObject *parent)
|
||||||
|
: QDBusAbstractInterface(service, path, staticInterfaceName(), connection, parent)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
OrgFreedesktopModemManager1ModemSimpleInterface::~OrgFreedesktopModemManager1ModemSimpleInterface()
|
||||||
|
{
|
||||||
|
}
|
|
@ -0,0 +1,67 @@
|
||||||
|
/*
|
||||||
|
* This file was generated by qdbusxml2cpp version 0.7
|
||||||
|
* Command line was: qdbusxml2cpp -N -m -i generictypes.h -p simpleinterface \
|
||||||
|
* /home/jgrulich/development/projects/libmm-qt/dbus/introspection/org.freedesktop.ModemManager1.Modem.Simple.xml
|
||||||
|
*
|
||||||
|
* qdbusxml2cpp is Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
|
||||||
|
*
|
||||||
|
* This is an auto-generated file.
|
||||||
|
* Do not edit! All changes made to it will be lost.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef MODEMMANAGERQT_SIMPLEINTERFACE_H
|
||||||
|
#define MODEMMANAGERQT_SIMPLEINTERFACE_H
|
||||||
|
|
||||||
|
#include "generictypes.h"
|
||||||
|
#include <QList>
|
||||||
|
#include <QObject>
|
||||||
|
#include <QString>
|
||||||
|
#include <QVariant>
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Proxy class for interface org.freedesktop.ModemManager1.Modem.Simple
|
||||||
|
*/
|
||||||
|
class OrgFreedesktopModemManager1ModemSimpleInterface : public QDBusAbstractInterface
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
static inline const char *staticInterfaceName()
|
||||||
|
#ifdef MMQT_STATIC
|
||||||
|
{
|
||||||
|
return "org.kde.fakemodem.Modem.Simple";
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
{
|
||||||
|
return "org.freedesktop.ModemManager1.Modem.Simple";
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
public:
|
||||||
|
OrgFreedesktopModemManager1ModemSimpleInterface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = nullptr);
|
||||||
|
|
||||||
|
~OrgFreedesktopModemManager1ModemSimpleInterface() override;
|
||||||
|
|
||||||
|
public Q_SLOTS: // METHODS
|
||||||
|
inline QDBusPendingReply<QDBusObjectPath> Connect(const QVariantMap &properties)
|
||||||
|
{
|
||||||
|
QList<QVariant> argumentList;
|
||||||
|
argumentList << QVariant::fromValue(properties);
|
||||||
|
return asyncCallWithArgumentList(QLatin1String("Connect"), argumentList);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline QDBusPendingReply<> Disconnect(const QDBusObjectPath &bearer)
|
||||||
|
{
|
||||||
|
QList<QVariant> argumentList;
|
||||||
|
argumentList << QVariant::fromValue(bearer);
|
||||||
|
return asyncCallWithArgumentList(QLatin1String("Disconnect"), argumentList);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline QDBusPendingReply<QVariantMap> GetStatus()
|
||||||
|
{
|
||||||
|
QList<QVariant> argumentList;
|
||||||
|
return asyncCallWithArgumentList(QLatin1String("GetStatus"), argumentList);
|
||||||
|
}
|
||||||
|
|
||||||
|
Q_SIGNALS: // SIGNALS
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue