Коммит 364d6f88 создал по автору OMP Education's avatar OMP Education
Просмотр файлов

[Project] Example Call API

владелец 6cd1a950
*~
*.o
moc_*.cpp
src/urihandleradaptor.cpp
src/urihandleradaptor.h
*.pro.*
*.list
Makefile
RPMS/*
build/
installroot/*
*.qm
.*.swp
# Authors # Authors
* Kirill Chuvilin, <k.chuvilin@omp.ru> * Kirill Chuvilin, <k.chuvilin@omp.ru>
* Product owner, 2022 * Product owner, 2025
* Maintainer, 2022 * Denis Grigorev, <d.grigorev@omp.ru>
* Developer, 2025
* Alexander Roditelev, <a.roditelev@omp.ru>
* Developer, 2025
* Evgeniy Samohin, <e.samohin@omp.ru>
* Maintainer, 2025
...@@ -79,6 +79,6 @@ please contact <community@omp.ru>. ...@@ -79,6 +79,6 @@ please contact <community@omp.ru>.
This work is licensed under a Creative Commons Attribution 3.0 Unported License This work is licensed under a Creative Commons Attribution 3.0 Unported License
For attribution requirements: For attribution requirements:
«Open Mobile Platform Code of Conduct» «Open Mobile Platform Code of Conduct»
Copyright (c) 2023 Open Mobile Platform LLC, Copyright (c) 2025 Open Mobile Platform LLC,
used under a [Creative Commons Attribution Unported license](http://creativecommons.org/licenses/by/3.0/). used under a [Creative Commons Attribution Unported license](http://creativecommons.org/licenses/by/3.0/).
# The 3-Clause BSD License # The 3-Clause BSD License
_Copyright (c) 2023 Open Mobile Platform LLC._ _Copyright (c) 2025 Open Mobile Platform LLC._
Redistribution and use in source and binary forms, Redistribution and use in source and binary forms,
with or without modification, with or without modification,
......
# Application Template [RU](README.ru.md) | [**EN**](README.md)
The project provides a template for Aurora OS applications. # Audio Call Use Cases
The main purpose is to clearly demonstrate almost minimal source code to get a correct and extensible application. ## Application Description
## Terms of Use and Participation This example expands on the Call API demonstration. The code shows how to:
* synchronize audio device control,
* use a public D-Bus wrapper (libcallservice),
* manage a call,
* reverse a URL,
* configure audio input/output.
The source code of the project is provided under [the license](LICENSE.BSD-3-CLAUSE.md), ## Contents
that allows it to be used in third-party applications. - [Compatibility](#compatibility)
- [Build Features](#Build-Features)
The [contributor agreement](CONTRIBUTING.md) documents the rights granted by contributors - [Branch Information](#Branch-Information)
to the Open Mobile Platform. - [Installation and Launch](#Installation-and-Launch)
- [Screenshots](#screenshots)
For information about contributors see [AUTHORS](AUTHORS.md). - [Project Structure](#project-structure)
- [Usage Rules and Participation in Development](#Usage-Rules-and-Participation-in-Development)
[Code of conduct](CODE_OF_CONDUCT.md) is a current set of rules of the Open Mobile
Platform which informs you how we expect the members of the community will interact
while contributing and communicating.
## Project Structure
The project has a common structure
of an application based on C++ and QML for Aurora OS.
* **[ru.auroraos.ApplicationTemplate.pro](ru.auroraos.ApplicationTemplate.pro)** file describes the project structure for the qmake build system.
* **[icons](icons)** directory contains application icons for different screen resolutions.
* **[qml](qml)** directory contains the QML source code and the UI resources.
* **[cover](qml/cover)** directory contains the application cover implementations.
* **[icons](qml/icons)** directory contains the custom UI icons.
* **[pages](qml/pages)** directory contains the application pages.
* **[ApplicationTemplate.qml](qml/ApplicationTemplate.qml)** file provides the application window implementation.
* **[rpm](rpm)** directory contains the rpm-package build settings.
**[ru.auroraos.ApplicationTemplate.spec](rpm/ru.auroraos.ApplicationTemplate.spec)** file is used by rpmbuild tool.
* **[src](src)** directory contains the C++ source code.
* **[main.cpp](src/main.cpp)** file is the application entry point.
* **[translations](translations)** directory contains the UI translation files.
* **[ru.auroraos.ApplicationTemplate.desktop](ru.auroraos.ApplicationTemplate.desktop)** file defines the display and parameters for launching the application.
<a name="compatibility"></a>
## Compatibility ## Compatibility
The project is compatible with the current version of Aurora OS.
The project is compatible with all the supported versions of the Aurora OS. <a name="Build-Features"></a>
## Build Features
The project is built in the usual way using the Aurora SDK.
## Project Building <a name="branch-information"></a>
## Branch information
The application versions comply with the [branch name](https://developer.auroraos.ru/doc/software_development/examples#branches) convention
The project is built in the usual way using the Aurora SDK. <a name="Installation-and-launch"></a>
## Installation and launch
The application is installed and launched according to the [Example build](https://developer.auroraos.ru/doc/sdk/app_development/work/create/examples#build) instructions.
## Screenshots The application must have `Call` permissions to work. These permissions are set in the .desktop file.
<a name="screenshots"></a>
## Screenshots
![screenshots](screenshots/screenshots.png) ![screenshots](screenshots/screenshots.png)
## This document in Russian / Перевод этого документа на русский язык <a name="project-structure"></a>
## Project structure
- [README.ru.md](README.ru.md) The project has a standard structure of an application based on C++ and QML for Aurora OS.
* The **[ru.auroraos.AudioCallUseCases.pro](ru.auroraos.AudioCallUseCases.pro)** file describes the application structure for the QMake build system.
* The **[icons](icons)** directory contains application icons for different screen resolutions.
* The **[qml](qml)** directory contains QML source code and user interface resources.
* The **[cover](qml/cover)** directory contains application shell implementations.
* The **[icons](qml/icons)** directory contains additional user interface icons.
* The **[pages](qml/pages)** directory contains the application pages.
* The **[AudioCallExample.qml](qml/AudioCallExample.qml)** file implements the application window.
* The **[rpm](rpm)** directory contains the rpm package build settings.
The **[ru.auroraos.AudioCallUseCases.spec](rpm/ru.auroraos.AudioCallUseCases.spec)** file is used by the rpmbuild tool.
* The **[src](src)** directory contains the C++ source code.
* The **[main.cpp](src/main.cpp)** file is the application entry point.
* The **[translations](translations)** directory contains the user interface translation files.
* The **[config](config)** directory contains an xml file with the application settings.
* The **[ru.auroraos.AudioCallUseCases.desktop](ru.auroraos.AudioCallUseCases.desktop)** file defines the display and launch parameters of the application.
<a name="terms-of-use-and-contribution-to-development"></a>
## Terms of Use and Contribution to Development
The source code of the project is provided under a [license](LICENSE.BSD-3-CLAUSE.md),
which allows its use in third-party applications.
The [Contributor Agreement](CONTRIBUTING.md) regulates the rights granted by the participants of the Open Mobile Platform company.
Information about the participants is specified in the [AUTHORS](AUTHORS.md) file.
[Code of Conduct](CODE_OF_CONDUCT.md) is the current set of rules
of the Open Mobile Platform company,
which informs about the expectations for interaction between community members when communicating and working on projects.
[**RU**](README.ru.md) | [EN](README.md)
# Примеры использования аудиозвонков
## Описание приложения
Данный пример, расширающий демонстрацию работы с Call API. В коде показано, как:
- синхронизировать управление аудиоустройствам
- использовать публичную обертку над D-Bus (libcallservice)
- как управлять вызовом
- обрататывать url
- настраивать ввод-вывод звука
## Содержание
- [Совместимость](#совместимость)
- [Особенности сборки](#Особенности-сборки)
- [Информация о ветках](#информация-о-ветках)
- [Установка и запуск](#Установка-и-запуск)
- [Скриншоты](#скриншоты)
- [Структура проекта](#структура-проекта)
- [Правила использования и участие в разработке](#правила-использования-и-участие-в-разработке)
<a name="совместимость"></a>
## Совместимость
Проект совместим с текущей версией ОС Аврора.
<a name="Особенности-сборки"></a>
## Особенности сборки
Проект собирается обычным образом с помощью Аврора SDK.
<a name="информация-о-ветках"></a>
## Информация о ветках
Версии приложения соответствуют соглашению об [наименовании веток](https://developer.auroraos.ru/doc/software_development/examples#branches)
<a name="Установка-и-запуск"></a>
## Установка и запуск
Установка и запуск приложения производятся согласно инструкции [Сборка примера](https://developer.auroraos.ru/doc/sdk/app_development/work/create/examples#build).
Приложению для работы необходимо иметь разрешения на `Call`. Эти разрешения задаются в .desktop файле.
<a name="скриншоты"></a>
## Скриншоты
![screenshots](screenshots/screenshots.png)
<a name="структура-проекта"></a>
## Структура проекта
Проект имеет стандартную структуру приложения на базе C++ и QML для ОС Аврора.
* Файл **[ru.auroraos.AudioCallUseCases.pro](ru.auroraos.AudioCallUseCases.pro)** описывает структуру приложения для системы сборки QMake.
* Каталог **[icons](icons)** содержит значки приложений для разных разрешений экрана.
* Каталог **[qml](qml)** содержит исходный код QML и ресурсы пользовательского интерфейса.
* Каталог **[cover](qml/cover)** содержит реализации оболочек приложений.
* Каталог **[icons](qml/icons)** содержит дополнительные иконки интерфейса пользователя.
* Каталог **[pages](qml/pages)** содержит страницы приложения.
* Файл **[AudioCallExample.qml](qml/AudioCallExample.qml)** обеспечивает реализацию окна приложения.
* Каталог **[rpm](rpm)** содержит настройки сборки rpm-пакета.
Файл **[ru.auroraos.AudioCallUseCases.spec](rpm/ru.auroraos.AudioCallUseCases.spec)** используется инструментом rpmbuild.
* Каталог **[src](app/src)** содержит исходный код C++.
* Файл **[main.cpp](src/main.cpp)** является точкой входа приложения.
* Каталог **[translations](translations)** содержит файлы перевода пользовательского интерфейса.
* Каталог **[config](config)** содержит xml файл с настройками приложения.
* Файл **[ru.auroraos.AudioCallUseCases.desktop](ru.auroraos.AudioCallUseCases.desktop)** определяет отображение и параметры запуска приложения.
<a name="правила-использования-и-участие-в-разработке"></a>
## Правила использования и участие в разработке
Исходный код проекта предоставляется по [лицензии](LICENSE.BSD-3-CLAUSE.md),
которая позволяет использовать его в сторонних приложениях.
[Соглашение участника](CONTRIBUTING.md) регламентирует права, предоставляемые участниками компании «Открытая Мобильная Платформа».
Информация об участниках указана в файле [AUTHORS](AUTHORS.md).
[Кодекс поведения](CODE_OF_CONDUCT.md) — это действующий набор правил
компании «Открытая Мобильная Платформа»,
который информирует об ожиданиях по взаимодействию между членами сообщества при общении и работе над проектами.
<!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="ru.auroraos.AudioCallUseCases">
<method name="openUri">
<arg name="args" type="as" direction="in"/>
<annotation name="org.freedesktop.DBus.Method.NoReply" value="true"/>
</method>
</interface>
</node>
// SPDX-FileCopyrightText: 2023 Open Mobile Platform LLC <community@omp.ru> // SPDX-FileCopyrightText: 2025 Open Mobile Platform LLC <community@omp.ru>
// SPDX-License-Identifier: BSD-3-Clause // SPDX-License-Identifier: BSD-3-Clause
import QtQuick 2.0 import QtQuick 2.0
......
// SPDX-FileCopyrightText: 2023 Open Mobile Platform LLC <community@omp.ru> // SPDX-FileCopyrightText: 2025 Open Mobile Platform LLC <community@omp.ru>
// SPDX-License-Identifier: BSD-3-Clause // SPDX-License-Identifier: BSD-3-Clause
import QtQuick 2.0 import QtQuick 2.0
...@@ -9,13 +9,10 @@ CoverBackground { ...@@ -9,13 +9,10 @@ CoverBackground {
CoverPlaceholder { CoverPlaceholder {
objectName: "placeholder" objectName: "placeholder"
text: qsTr("Application Template") text: qsTr("Template")
icon { icon {
source: Qt.resolvedUrl("../icons/ApplicationTemplate.svg") source: Qt.resolvedUrl("../icons/AudioCallUseCases.svg")
sourceSize { sourceSize { width: icon.width; height: icon.height }
width: icon.width;
height: icon.height
}
} }
forceFit: true forceFit: true
} }
......
<svg width="1024" height="1024" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<path id="Background" d="m0 357.5c0-180.46 0-245.38 56.06-301.44s120.99-56.06 326.74-56.06h258.39c205.76 0 270.68 0 326.74 56.06s56.06 120.99 56.06 326.74v258.39c0 205.76 0 270.68-56.06 326.74-56.06 56.059-120.99 56.059-326.74 56.059h-258.39c-205.76 0-270.68 0-326.74-56.059-56.06-56.06-56.06-120.99-56.06-326.74z" fill="#003e88"/>
<mask id="Frame_Mask" maskUnits="userSpaceOnUse">
<use xlink:href="#Background"/>
</mask>
<g fill="none" mask="url(#Frame_Mask)" stroke="#4169e1" stroke-width="1024">
<path d="m-2e-5 512h1024" stroke-dasharray="1.024, 49.152, 1.024, 0"/>
<path d="m512-2.41e-5v1024" stroke-dasharray="1.024, 49.152, 1.024, 0"/>
<path d="m-2e-5 512h1024" stroke-dasharray="2.56, 506.88, 2.56, 0"/>
<path d="m512-2.41e-5v1024" stroke-dasharray="2.56, 506.88, 2.56, 0"/>
</g>
<radialGradient id="Aurora_Gradient" cx="253.16" cy="572.03" r="346.86" gradientTransform="matrix(1.7323 .99965 -1 1.7329 540.61 -618.36)" gradientUnits="userSpaceOnUse">
<stop stop-color="#fff" offset="0"/>
<stop stop-color="#fff" stop-opacity="0" offset="1"/>
</radialGradient>
<path d="m820.13 625.96h-23.404a3.7229 3.7229 0 0 1-3.2222-5.5952l8.1207-14.064a12.388 12.388 0 0 0 0-12.41l-35.161-60.959-53.775 93.007h-17.831a3.7229 3.7229 0 0 1-3.2222-5.5952l59.109-102.32a12.388 12.388 0 0 0 0-12.41l-35.161-60.959-204.15 353.24-9.2745-16.045a9.8624 9.8624 0 0 1 0-9.9277l197.7-341.96a12.388 12.388 0 0 0 0-12.41l-35.161-60.959-204.21 353.19-9.2528-16.045a9.8624 9.8624 0 0 1 0-9.9277l197.75-342.05a12.388 12.388 0 0 0 0-12.41l-35.182-61.003-206.7 357.61h-17.722a3.7229 3.7229 0 0 1-3.2221-5.5952l211.92-366.76a12.453 12.453 0 0 0 0-12.41l-35.182-60.959-257.66 445.72h-17.831a3.7229 3.7229 0 0 1-3.2221-5.5952l263.02-455.02a12.388 12.388 0 0 0 0-12.41l-35.204-60.938-346.86 601.06h208.15l138.16 238.94 138.18-238.94h209.22z" fill="url(#Aurora_Gradient)"/>
</svg>
Это отличие свёрнуто
// SPDX-FileCopyrightText: 2023 Open Mobile Platform LLC <community@omp.ru> // SPDX-FileCopyrightText: 2025 Open Mobile Platform LLC <community@omp.ru>
// SPDX-License-Identifier: BSD-3-Clause // SPDX-License-Identifier: BSD-3-Clause
import QtQuick 2.0 import QtQuick 2.0
......
Поддерживает Markdown
0% или .
You are about to add 0 people to the discussion. Proceed with caution.
Сначала завершите редактирование этого сообщения!
Пожалуйста, зарегистрируйтесь или чтобы прокомментировать