feat(初始化):代码迁移
|
@ -0,0 +1,57 @@
|
|||
# Prerequisites
|
||||
*.d
|
||||
|
||||
# Compiled Object files
|
||||
*.slo
|
||||
*.lo
|
||||
*.o
|
||||
*.obj
|
||||
|
||||
# Precompiled Headers
|
||||
*.gch
|
||||
*.pch
|
||||
|
||||
# Compiled Dynamic libraries
|
||||
*.so
|
||||
*.dylib
|
||||
*.dll
|
||||
|
||||
# Fortran module files
|
||||
*.mod
|
||||
*.smod
|
||||
|
||||
# Compiled Static libraries
|
||||
*.lai
|
||||
*.la
|
||||
*.a
|
||||
*.lib
|
||||
|
||||
# Executables
|
||||
*.exe
|
||||
*.out
|
||||
*.app
|
||||
|
||||
CMakeLists.txt.user
|
||||
kylin-mobile-assistant.pro.user
|
||||
build/
|
||||
../build-kylin-mobile-assistant-unknown-Debug/
|
||||
cmake-build-debug/
|
||||
/.idea/.gitignore
|
||||
/.idea/misc.xml
|
||||
/.idea/modules.xml
|
||||
/.idea/vcs.xml
|
||||
.husky/
|
||||
commitlint.config.js
|
||||
node_modules/
|
||||
package-lock.json
|
||||
package.json
|
||||
.idea
|
||||
/kylin-mobile-assistant
|
||||
translations/*.qm
|
||||
plugin/peony-vfs-kylin-multiterminal/translations/*.qm
|
||||
.vscode/
|
||||
common/openkmre.cpp
|
||||
common/openkmre.h
|
||||
~/
|
||||
|
||||
output/
|
|
@ -0,0 +1,82 @@
|
|||
cmake_minimum_required(VERSION 3.14)
|
||||
project(kylin-connectivity)
|
||||
|
||||
set(CMAKE_AUTOUIC ON)
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_AUTORCC ON)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
find_package(QT NAMES Qt5 COMPONENTS Widgets Network LinguistTools REQUIRED)
|
||||
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Widgets Network LinguistTools REQUIRED)
|
||||
|
||||
#option(ASAN_TEST "Build with -fsanitize" ON)
|
||||
#if (ASAN_TEST)
|
||||
# set(CMAKE_CXX_FLAGS " -fsanitize=address -g ")
|
||||
#endif ()
|
||||
|
||||
ADD_DEFINITIONS(-DQT_NO_KEYWORDS) # CONFIG += no_keywords qt关键字冲突
|
||||
|
||||
file(GLOB TS_FILES "${CMAKE_CURRENT_SOURCE_DIR}/translations/*.ts")
|
||||
|
||||
|
||||
execute_process(COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/translations/generate_translations_pm.sh ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
set(QRC_MAIN "${CMAKE_CURRENT_SOURCE_DIR}/res/resources.qrc")
|
||||
|
||||
add_executable(kylin-connectivity
|
||||
main.cpp
|
||||
${QRC_MAIN}
|
||||
)
|
||||
|
||||
set(SUBDIRECTORIES_MAIN
|
||||
common
|
||||
connectmanage
|
||||
discovery
|
||||
filesearch
|
||||
filetransfer
|
||||
filesync
|
||||
kylin-mobile-assistant-mountftp
|
||||
plugin
|
||||
projection
|
||||
ui
|
||||
dbus
|
||||
pcscreenmanage
|
||||
third_party/plugins-simple
|
||||
)
|
||||
foreach (SUBDIRECTORY_MAIN ${SUBDIRECTORIES_MAIN})
|
||||
add_subdirectory(${SUBDIRECTORY_MAIN})
|
||||
endforeach ()
|
||||
#add_subdirectory(dsoftbus)
|
||||
|
||||
find_package(PkgConfig REQUIRED)
|
||||
|
||||
pkg_check_modules(KYSDK_ALM kysdk-alm)
|
||||
target_include_directories(kylin-connectivity PUBLIC ${KYSDK_ALM_INCLUDE_DIRS})
|
||||
target_link_directories(kylin-connectivity PUBLIC ${KYSDK_ALM_LIBRARY_DIRS})
|
||||
target_link_libraries(kylin-connectivity PUBLIC ${KYSDK_ALM_LIBRARIES})
|
||||
|
||||
pkg_check_modules(KYSDK_LOG kysdk-log)
|
||||
target_include_directories(kylin-connectivity PUBLIC ${KYSDK_LOG_INCLUDE_DIRS})
|
||||
target_link_directories(kylin-connectivity PUBLIC ${KYSDK_LOG_LIBRARY_DIRS})
|
||||
target_link_libraries(kylin-connectivity PUBLIC ${KYSDK_LOG_LIBRARIES})
|
||||
|
||||
pkg_check_modules(KYSDK_WAYLANDHELPER kysdk-waylandhelper)
|
||||
target_include_directories(kylin-connectivity PUBLIC ${KYSDK_WAYLANDHELPER_INCLUDE_DIRS})
|
||||
target_link_directories(kylin-connectivity PUBLIC ${KYSDK_WAYLANDHELPER_LIBRARY_DIRS})
|
||||
target_link_libraries(kylin-connectivity PUBLIC ${KYSDK_WAYLANDHELPER_LIBRARIES})
|
||||
|
||||
set(TOP_DIR ${CMAKE_CURRENT_LIST_DIR})
|
||||
target_include_directories(kylin-connectivity PUBLIC ${TOP_DIR}/kabase/Qt)
|
||||
|
||||
target_include_directories(kylin-connectivity PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
|
||||
target_link_libraries(kylin-connectivity PRIVATE
|
||||
Qt${QT_VERSION_MAJOR}::Widgets
|
||||
mobileui
|
||||
mobile_dbus
|
||||
)
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
## 如何编译
|
||||
|
||||
尽量提供了所有依赖资源,方便傻瓜式编译。
|
||||
|
||||
### PC端
|
||||
|
||||
1. 在麒麟操作系统上搭建Qt开发环境
|
||||
Qt版本>=5.12
|
||||
2. 克隆该项目
|
||||
3. 根据kylin-mobile-assistant.pro 或 CmakeList.txt 打开项目
|
||||
4. 编译,运行
|
||||
|
||||
### 依赖
|
||||
|
||||
* qtbase5-dev,
|
||||
* qt5-qmake,
|
||||
* qttools5-dev-tools,
|
||||
* qttools5-dev,
|
||||
* libkf5windowsystem-dev,
|
||||
* libqt5x11extras5-dev,
|
||||
* cmake,
|
||||
* pkgconf,
|
||||
* libukui-log4qt-dev,
|
||||
* libgsettings-qt-dev,
|
||||
* adb,
|
||||
* libavformat-dev,
|
||||
* libswscale-dev,
|
||||
* libavcodec-dev,
|
||||
* libavutil-dev,
|
||||
* libffmpegthumbnailer-dev,
|
||||
* libqrencode-dev,
|
||||
* libkysdk-applications(>=1.0.0kylin8),
|
||||
* vlc,
|
||||
* libsystemd-dev,
|
||||
* libglib2.0-dev,
|
||||
* libkysdk-qtwidgets-dev
|
||||
|
||||
### 编译
|
||||
|
||||
```
|
||||
mkdir build
|
||||
cd build
|
||||
cmake ../
|
||||
make
|
||||
sudo make install
|
||||
```
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
# adb
|
||||
set(MOBILE_COMMON_ADB_SOURCES
|
||||
adb/adbprocess.h
|
||||
adb/adbprocess.cpp
|
||||
)
|
||||
source_group(adb FILES ${MOBILE_COMMON_ADB_SOURCES})
|
||||
|
||||
set(MOBILE_COMMON_UIBASE_SOURCES
|
||||
uibase/tipwidget.h
|
||||
uibase/tipwidget.cpp
|
||||
uibase/loadanimation.h
|
||||
uibase/loadanimation.cpp
|
||||
)
|
||||
source_group(uibase FILES ${MOBILE_COMMON_UIBASE_SOURCES})
|
||||
|
||||
set(MOBILE_COMMON_SOURCES
|
||||
config.h
|
||||
config.cpp
|
||||
fileinfo.h
|
||||
fileinfo.cpp
|
||||
fileinfolist.h
|
||||
fileinfolist.cpp
|
||||
generatetools.h
|
||||
generatetools.cpp
|
||||
highlight-effect.h
|
||||
serverstatus.h
|
||||
serverstatus.cpp
|
||||
util.h
|
||||
util.cpp)
|
||||
|
||||
set(MOBILE_COMMON
|
||||
${MOBILE_COMMON_ADB_SOURCES}
|
||||
${MOBILE_COMMON_UIBASE_SOURCES}
|
||||
${MOBILE_COMMON_SOURCES}
|
||||
)
|
||||
|
||||
set(TOP_DIR ${CMAKE_CURRENT_LIST_DIR})
|
||||
|
||||
add_library(mobile_common ${MOBILE_COMMON})
|
||||
|
||||
find_package(Qt5DBus COMPONENTS Dbus REQUIRED)
|
||||
find_package(PkgConfig REQUIRED)
|
||||
|
||||
pkg_check_modules(KYSDK_DIAGNOSTICS kysdk-diagnostics)
|
||||
target_include_directories(mobile_common PUBLIC ${KYSDK_DIAGNOSTICS_INCLUDE_DIRS})
|
||||
target_link_directories(mobile_common PUBLIC ${KYSDK_DIAGNOSTICS_LIBRARY_DIRS})
|
||||
target_link_libraries(mobile_common PUBLIC ${KYSDK_DIAGNOSTICS_LIBRARIES})
|
||||
|
||||
target_include_directories(mobile_common PUBLIC adb)
|
||||
target_include_directories(mobile_common PUBLIC uibase)
|
||||
target_include_directories(mobile_common PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
target_include_directories(mobile_common PUBLIC ${TOP_DIR}/../kabase/)
|
||||
|
||||
target_link_libraries(mobile_common PUBLIC
|
||||
Qt${QT_VERSION_MAJOR}::Widgets
|
||||
Qt${QT_VERSION_MAJOR}::Network
|
||||
${Qt5DBus_LIBRARIES}
|
||||
qrencode
|
||||
)
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
HEADERS += \
|
||||
$$PWD/adbprocess.h
|
||||
|
||||
SOURCES += \
|
||||
$$PWD/adbprocess.cpp
|
|
@ -0,0 +1,244 @@
|
|||
#include "adbprocess.h"
|
||||
#include <QCoreApplication>
|
||||
#include <QDebug>
|
||||
#include <QDir>
|
||||
#include <QFileInfo>
|
||||
#include <QProcess>
|
||||
|
||||
#include "config.h"
|
||||
|
||||
QString AdbProcess::s_adbPath = "";
|
||||
|
||||
AdbProcess::AdbProcess(QObject *parent) : QProcess(parent)
|
||||
{
|
||||
initSignals();
|
||||
}
|
||||
|
||||
AdbProcess::~AdbProcess()
|
||||
{
|
||||
if (isRuning()) {
|
||||
close();
|
||||
}
|
||||
}
|
||||
|
||||
const QString &AdbProcess::getAdbPath()
|
||||
{
|
||||
if (s_adbPath.isEmpty()) {
|
||||
s_adbPath = QString::fromLocal8Bit(qgetenv("ADB_PATH"));
|
||||
|
||||
QFileInfo fileInfo(s_adbPath);
|
||||
if (s_adbPath.isEmpty() || !fileInfo.isFile()) {
|
||||
s_adbPath = Config::getInstance().getAdbPath();
|
||||
}
|
||||
fileInfo = s_adbPath;
|
||||
if (s_adbPath.isEmpty() || !fileInfo.isFile()) {
|
||||
s_adbPath = QCoreApplication::applicationDirPath() + "/adb";
|
||||
}
|
||||
// qInfo("adb path: %s", QDir(s_adbPath).absolutePath().toUtf8().data());
|
||||
}
|
||||
return s_adbPath;
|
||||
}
|
||||
|
||||
void AdbProcess::initSignals()
|
||||
{
|
||||
connect(this, static_cast<void (QProcess::*)(int, QProcess::ExitStatus)>(&QProcess::finished), this,
|
||||
[this](int exitCode, QProcess::ExitStatus exitStatus) {
|
||||
if (NormalExit == exitStatus && 0 == exitCode) {
|
||||
Q_EMIT adbProcessResult(AER_SUCCESS_EXEC);
|
||||
} else {
|
||||
//手机端此时弹出调试认证,要允许调试
|
||||
Q_EMIT adbProcessResult(AER_ERROR_EXEC);
|
||||
}
|
||||
qInfo() << "adb return " << exitCode << "exit status " << exitStatus;
|
||||
});
|
||||
|
||||
connect(this, &QProcess::errorOccurred, this, [this](QProcess::ProcessError error) {
|
||||
if (QProcess::FailedToStart == error) {
|
||||
Q_EMIT adbProcessResult(AER_ERROR_MISSING_BINARY);
|
||||
} else {
|
||||
Q_EMIT adbProcessResult(AER_ERROR_START);
|
||||
QString err = QString("qprocess start error:%1 %2").arg(program()).arg(arguments().join(" "));
|
||||
qCritical() << err.toStdString().c_str();
|
||||
}
|
||||
});
|
||||
|
||||
connect(this, &QProcess::readyReadStandardError, this, [this]() {
|
||||
QString tmp = QString::fromUtf8(readAllStandardError()).trimmed();
|
||||
m_errorOutput += tmp;
|
||||
qWarning() << QString("adb error:%1").arg(tmp).toStdString().data();
|
||||
});
|
||||
|
||||
connect(this, &QProcess::readyReadStandardOutput, this, [this]() {
|
||||
QString tmp = QString::fromUtf8(readAllStandardOutput()).trimmed();
|
||||
m_standardOutput += tmp;
|
||||
qInfo() << QString("adb out:%1").arg(tmp).toStdString().data();
|
||||
});
|
||||
|
||||
connect(this, &QProcess::started, this, [this]() {
|
||||
Q_EMIT adbProcessResult(AER_SUCCESS_START);
|
||||
});
|
||||
}
|
||||
|
||||
void AdbProcess::execute(const QString &serial, const QStringList &args)
|
||||
{
|
||||
m_standardOutput = "";
|
||||
m_errorOutput = "";
|
||||
QStringList adbArgs;
|
||||
if (!serial.isEmpty()) {
|
||||
adbArgs << "-s" << serial;
|
||||
}
|
||||
adbArgs << args;
|
||||
qInfo() << "adb" << adbArgs.join(" ");
|
||||
start(getAdbPath(), adbArgs);
|
||||
}
|
||||
|
||||
bool AdbProcess::isRuning()
|
||||
{
|
||||
if (QProcess::NotRunning == state()) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
void AdbProcess::setShowTouchesEnabled(const QString &serial, bool enabled)
|
||||
{
|
||||
QStringList adbArgs;
|
||||
adbArgs << "shell"
|
||||
<< "settings"
|
||||
<< "put"
|
||||
<< "system"
|
||||
<< "show_touches";
|
||||
adbArgs << (enabled ? "1" : "0");
|
||||
execute(serial, adbArgs);
|
||||
}
|
||||
|
||||
QStringList AdbProcess::getDevicesSerialFromStdOut()
|
||||
{
|
||||
// get devices serial by adb devices
|
||||
QStringList serials;
|
||||
QStringList devicesInfoList = m_standardOutput.split(QRegExp("\r\n|\n"), QString::SkipEmptyParts);
|
||||
for (QString deviceInfo : devicesInfoList) {
|
||||
QStringList deviceInfos = deviceInfo.split(QRegExp("\t"), QString::SkipEmptyParts);
|
||||
if (2 == deviceInfos.count() && 0 == deviceInfos[1].compare("device")) {
|
||||
serials << deviceInfos[0];
|
||||
}
|
||||
}
|
||||
return serials;
|
||||
}
|
||||
|
||||
QString AdbProcess::getStdOut()
|
||||
{
|
||||
return m_standardOutput;
|
||||
}
|
||||
|
||||
QString AdbProcess::getErrorOut()
|
||||
{
|
||||
return m_errorOutput;
|
||||
}
|
||||
|
||||
void AdbProcess::forward(const QString &serial, quint16 localPort, const QString &deviceSocketName)
|
||||
{
|
||||
QStringList adbArgs;
|
||||
adbArgs << "forward";
|
||||
adbArgs << QString("tcp:%1").arg(localPort);
|
||||
adbArgs << QString("localabstract:%1").arg(deviceSocketName);
|
||||
execute(serial, adbArgs);
|
||||
}
|
||||
|
||||
void AdbProcess::portForward(const QString &serial, quint16 localPort, quint16 phonePort)
|
||||
{
|
||||
QStringList adbArgs;
|
||||
adbArgs << "forward";
|
||||
adbArgs << QString("tcp:%1").arg(localPort);
|
||||
adbArgs << QString("tcp:%1").arg(phonePort);
|
||||
execute(serial, adbArgs);
|
||||
}
|
||||
|
||||
void AdbProcess::forwardRemove(const QString &serial, quint16 localPort)
|
||||
{
|
||||
QStringList adbArgs;
|
||||
adbArgs << "forward";
|
||||
adbArgs << "--remove";
|
||||
adbArgs << QString("tcp:%1").arg(localPort);
|
||||
execute(serial, adbArgs);
|
||||
}
|
||||
|
||||
void AdbProcess::reverse(const QString &serial, const QString &deviceSocketName, quint16 localPort)
|
||||
{
|
||||
QStringList adbArgs;
|
||||
adbArgs << "reverse";
|
||||
adbArgs << QString("localabstract:%1").arg(deviceSocketName);
|
||||
adbArgs << QString("tcp:%1").arg(localPort);
|
||||
execute(serial, adbArgs);
|
||||
}
|
||||
|
||||
void AdbProcess::reverseRemove(const QString &serial, const QString &deviceSocketName)
|
||||
{
|
||||
QStringList adbArgs;
|
||||
adbArgs << "reverse";
|
||||
adbArgs << "--remove";
|
||||
adbArgs << QString("localabstract:%1").arg(deviceSocketName);
|
||||
execute(serial, adbArgs);
|
||||
}
|
||||
|
||||
void AdbProcess::push(const QString &serial, const QString &local, const QString &remote)
|
||||
{
|
||||
QStringList adbArgs;
|
||||
adbArgs << "push";
|
||||
adbArgs << local;
|
||||
adbArgs << remote;
|
||||
execute(serial, adbArgs);
|
||||
}
|
||||
|
||||
void AdbProcess::pull(const QString &serial, const QString &local, const QString &remote)
|
||||
{
|
||||
QStringList adbArgs;
|
||||
adbArgs << "pull";
|
||||
adbArgs << local;
|
||||
adbArgs << remote;
|
||||
execute(serial, adbArgs);
|
||||
}
|
||||
|
||||
void AdbProcess::install(const QString &serial, const QString &local)
|
||||
{
|
||||
QStringList adbArgs;
|
||||
adbArgs << "install";
|
||||
adbArgs << "-r";
|
||||
adbArgs << local;
|
||||
execute(serial, adbArgs);
|
||||
}
|
||||
|
||||
void AdbProcess::removePath(const QString &serial, const QString &path)
|
||||
{
|
||||
QStringList adbArgs;
|
||||
adbArgs << "shell";
|
||||
adbArgs << "rm";
|
||||
adbArgs << path;
|
||||
execute(serial, adbArgs);
|
||||
}
|
||||
|
||||
void AdbProcess::startAdbTcpip(QString serials)
|
||||
{
|
||||
// adb tcpip 5555
|
||||
QStringList adbArgs;
|
||||
adbArgs << "tcpip";
|
||||
adbArgs << "5555";
|
||||
execute(serials, adbArgs);
|
||||
}
|
||||
|
||||
void AdbProcess::connectAdbd(const QString &addr)
|
||||
{
|
||||
QStringList adbArgs;
|
||||
adbArgs << "connect";
|
||||
adbArgs << addr;
|
||||
execute("", adbArgs);
|
||||
}
|
||||
|
||||
void AdbProcess::disconnectAdbd(const QString &addr)
|
||||
{
|
||||
QStringList adbArgs;
|
||||
adbArgs << "disconnect";
|
||||
adbArgs << addr;
|
||||
execute("", adbArgs);
|
||||
}
|
|
@ -0,0 +1,74 @@
|
|||
#ifndef ADBPROCESS_H
|
||||
#define ADBPROCESS_H
|
||||
|
||||
#include <QProcess>
|
||||
|
||||
class AdbProcess : public QProcess
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
enum ADB_EXEC_RESULT {
|
||||
AER_SUCCESS_START, // 启动成功
|
||||
AER_ERROR_START, // 启动失败
|
||||
AER_SUCCESS_EXEC, // 执行成功
|
||||
AER_ERROR_EXEC, // 执行失败
|
||||
AER_ERROR_MISSING_BINARY, // 找不到文件
|
||||
};
|
||||
|
||||
explicit AdbProcess(QObject *parent = nullptr);
|
||||
|
||||
virtual ~AdbProcess();
|
||||
|
||||
void execute(const QString &serial, const QStringList &args);
|
||||
|
||||
void forward(const QString &serial, quint16 localPort, const QString &deviceSocketName);
|
||||
|
||||
void portForward(const QString &serial, quint16 localPort, quint16 phonePort);
|
||||
|
||||
void forwardRemove(const QString &serial, quint16 localPort);
|
||||
|
||||
void reverse(const QString &serial, const QString &deviceSocketName, quint16 localPort);
|
||||
|
||||
void reverseRemove(const QString &serial, const QString &deviceSocketName);
|
||||
|
||||
void push(const QString &serial, const QString &local, const QString &remote);
|
||||
|
||||
void pull(const QString &serial, const QString &local, const QString &remote);
|
||||
|
||||
void install(const QString &serial, const QString &local);
|
||||
|
||||
void removePath(const QString &serial, const QString &path);
|
||||
|
||||
void startAdbTcpip(QString serials);
|
||||
|
||||
void connectAdbd(const QString &addr);
|
||||
|
||||
void disconnectAdbd(const QString &addr);
|
||||
|
||||
bool isRuning();
|
||||
|
||||
void setShowTouchesEnabled(const QString &serial, bool enabled);
|
||||
|
||||
QStringList getDevicesSerialFromStdOut();
|
||||
|
||||
QString getStdOut();
|
||||
|
||||
QString getErrorOut();
|
||||
|
||||
static const QString &getAdbPath();
|
||||
|
||||
Q_SIGNALS:
|
||||
|
||||
void adbProcessResult(ADB_EXEC_RESULT processResult);
|
||||
|
||||
private:
|
||||
void initSignals();
|
||||
|
||||
private:
|
||||
QString m_standardOutput = "";
|
||||
QString m_errorOutput = "";
|
||||
static QString s_adbPath;
|
||||
};
|
||||
|
||||
#endif // ADBPROCESS_H
|
|
@ -0,0 +1,29 @@
|
|||
QT += core dbus x11extras KWindowSystem
|
||||
|
||||
LIBS += -lqrencode
|
||||
LIBS += -lX11
|
||||
|
||||
CONFIG += c++11
|
||||
|
||||
include(adb/adb.pri)
|
||||
include(uibase/uibase.pri)
|
||||
|
||||
HEADERS += $$PWD/fileinfo.h \
|
||||
$$PWD/fileinfolist.h \
|
||||
$$PWD/generatetools.h \
|
||||
$$PWD/util.h \
|
||||
$$PWD/highlight-effect.h \
|
||||
$$PWD/serverstatus.h \
|
||||
$$PWD/config.h
|
||||
|
||||
SOURCES += $$PWD/fileinfo.cpp \
|
||||
$$PWD/fileinfolist.cpp \
|
||||
$$PWD/generatetools.cpp \
|
||||
$$PWD/util.cpp \
|
||||
$$PWD/serverstatus.cpp \
|
||||
$$PWD/config.cpp
|
||||
|
||||
|
||||
INCLUDEPATH += \
|
||||
$$PWD/adb \
|
||||
$$PWD/uibase
|
|
@ -0,0 +1,282 @@
|
|||
#include <QCoreApplication>
|
||||
#include <QFileInfo>
|
||||
#include <QSettings>
|
||||
#include <QDebug>
|
||||
#include <QStandardPaths>
|
||||
#include <QDir>
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#define GROUP_COMMON "common"
|
||||
|
||||
// config
|
||||
#define COMMON_TITLE_KEY "WindowTitle"
|
||||
#define COMMON_TITLE_DEF QCoreApplication::applicationName()
|
||||
|
||||
#define COMMON_PUSHFILE_KEY "PushFilePath"
|
||||
#define COMMON_PUSHFILE_DEF "/sdcard/"
|
||||
|
||||
#define COMMON_SERVER_VERSION_KEY "ServerVersion"
|
||||
#define COMMON_SERVER_VERSION_DEF "1.21"
|
||||
|
||||
#define COMMON_SERVER_PATH_KEY "ServerPath"
|
||||
#define COMMON_SERVER_PATH_DEF "/data/local/tmp/scrcpy-server.jar"
|
||||
|
||||
#define COMMON_MAX_FPS_KEY "MaxFps"
|
||||
#define COMMON_MAX_FPS_DEF 60
|
||||
|
||||
#define COMMON_DESKTOP_OPENGL_KEY "UseDesktopOpenGL"
|
||||
#define COMMON_DESKTOP_OPENGL_DEF -1
|
||||
|
||||
#define COMMON_RENDER_EXPIRED_FRAMES_KEY "RenderExpiredFrames"
|
||||
#define COMMON_RENDER_EXPIRED_FRAMES_DEF 0
|
||||
|
||||
#define COMMON_ADB_PATH_KEY "AdbPath"
|
||||
#define COMMON_ADB_PATH_DEF ""
|
||||
|
||||
#define COMMON_LOG_LEVEL_KEY "LogLevel"
|
||||
#define COMMON_LOG_LEVEL_DEF "info"
|
||||
|
||||
#define COMMON_CODEC_OPTIONS_KEY "CodecOptions"
|
||||
#define COMMON_CODEC_OPTIONS_DEF ""
|
||||
|
||||
#define COMMON_CODEC_NAME_KEY "CodecName"
|
||||
#define COMMON_CODEC_NAME_DEF ""
|
||||
|
||||
#define COMMON_USERNAME_KEY "UserName"
|
||||
#define COMMON_USERNAME_DEF "admin"
|
||||
|
||||
#define COMMON_PASSWORD_KEY "Password"
|
||||
#define COMMON_PASSWORD_DEF "admin"
|
||||
|
||||
#define DEFAULT_SCROLL_KEY "Distance"
|
||||
#define DEFAULT_SCROLL_DEF 40
|
||||
|
||||
// device config
|
||||
#define SERIAL_WINDOW_RECT_KEY_X "WindowRectX"
|
||||
#define SERIAL_WINDOW_RECT_KEY_Y "WindowRectY"
|
||||
#define SERIAL_WINDOW_RECT_KEY_W "WindowRectW"
|
||||
#define SERIAL_WINDOW_RECT_KEY_H "WindowRectH"
|
||||
#define SERIAL_WINDOW_RECT_KEY_DEF -1
|
||||
|
||||
QString Config::s_configPath = "";
|
||||
|
||||
Config::Config(QObject *parent) : QObject(parent)
|
||||
{
|
||||
|
||||
|
||||
const QString &configPath = QStandardPaths::writableLocation(QStandardPaths::HomeLocation) + "/.config";
|
||||
if (!QDir(configPath).exists("kylin-mobile-assistant")) {
|
||||
QDir(configPath).mkdir("kylin-mobile-assistant");
|
||||
}
|
||||
QString setName = QDir::homePath() + "/.config/kylin-mobile-assistant/phoneServerConfig.ini";
|
||||
m_settings = new QSettings(setName, QSettings::IniFormat);
|
||||
m_settings->setIniCodec("UTF-8");
|
||||
|
||||
QString userDataName = QDir::homePath() + "/.config/kylin-mobile-assistant/phoneDeviceConfig.ini";
|
||||
m_userData = new QSettings(userDataName, QSettings::IniFormat);
|
||||
m_userData->setIniCodec("UTF-8");
|
||||
|
||||
QString scrollSetName = QDir::homePath() + "/.config/kylin-mobile-assistant/scrollConfig.ini";
|
||||
m_scrollSet = new QSettings(scrollSetName, QSettings::IniFormat);
|
||||
m_scrollSet->setIniCodec("UTF-8");
|
||||
|
||||
m_password = new QSettings(getenv("HOME") + QString("/.mobilecache/setting.ini"), QSettings::IniFormat);
|
||||
m_password->setIniCodec("UTF-8");
|
||||
|
||||
}
|
||||
|
||||
Config &Config::getInstance()
|
||||
{
|
||||
static Config config;
|
||||
return config;
|
||||
}
|
||||
|
||||
const QString &Config::getConfigPath()
|
||||
{
|
||||
if (s_configPath.isEmpty()) {
|
||||
s_configPath = QString::fromLocal8Bit(qgetenv("CONFIG_PATH"));
|
||||
QFileInfo fileInfo(s_configPath);
|
||||
if (s_configPath.isEmpty() || !fileInfo.isDir()) {
|
||||
// default application dir
|
||||
s_configPath = "config";
|
||||
}
|
||||
}
|
||||
return s_configPath;
|
||||
}
|
||||
|
||||
void Config::setRect(const QString &serial, const QRect &rc)
|
||||
{
|
||||
m_userData->beginGroup(serial);
|
||||
m_userData->setValue(SERIAL_WINDOW_RECT_KEY_X, rc.left());
|
||||
m_userData->setValue(SERIAL_WINDOW_RECT_KEY_Y, rc.top());
|
||||
m_userData->setValue(SERIAL_WINDOW_RECT_KEY_W, rc.width());
|
||||
m_userData->setValue(SERIAL_WINDOW_RECT_KEY_H, rc.height());
|
||||
m_userData->endGroup();
|
||||
m_userData->sync();
|
||||
}
|
||||
|
||||
QRect Config::getRect(const QString &serial)
|
||||
{
|
||||
QRect rc;
|
||||
m_userData->beginGroup(serial);
|
||||
rc.setX(m_userData->value(SERIAL_WINDOW_RECT_KEY_X, SERIAL_WINDOW_RECT_KEY_DEF).toInt());
|
||||
rc.setY(m_userData->value(SERIAL_WINDOW_RECT_KEY_Y, SERIAL_WINDOW_RECT_KEY_DEF).toInt());
|
||||
rc.setWidth(m_userData->value(SERIAL_WINDOW_RECT_KEY_W, SERIAL_WINDOW_RECT_KEY_DEF).toInt());
|
||||
rc.setHeight(m_userData->value(SERIAL_WINDOW_RECT_KEY_H, SERIAL_WINDOW_RECT_KEY_DEF).toInt());
|
||||
m_userData->endGroup();
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
||||
QString Config::getServerVersion()
|
||||
{
|
||||
QString server;
|
||||
m_settings->beginGroup(GROUP_COMMON);
|
||||
server = m_settings->value(COMMON_SERVER_VERSION_KEY, COMMON_SERVER_VERSION_DEF).toString();
|
||||
m_settings->endGroup();
|
||||
return server;
|
||||
}
|
||||
|
||||
int Config::getMaxFps()
|
||||
{
|
||||
int fps = 60;
|
||||
m_settings->beginGroup(GROUP_COMMON);
|
||||
fps = m_settings->value(COMMON_MAX_FPS_KEY, COMMON_MAX_FPS_DEF).toInt();
|
||||
m_settings->endGroup();
|
||||
return fps;
|
||||
}
|
||||
|
||||
int Config::getDesktopOpenGL()
|
||||
{
|
||||
int opengl = 0;
|
||||
m_settings->beginGroup(GROUP_COMMON);
|
||||
opengl = m_settings->value(COMMON_DESKTOP_OPENGL_KEY, COMMON_DESKTOP_OPENGL_DEF).toInt();
|
||||
m_settings->endGroup();
|
||||
return opengl;
|
||||
}
|
||||
|
||||
int Config::getRenderExpiredFrames()
|
||||
{
|
||||
int renderExpiredFrames = 1;
|
||||
m_settings->beginGroup(GROUP_COMMON);
|
||||
renderExpiredFrames = m_settings->value(COMMON_RENDER_EXPIRED_FRAMES_KEY, COMMON_RENDER_EXPIRED_FRAMES_DEF).toInt();
|
||||
m_settings->endGroup();
|
||||
return renderExpiredFrames;
|
||||
}
|
||||
|
||||
QString Config::getPushFilePath()
|
||||
{
|
||||
QString pushFile;
|
||||
m_settings->beginGroup(GROUP_COMMON);
|
||||
pushFile = m_settings->value(COMMON_PUSHFILE_KEY, COMMON_PUSHFILE_DEF).toString();
|
||||
m_settings->endGroup();
|
||||
return pushFile;
|
||||
}
|
||||
|
||||
QString Config::getServerPath()
|
||||
{
|
||||
QString serverPath;
|
||||
m_settings->beginGroup(GROUP_COMMON);
|
||||
serverPath = m_settings->value(COMMON_SERVER_PATH_KEY, COMMON_SERVER_PATH_DEF).toString();
|
||||
m_settings->endGroup();
|
||||
return serverPath;
|
||||
}
|
||||
|
||||
QString Config::getAdbPath()
|
||||
{
|
||||
QString adbPath;
|
||||
m_settings->beginGroup(GROUP_COMMON);
|
||||
adbPath = m_settings->value(COMMON_ADB_PATH_KEY, COMMON_ADB_PATH_DEF).toString();
|
||||
m_settings->endGroup();
|
||||
return adbPath;
|
||||
}
|
||||
|
||||
QString Config::getLogLevel()
|
||||
{
|
||||
QString logLevel;
|
||||
m_settings->beginGroup(GROUP_COMMON);
|
||||
logLevel = m_settings->value(COMMON_LOG_LEVEL_KEY, COMMON_LOG_LEVEL_DEF).toString();
|
||||
m_settings->endGroup();
|
||||
return logLevel;
|
||||
}
|
||||
|
||||
QString Config::getCodecOptions()
|
||||
{
|
||||
QString codecOptions;
|
||||
m_settings->beginGroup(GROUP_COMMON);
|
||||
codecOptions = m_settings->value(COMMON_CODEC_OPTIONS_KEY, COMMON_CODEC_OPTIONS_DEF).toString();
|
||||
m_settings->endGroup();
|
||||
return codecOptions;
|
||||
}
|
||||
|
||||
QString Config::getCodecName()
|
||||
{
|
||||
QString codecName;
|
||||
m_settings->beginGroup(GROUP_COMMON);
|
||||
codecName = m_settings->value(COMMON_CODEC_NAME_KEY, COMMON_CODEC_NAME_DEF).toString();
|
||||
m_settings->endGroup();
|
||||
return codecName;
|
||||
}
|
||||
|
||||
QStringList Config::getConnectedGroups()
|
||||
{
|
||||
return m_userData->childGroups();
|
||||
}
|
||||
|
||||
void Config::deleteGroup(const QString &serial)
|
||||
{
|
||||
m_userData->remove(serial);
|
||||
}
|
||||
|
||||
QString Config::getTitle()
|
||||
{
|
||||
QString title;
|
||||
m_settings->beginGroup(GROUP_COMMON);
|
||||
title = m_settings->value(COMMON_TITLE_KEY, COMMON_TITLE_DEF).toString();
|
||||
m_settings->endGroup();
|
||||
return title;
|
||||
}
|
||||
|
||||
QString Config::getUserName()
|
||||
{
|
||||
QString userName;
|
||||
userName = m_password->value(COMMON_USERNAME_KEY, COMMON_USERNAME_DEF).toString();
|
||||
return userName;
|
||||
}
|
||||
|
||||
QString Config::getPassWord()
|
||||
{
|
||||
QString password;
|
||||
password = m_password->value(COMMON_PASSWORD_KEY, COMMON_PASSWORD_DEF).toString();
|
||||
return password;
|
||||
}
|
||||
|
||||
void Config::setUserName(const QString &username)
|
||||
{
|
||||
m_password->setValue(COMMON_USERNAME_KEY, username);
|
||||
m_password->sync();
|
||||
}
|
||||
|
||||
void Config::setPassword(const QString &password)
|
||||
{
|
||||
m_password->setValue(COMMON_PASSWORD_KEY, password);
|
||||
m_password->sync();
|
||||
}
|
||||
|
||||
int Config::loadDistance()
|
||||
{
|
||||
m_scrollSet->beginGroup(DEFAULT_SCROLL_KEY);
|
||||
int distance = m_scrollSet->value(DEFAULT_SCROLL_KEY, DEFAULT_SCROLL_DEF).toInt();
|
||||
m_scrollSet->endGroup();
|
||||
return distance;
|
||||
}
|
||||
|
||||
void Config::updateDistance(const int distance)
|
||||
{
|
||||
m_scrollSet->beginGroup(DEFAULT_SCROLL_KEY);
|
||||
m_scrollSet->setValue(DEFAULT_SCROLL_KEY, distance);
|
||||
m_scrollSet->endGroup();
|
||||
m_scrollSet->sync();
|
||||
|
||||
}
|
|
@ -0,0 +1,50 @@
|
|||
#ifndef CONFIG_H
|
||||
#define CONFIG_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QPointer>
|
||||
#include <QRect>
|
||||
|
||||
class QSettings;
|
||||
|
||||
class Config : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
static Config &getInstance();
|
||||
// config
|
||||
QString getTitle();
|
||||
QString getServerVersion();
|
||||
int getMaxFps();
|
||||
int getDesktopOpenGL();
|
||||
int getRenderExpiredFrames();
|
||||
QString getPushFilePath();
|
||||
QString getServerPath();
|
||||
QString getAdbPath();
|
||||
QString getLogLevel();
|
||||
QString getCodecOptions();
|
||||
QString getCodecName();
|
||||
QString getUserName();
|
||||
QString getPassWord();
|
||||
void setUserName(const QString &userName);
|
||||
void setPassword(const QString &password);
|
||||
QStringList getConnectedGroups();
|
||||
void setRect(const QString &serial, const QRect &rc);
|
||||
QRect getRect(const QString &serial);
|
||||
void deleteGroup(const QString &serial);
|
||||
int loadDistance();
|
||||
void updateDistance(const int distance);
|
||||
|
||||
private:
|
||||
explicit Config(QObject *parent = nullptr);
|
||||
const QString &getConfigPath();
|
||||
|
||||
private:
|
||||
static QString s_configPath;
|
||||
QPointer<QSettings> m_settings; // 模板类 , 释放引用对象后自动置null
|
||||
QPointer<QSettings> m_userData;
|
||||
QPointer<QSettings> m_password;
|
||||
QPointer<QSettings> m_scrollSet;
|
||||
};
|
||||
|
||||
#endif // CONFIG_H
|
|
@ -0,0 +1,445 @@
|
|||
#include "fileinfo.h"
|
||||
|
||||
#include <QMimeDatabase>
|
||||
#include <QMap>
|
||||
#include <QDebug>
|
||||
|
||||
QMap<QString, QString> FileInfo::mimeMapTable = FileInfo::initMimeMap();
|
||||
QMap<QString, QString> FileInfo::iconNameMapTable = FileInfo::initIconNameMap();
|
||||
QMap<QString, QString> FileInfo::initMimeMap()
|
||||
{
|
||||
QMap<QString, QString> map;
|
||||
// for supported image types
|
||||
map.insert("bmp", "image/x-ms-bmp");
|
||||
map.insert("gif", "image/gif");
|
||||
map.insert("jpg", "image/jpeg");
|
||||
map.insert("jpeg", "image/jpeg");
|
||||
map.insert("png", "image/png");
|
||||
map.insert("pbm", "image/pbm");
|
||||
map.insert("pgm", "image/pgm");
|
||||
map.insert("ppm", "image/ppm");
|
||||
map.insert("xbm", "image/xbm");
|
||||
map.insert("xpm", "image/xpm");
|
||||
map.insert("svg", "image/svg");
|
||||
map.insert("dds", "image/dds");
|
||||
map.insert("icns", "image/icns");
|
||||
map.insert("jp2", "image/jp2");
|
||||
map.insert("mng", "image/mng");
|
||||
map.insert("tga", "image/tga");
|
||||
map.insert("tiff", "image/tiff");
|
||||
map.insert("tif", "image/tif");
|
||||
map.insert("wbmp", "image/wbmp");
|
||||
map.insert("webp", "image/webp");
|
||||
// for supported video types
|
||||
map.insert("avi", "video/x-msvideo");
|
||||
map.insert("vfw", "video/vfw");
|
||||
map.insert("divx", "video/divx");
|
||||
map.insert("mpg", "video/mpg");
|
||||
map.insert("mpe", "video/mpeg");
|
||||
map.insert("mpeg", "video/mpeg");
|
||||
map.insert("mpg", "video/mpeg");
|
||||
map.insert("mpg4", "video/mp4");
|
||||
map.insert("m1v", "video/m1v");
|
||||
map.insert("m2v", "video/m2v");
|
||||
map.insert("mpv", "video/mpv");
|
||||
map.insert("dv", "video/dv");
|
||||
map.insert("3gp", "video/3gpp");
|
||||
map.insert("3g2", "video/3gpp2");
|
||||
map.insert("mov", "video/quicktime");
|
||||
map.insert("mp4", "video/mp4");
|
||||
map.insert("m4v", "video/x-m4v");
|
||||
map.insert("dat", "video/dat");
|
||||
map.insert("vcd", "video/vcd");
|
||||
map.insert("ogm", "video/ogm");
|
||||
map.insert("ogv", "video/ogv");
|
||||
map.insert("ogx", "video/ogx");
|
||||
map.insert("asf", "video/x-ms-asf");
|
||||
map.insert("wmv", "video/x-ms-wmv");
|
||||
map.insert("iso", "video/iso");
|
||||
map.insert("vob", "video/vob");
|
||||
map.insert("mkv", "video/mkv");
|
||||
map.insert("nsv", "video/nsv");
|
||||
map.insert("ram", "video/ram");
|
||||
map.insert("flv", "video/flv");
|
||||
map.insert("rm", "video/rm");
|
||||
map.insert("swf", "video/swf");
|
||||
map.insert("ts", "video/ts");
|
||||
map.insert("rmvb", "video/rmvb");
|
||||
map.insert("dvr-ms", "video/dvr-ms");
|
||||
map.insert("m2t", "video/m2t");
|
||||
map.insert("m2ts", "video/m2ts");
|
||||
map.insert("mts", "video/mts");
|
||||
map.insert("rec", "video/rec");
|
||||
map.insert("wtv", "video/wtv");
|
||||
map.insert("f4v", "video/f4v");
|
||||
map.insert("hdmov", "video/hdmov");
|
||||
map.insert("webm", "video/webm");
|
||||
map.insert("vp8", "video/vp8");
|
||||
map.insert("bik", "video/bik");
|
||||
map.insert("smk", "video/smk");
|
||||
map.insert("wtv", "video/wtv");
|
||||
map.insert("part", "video/part");
|
||||
map.insert("m4u", "video/vnd.mpegurl");
|
||||
// for supported audio types
|
||||
map.insert("mp2", "audio/x-mpeg");
|
||||
map.insert("mp3", "audio/x-mpeg");
|
||||
map.insert("ogg", "audio/ogg");
|
||||
map.insert("oga", "audio/oga");
|
||||
map.insert("wav", "audio/x-wav");
|
||||
map.insert("wma", "audio/x-ms-wma");
|
||||
map.insert("aac", "audio/aac");
|
||||
map.insert("ac3", "audio/ac3");
|
||||
map.insert("dts", "audio/dts");
|
||||
map.insert("ra", "audio/ra");
|
||||
map.insert("ape", "audio/ape");
|
||||
map.insert("flac", "audio/flac");
|
||||
map.insert("thd", "audio/thd");
|
||||
map.insert("mka", "audio/mka");
|
||||
map.insert("m4a", "audio/mp4a-latm");
|
||||
map.insert("opus", "audio/opus");
|
||||
map.insert("m3u", "audio/x-mpegurl");
|
||||
map.insert("m4b", "audio/mp4a-latm");
|
||||
map.insert("m4p", "audio/mp4a-latm");
|
||||
map.insert("mpga", "audio/mpeg");
|
||||
map.insert("aif", "audio/x-aiff");
|
||||
// for supported document types
|
||||
map.insert("txt", "text/plain");
|
||||
map.insert("rar", "application/vnd.rar");
|
||||
map.insert("java", "text/x-java");
|
||||
map.insert("apk", "application/vnd.android.package-archive");
|
||||
map.insert("zip", "application/zip");
|
||||
map.insert("udeb", "application/vnd.debian.binary-package");
|
||||
map.insert("dot", "application/msword-template");
|
||||
map.insert("pot", "text/x-gettext-translation-template");
|
||||
map.insert("docx", "application/vnd.openxmlformats-officedocument.wordprocessingml.document");
|
||||
map.insert("doc", "application/msword");
|
||||
map.insert("xls", "application/vnd.ms-excel");
|
||||
map.insert("xlsx", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
|
||||
map.insert("pps", "application/vnd.ms-powerpoint");
|
||||
map.insert("ppt", "application/vnd.ms-powerpoint");
|
||||
map.insert("pptx", "application/vnd.openxmlformats-officedocument.presentationml.presentation");
|
||||
map.insert("wps", "application/vnd.ms-works");
|
||||
map.insert("bin", "application/octet-stream");
|
||||
map.insert("c", "text/plain");
|
||||
map.insert("class", "application/octet-stream");
|
||||
map.insert("conf", "text/plain");
|
||||
map.insert("cpp", "text/plain");
|
||||
map.insert("c", "text/plain");
|
||||
map.insert("h", "text/plain");
|
||||
map.insert("htm", "text/html");
|
||||
map.insert("html", "ttext/html");
|
||||
map.insert("jar", "application/java-archive");
|
||||
map.insert("java", "text/plain");
|
||||
map.insert("js", "application/x-javascript");
|
||||
map.insert("exe", "application/octet-stream");
|
||||
map.insert("gtar", "application/x-gtar");
|
||||
map.insert("gz", "application/x-gzip");
|
||||
map.insert("log", "text/plain");
|
||||
map.insert("mpc", "application/vnd.mpohun.certificate");
|
||||
map.insert("msg", "application/vnd.ms-outlook");
|
||||
map.insert("prop", "text/plain");
|
||||
map.insert("rc", "text/plain");
|
||||
map.insert("rtf", "application/rtf");
|
||||
map.insert("sh", "text/plain");
|
||||
map.insert("tar", "application/x-tar");
|
||||
map.insert("tgz", "application/x-compressed");
|
||||
map.insert("rc", "text/plain");
|
||||
map.insert("xml", "text/xml"); // text/plain
|
||||
map.insert("z", "application/x-compress");
|
||||
map.insert("zip", "application/x-zip-compressed");
|
||||
map.insert("pdf", "application/pdf");
|
||||
return map;
|
||||
}
|
||||
|
||||
QMap<QString, QString> FileInfo::initIconNameMap()
|
||||
{
|
||||
QMap<QString, QString> map;
|
||||
// for supported image icon
|
||||
map.insert("image", "image-x-generic");
|
||||
// for supported video icon
|
||||
map.insert("video", "video-x-generic");
|
||||
// for supported audio icon
|
||||
map.insert("audio/x-mpeg", "audio-x-generic");
|
||||
// for supported document types
|
||||
map.insert("text", "text");
|
||||
map.insert("application/vnd.rar", "rar");
|
||||
map.insert("application/vnd.android.package-archive", "application-apk");
|
||||
map.insert("application/zip", "zip");
|
||||
map.insert("application/vnd.debian.binary-package", "application-vnd.debian.binary-package");
|
||||
map.insert("application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
||||
"application-vnd.openxmlformats-officedocument.wordprocessingml.document");
|
||||
map.insert("application/msword", "application-msword");
|
||||
map.insert("application/vnd.ms-excel", "application-vnd.ms-excel");
|
||||
map.insert("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
||||
"application-vnd.openxmlformats-officedocument.spreadsheetml.sheet");
|
||||
map.insert("application/vnd.ms-powerpoint", "application-vnd.ms-powerpoint");
|
||||
map.insert("application/vnd.openxmlformats-officedocument.presentationml.presentation",
|
||||
"application-vnd.openxmlformats-officedocument.presentationml.presentation");
|
||||
map.insert("application/octet-stream", "application-octet-stream");
|
||||
map.insert("application/java-archive", "application-x-java-archive");
|
||||
map.insert("application/x-javascript", "application-x-javascript");
|
||||
map.insert("application/x-gzip", "application-gzip");
|
||||
map.insert("application/rtf", "application-rtf");
|
||||
map.insert("application/x-tar", "application-x-tar");
|
||||
map.insert("application/x-compressed", "application-x-compress");
|
||||
map.insert("application/x-compress", "application-x-compress");
|
||||
map.insert("application/x-zip-compressed", "application-x-compress");
|
||||
map.insert("application/pdf", "application-x-pdf");
|
||||
// inode/directory
|
||||
map.insert("inode/directory", "folder");
|
||||
return map;
|
||||
}
|
||||
|
||||
FileInfo::FileInfo()
|
||||
{
|
||||
m_id = 0;
|
||||
m_name = "";
|
||||
m_path = "";
|
||||
m_size = 0;
|
||||
m_type = 0;
|
||||
m_date = "";
|
||||
m_dateTime = "";
|
||||
m_thumbnailPath = "";
|
||||
m_contentType = "";
|
||||
}
|
||||
FileInfo::FileInfo(const FileInfo &fileInfo)
|
||||
{
|
||||
m_id = fileInfo.m_id;
|
||||
m_name = fileInfo.m_name;
|
||||
m_path = fileInfo.m_path;
|
||||
m_size = fileInfo.m_size;
|
||||
m_type = fileInfo.m_type;
|
||||
m_date = fileInfo.m_date;
|
||||
m_dateTime = fileInfo.m_dateTime;
|
||||
m_thumbnailPath = fileInfo.m_thumbnailPath;
|
||||
m_contentType = fileInfo.m_contentType;
|
||||
}
|
||||
|
||||
FileInfo &FileInfo::operator=(const FileInfo &fileInfo)
|
||||
{
|
||||
if (this == &fileInfo) {
|
||||
return *this;
|
||||
}
|
||||
|
||||
m_id = fileInfo.m_id;
|
||||
m_name = fileInfo.m_name;
|
||||
m_path = fileInfo.m_path;
|
||||
m_size = fileInfo.m_size;
|
||||
m_type = fileInfo.m_type;
|
||||
m_date = fileInfo.m_date;
|
||||
m_dateTime = fileInfo.m_dateTime;
|
||||
m_thumbnailPath = fileInfo.m_thumbnailPath;
|
||||
m_contentType = fileInfo.m_contentType;
|
||||
return *this;
|
||||
}
|
||||
|
||||
QDBusArgument &operator<<(QDBusArgument &argument, const FileInfo &fileInfo)
|
||||
{
|
||||
argument.beginStructure();
|
||||
argument << fileInfo.m_id;
|
||||
argument << fileInfo.m_name;
|
||||
argument << fileInfo.m_path;
|
||||
argument << fileInfo.m_size;
|
||||
argument << fileInfo.m_type;
|
||||
argument << fileInfo.m_date;
|
||||
argument << fileInfo.m_dateTime;
|
||||
argument << fileInfo.m_thumbnailPath;
|
||||
argument << fileInfo.m_contentType;
|
||||
argument.endStructure();
|
||||
return argument;
|
||||
}
|
||||
|
||||
const QDBusArgument &operator>>(const QDBusArgument &argument, FileInfo &fileInfo)
|
||||
{
|
||||
argument.beginStructure();
|
||||
argument >> fileInfo.m_id;
|
||||
argument >> fileInfo.m_name;
|
||||
argument >> fileInfo.m_path;
|
||||
argument >> fileInfo.m_size;
|
||||
argument >> fileInfo.m_type;
|
||||
argument >> fileInfo.m_date;
|
||||
argument >> fileInfo.m_dateTime;
|
||||
argument >> fileInfo.m_thumbnailPath;
|
||||
argument >> fileInfo.m_contentType;
|
||||
argument.endStructure();
|
||||
return argument;
|
||||
}
|
||||
|
||||
void FileInfo::registerMetaType()
|
||||
{
|
||||
qRegisterMetaType<FileInfo>("FileInfo");
|
||||
qDBusRegisterMetaType<FileInfo>();
|
||||
}
|
||||
|
||||
QString FileInfo::name() const
|
||||
{
|
||||
return m_name;
|
||||
}
|
||||
|
||||
void FileInfo::setName(const QString &name)
|
||||
{
|
||||
m_name = name;
|
||||
QString suffix = name.mid(name.lastIndexOf(".") + 1, name.size());
|
||||
m_contentType = FileInfo::contentType(suffix);
|
||||
}
|
||||
|
||||
qint64 FileInfo::size() const
|
||||
{
|
||||
return m_size;
|
||||
}
|
||||
|
||||
void FileInfo::setSize(const qint64 &size)
|
||||
{
|
||||
m_size = size;
|
||||
}
|
||||
|
||||
int FileInfo::type() const
|
||||
{
|
||||
return m_type;
|
||||
}
|
||||
|
||||
void FileInfo::setType(int type)
|
||||
{
|
||||
m_type = type;
|
||||
}
|
||||
|
||||
QString FileInfo::dateTime() const
|
||||
{
|
||||
return m_dateTime;
|
||||
}
|
||||
|
||||
void FileInfo::setDateTime(const QString &dateTime)
|
||||
{
|
||||
m_dateTime = dateTime;
|
||||
}
|
||||
|
||||
QString FileInfo::getThumbnailPath() const
|
||||
{
|
||||
return m_thumbnailPath;
|
||||
}
|
||||
|
||||
void FileInfo::setThumbnailPath(const QString &value)
|
||||
{
|
||||
m_thumbnailPath = value;
|
||||
}
|
||||
|
||||
int FileInfo::getId() const
|
||||
{
|
||||
return m_id;
|
||||
}
|
||||
|
||||
void FileInfo::setId(int value)
|
||||
{
|
||||
m_id = value;
|
||||
}
|
||||
|
||||
QString FileInfo::getPath() const
|
||||
{
|
||||
return m_path;
|
||||
}
|
||||
|
||||
void FileInfo::setPath(const QString &path)
|
||||
{
|
||||
m_path = path;
|
||||
}
|
||||
|
||||
QString FileInfo::getDate() const
|
||||
{
|
||||
return m_date;
|
||||
}
|
||||
|
||||
void FileInfo::setDate(const QString &date)
|
||||
{
|
||||
m_date = date;
|
||||
}
|
||||
QString FileInfo::getContentType() const
|
||||
{
|
||||
return m_contentType;
|
||||
}
|
||||
|
||||
FileInfo::FILE_TYPE FileInfo::judgmentType(QString fileName)
|
||||
{
|
||||
QMimeDatabase db;
|
||||
QMimeType mime = db.mimeTypeForFile(fileName);
|
||||
QString fileType = fileName.mid(fileName.lastIndexOf(".") + 1, fileName.size());
|
||||
if (mime.name().startsWith("text/")) {
|
||||
// 文本文件 text/plain, text/html, text/css, text/javascript
|
||||
return FILE_TYPE::TYPE_TXT;
|
||||
} else if (mime.name().startsWith("image/")) {
|
||||
// 图片 image/gif, image/png, image/jpeg, image/bmp, image/webp
|
||||
return FILE_TYPE::TYPE_IMAGE;
|
||||
} else if (mime.name().startsWith("audio/")) {
|
||||
// 音频 audio/wav, audio/mpeg, audio/midi, audio/webm, audio/ogg
|
||||
return FILE_TYPE::TYPE_AUDIO;
|
||||
} else if (mime.name().startsWith("video/")) {
|
||||
// 视频 video/mp4, video/x-flv, video/webm, video/ogg
|
||||
return FILE_TYPE::TYPE_VIDEO;
|
||||
} else if (fileType == "doc" || fileType == "docx") {
|
||||
// word doc docx
|
||||
return FILE_TYPE::TYPE_DOC;
|
||||
} else if (fileType == "pdf") {
|
||||
// pdf
|
||||
return FILE_TYPE::TYPE_PDF;
|
||||
} else if (fileType == "xlsx" || fileType == "xls") {
|
||||
// excel
|
||||
return FILE_TYPE::TYPE_EXCEL;
|
||||
} else if (fileType == "pptx") {
|
||||
// ppt
|
||||
return FILE_TYPE::TYPE_PPTX;
|
||||
} else if (fileType == "zip") {
|
||||
// zip
|
||||
return FILE_TYPE::TYPE_ZIP;
|
||||
} else if (fileType == "zip") {
|
||||
// zip
|
||||
return FILE_TYPE::TYPE_ZIP;
|
||||
} else {
|
||||
// 其他
|
||||
return FILE_TYPE::TYPE_OTHER;
|
||||
}
|
||||
}
|
||||
|
||||
void FileInfo::fileOpen(QString fileName)
|
||||
{
|
||||
qInfo() << "process open" << fileName;
|
||||
QString filePath = QByteArray::fromPercentEncoding(fileName.toUtf8());
|
||||
int fileType = judgmentType(fileName);
|
||||
QString command = "";
|
||||
if (fileType == FileInfo::FILE_TYPE::TYPE_IMAGE) {
|
||||
command = QString("kylin-photo-viewer");
|
||||
} else if (fileType == FileInfo::FILE_TYPE::TYPE_VIDEO) {
|
||||
command = QString("kylin-video");
|
||||
} else if (fileType == FileInfo::FILE_TYPE::TYPE_AUDIO) {
|
||||
command = QString("kylin-music");
|
||||
} else if (fileType == FileInfo::FILE_TYPE::TYPE_TXT) { //文档
|
||||
command = QString("pluma");
|
||||
} else if (fileType == FileInfo::FILE_TYPE::TYPE_DOC) { // word
|
||||
command = QString("wps");
|
||||
} else if (fileType == FileInfo::FILE_TYPE::TYPE_EXCEL) { // excel
|
||||
command = QString("et");
|
||||
} else if (fileType == FileInfo::FILE_TYPE::TYPE_PDF) { // pdf
|
||||
command = QString("wpspdf");
|
||||
} else if (fileType == FileInfo::FILE_TYPE::TYPE_PPTX) { // ppt
|
||||
command = QString("wpp");
|
||||
} else if (fileType == FileInfo::FILE_TYPE::TYPE_ZIP) { // zip
|
||||
command = QString("engrampa");
|
||||
} else if (fileType == FileInfo::FILE_TYPE::TYPE_OTHER) {
|
||||
command = QString("pluma");
|
||||
}
|
||||
QProcess::startDetached(command, QStringList() << filePath);
|
||||
}
|
||||
|
||||
QString FileInfo::contentType(QString flag)
|
||||
{
|
||||
if (!mimeMapTable.contains(flag)) {
|
||||
return QString(FILEINFO_CONTENT_TYPE_UNKNOWN);
|
||||
}
|
||||
return mimeMapTable.find(flag).value();
|
||||
}
|
||||
|
||||
QString FileInfo::iconName(QString flag)
|
||||
{
|
||||
if (!iconNameMapTable.contains(flag)) {
|
||||
return QString(FILEINFO_CONTENT_TYPE_UNKNOWN);
|
||||
}
|
||||
return iconNameMapTable.find(flag).value();
|
||||
}
|
|
@ -0,0 +1,95 @@
|
|||
#ifndef FILEINFO_H
|
||||
#define FILEINFO_H
|
||||
|
||||
#include <QString>
|
||||
#include <QVariant>
|
||||
#include <QProcess>
|
||||
#include <QtDBus>
|
||||
|
||||
#define FILEINFO_CONTENT_TYPE_IMAGE "image"
|
||||
#define FILEINFO_CONTENT_TYPE_VIDEO "video"
|
||||
#define FILEINFO_CONTENT_TYPE_AUDIO "audio"
|
||||
#define FILEINFO_CONTENT_TYPE_TEXT "text"
|
||||
#define FILEINFO_CONTENT_TYPE_UNKNOWN "unknown"
|
||||
|
||||
class FileInfo
|
||||
{
|
||||
public:
|
||||
enum FILE_TYPE {
|
||||
TYPE_DIR = 0, // 文件夹
|
||||
TYPE_TXT = 1, // 文本文件
|
||||
TYPE_AUDIO = 2, // 音频
|
||||
TYPE_VIDEO = 3, // 视频
|
||||
TYPE_IMAGE = 4, // 图片
|
||||
TYPE_DOC, // word
|
||||
TYPE_PDF, // pdf
|
||||
TYPE_EXCEL, // excel
|
||||
TYPE_PPTX, // ppt
|
||||
TYPE_ZIP, // zip
|
||||
TYPE_OTHER, // 其他
|
||||
};
|
||||
|
||||
public:
|
||||
FileInfo();
|
||||
FileInfo(const FileInfo &fileInfo);
|
||||
|
||||
FileInfo &operator=(const FileInfo &fileInfo);
|
||||
friend QDBusArgument &operator<<(QDBusArgument &argument, const FileInfo &fileInfo);
|
||||
friend const QDBusArgument &operator>>(const QDBusArgument &argument, FileInfo &fileInfo);
|
||||
|
||||
static void registerMetaType();
|
||||
|
||||
QString name() const;
|
||||
void setName(const QString &name);
|
||||
|
||||
qint64 size() const;
|
||||
void setSize(const qint64 &size);
|
||||
|
||||
int type() const;
|
||||
void setType(int type);
|
||||
|
||||
QString dateTime() const;
|
||||
void setDateTime(const QString &dateTime);
|
||||
|
||||
QString getThumbnailPath() const;
|
||||
void setThumbnailPath(const QString &value);
|
||||
|
||||
int getId() const;
|
||||
void setId(int value);
|
||||
|
||||
QString getPath() const;
|
||||
void setPath(const QString &path);
|
||||
|
||||
QString getDate() const;
|
||||
void setDate(const QString &date);
|
||||
|
||||
QString getContentType() const;
|
||||
|
||||
static FileInfo::FILE_TYPE judgmentType(QString fileName);
|
||||
|
||||
static void fileOpen(QString fileName);
|
||||
static QMap<QString, QString> initMimeMap();
|
||||
static QMap<QString, QString> initIconNameMap();
|
||||
static QString contentType(QString flag);
|
||||
static QString iconName(QString flag);
|
||||
|
||||
operator QVariant() const
|
||||
{
|
||||
return QVariant::fromValue(*this);
|
||||
}
|
||||
|
||||
private:
|
||||
int m_id = 0; // 文件id
|
||||
QString m_name = ""; // 文件名
|
||||
QString m_path = ""; // 文件路径
|
||||
qint64 m_size = 0; // 文件大小
|
||||
int m_type = 0; // 文件类型
|
||||
QString m_date = ""; // 时间
|
||||
QString m_dateTime = ""; // 详细时间
|
||||
QString m_thumbnailPath = ""; // 缩略图路径
|
||||
QString m_contentType = ""; // 文件类型描述
|
||||
static QMap<QString, QString> mimeMapTable;
|
||||
static QMap<QString, QString> iconNameMapTable;
|
||||
};
|
||||
Q_DECLARE_METATYPE(FileInfo)
|
||||
#endif // FILEINFO_H
|
|
@ -0,0 +1,74 @@
|
|||
#include "fileinfolist.h"
|
||||
|
||||
#include <QDebug>
|
||||
|
||||
FileInfoList::FileInfoList() {}
|
||||
|
||||
void FileInfoList::addFileInfo(FileInfo fileInfo)
|
||||
{
|
||||
m_fileList.append(fileInfo);
|
||||
m_length++;
|
||||
}
|
||||
|
||||
const QList<FileInfo> FileInfoList::getFileList()
|
||||
{
|
||||
return m_fileList;
|
||||
}
|
||||
|
||||
|
||||
const FileInfo FileInfoList::value(int index)
|
||||
{
|
||||
return m_fileList.value(index);
|
||||
}
|
||||
|
||||
const FileInfo FileInfoList::value(QString key)
|
||||
{
|
||||
for (int i = 0; i < m_fileList.size(); i++) {
|
||||
if (key == m_fileList.value(i).name()) {
|
||||
return m_fileList.value(i);
|
||||
}
|
||||
}
|
||||
return FileInfo();
|
||||
}
|
||||
|
||||
const int FileInfoList::size()
|
||||
{
|
||||
return m_length;
|
||||
}
|
||||
|
||||
void FileInfoList::clear()
|
||||
{
|
||||
m_fileList.clear();
|
||||
m_length = 0;
|
||||
}
|
||||
|
||||
QDBusArgument &operator<<(QDBusArgument &argument, const FileInfoList &fileInfoList)
|
||||
{
|
||||
argument.beginArray(qMetaTypeId<FileInfo>());
|
||||
for (int i = 0; i < fileInfoList.m_length; i++) {
|
||||
argument << fileInfoList.m_fileList.value(i);
|
||||
}
|
||||
argument.endArray();
|
||||
return argument;
|
||||
}
|
||||
|
||||
const QDBusArgument &operator>>(const QDBusArgument &argument, FileInfoList &fileInfoList)
|
||||
{
|
||||
argument.beginArray();
|
||||
fileInfoList.clear();
|
||||
|
||||
while (!argument.atEnd()) {
|
||||
FileInfo fileInfo;
|
||||
argument >> fileInfo;
|
||||
fileInfoList.addFileInfo(fileInfo);
|
||||
}
|
||||
|
||||
argument.endArray();
|
||||
return argument;
|
||||
}
|
||||
|
||||
void FileInfoList::registerMetaType()
|
||||
{
|
||||
qRegisterMetaType<FileInfoList>("FileInfoList");
|
||||
qDBusRegisterMetaType<FileInfoList>();
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
#ifndef FILEINFOLIST_H
|
||||
#define FILEINFOLIST_H
|
||||
|
||||
#include <QString>
|
||||
#include <QVariant>
|
||||
#include <QtDBus>
|
||||
|
||||
#include "fileinfo.h"
|
||||
|
||||
class FileInfoList
|
||||
{
|
||||
public:
|
||||
FileInfoList();
|
||||
void addFileInfo(FileInfo fileInfo);
|
||||
const QList<FileInfo> getFileList();
|
||||
const FileInfo value(int index);
|
||||
const FileInfo value(QString key);
|
||||
const int size();
|
||||
void clear();
|
||||
|
||||
friend QDBusArgument &operator<<(QDBusArgument &argument, const FileInfoList &fileInfoList);
|
||||
friend const QDBusArgument &operator>>(const QDBusArgument &argument, FileInfoList &fileInfoList);
|
||||
static void registerMetaType();
|
||||
|
||||
private:
|
||||
QList<FileInfo> m_fileList;
|
||||
int m_length = 0;
|
||||
};
|
||||
Q_DECLARE_METATYPE(FileInfoList)
|
||||
#endif // FILEINFOLIST_H
|
|
@ -0,0 +1,163 @@
|
|||
#include "generatetools.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <QImage>
|
||||
#include <QPainter>
|
||||
#include <QPalette>
|
||||
#include <qrencode.h>
|
||||
#include <QUuid>
|
||||
#include <QTime>
|
||||
#include <QGuiApplication>
|
||||
#include <QEventLoop>
|
||||
#include <QDebug>
|
||||
#include <QUrl>
|
||||
#include <sys/statvfs.h>
|
||||
|
||||
const QString USER_NAME = "kylin";
|
||||
const int PASSWORD_COUNT = 10;
|
||||
|
||||
GenerateTools::GenerateTools() {}
|
||||
|
||||
QPixmap GenerateTools::getCode(QString info, int width, int height, bool *ok)
|
||||
{
|
||||
QRcode *qrcode = QRcode_encodeString(info.toStdString().c_str(), 2, QR_ECLEVEL_Q, QR_MODE_8, 1);
|
||||
if (nullptr == qrcode) {
|
||||
qWarning() << "QR code generation failed! The return value of QRcode_encodeString is null.";
|
||||
if (ok != nullptr) {
|
||||
*ok = false;
|
||||
}
|
||||
return QPixmap();
|
||||
}
|
||||
qint32 temp_width = width;
|
||||
qint32 temp_height = height;
|
||||
qint32 qrcode_width = qrcode->width > 0 ? qrcode->width : 1;
|
||||
double scale_x = (double)temp_width / (double)qrcode_width;
|
||||
double scale_y = (double)temp_height / (double)qrcode_width;
|
||||
QImage image = QImage(temp_width, temp_height, QImage::Format_ARGB32);
|
||||
QPainter painter(&image);
|
||||
|
||||
QColor background(Qt::white);
|
||||
painter.setBrush(background);
|
||||
painter.setPen(Qt::NoPen);
|
||||
painter.drawRect(0, 0, temp_width, temp_height);
|
||||
QColor foreground(Qt::black); // 二维码颜色
|
||||
painter.setBrush(foreground);
|
||||
for (qint32 y = 0; y < qrcode_width; y++) {
|
||||
for (qint32 x = 0; x < qrcode_width; x++) {
|
||||
unsigned char b = qrcode->data[y * qrcode_width + x];
|
||||
if (b & 0x01) {
|
||||
QRectF r(x * scale_x, y * scale_y, scale_x, scale_y);
|
||||
painter.drawRects(&r, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (ok != nullptr) {
|
||||
*ok = true;
|
||||
}
|
||||
return QPixmap::fromImage(image);
|
||||
}
|
||||
|
||||
void GenerateTools::getUserPassword(QStringList &list)
|
||||
{
|
||||
char sourceChar[] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F',
|
||||
'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V',
|
||||
'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l',
|
||||
'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'};
|
||||
|
||||
char buffer[PASSWORD_COUNT] = {0};
|
||||
srand(time(NULL));
|
||||
|
||||
for (int i = 0; i < PASSWORD_COUNT; i++) {
|
||||
buffer[i] = sourceChar[rand() % 62];
|
||||
}
|
||||
|
||||
list << USER_NAME << QString::fromLocal8Bit(buffer, PASSWORD_COUNT);
|
||||
return;
|
||||
}
|
||||
|
||||
QString GenerateTools::getUuid()
|
||||
{
|
||||
QUuid id = QUuid::createUuid();
|
||||
QString strId = id.toString();
|
||||
return strId;
|
||||
}
|
||||
|
||||
void GenerateTools::delayMs(int ms)
|
||||
{
|
||||
QTime dieTime = QTime::currentTime().addMSecs(ms);
|
||||
|
||||
while (QTime::currentTime() < dieTime) {
|
||||
QCoreApplication::processEvents(QEventLoop::AllEvents, 100);
|
||||
}
|
||||
}
|
||||
|
||||
void GenerateTools::buriedPoint(kabase::BuriedPoint::PT pt)
|
||||
{
|
||||
kabase::BuriedPoint buriedPoint;
|
||||
if (buriedPoint.functionBuriedPoint(kabase::AppName::KylinMobileAssistant, pt)) {
|
||||
qCritical() << "Error : buried point fail !";
|
||||
};
|
||||
}
|
||||
|
||||
QString GenerateTools::getIptoCode(QString ip)
|
||||
{
|
||||
if (ip.isEmpty()) {
|
||||
qInfo() << "The IP entered is empty." << ip;
|
||||
return QString("");
|
||||
}
|
||||
QStringList list = ip.split(".");
|
||||
QString request;
|
||||
for (int i = 0; i < list.count(); i++) {
|
||||
int var = list.value(i).toInt();
|
||||
QString hex = QString::number(var, 16);
|
||||
if (hex.count() < 2) {
|
||||
hex.push_front("0");
|
||||
}
|
||||
request.append(hex);
|
||||
}
|
||||
request = request.toUpper();
|
||||
qInfo() << "Generated projection code " << request;
|
||||
return request;
|
||||
}
|
||||
|
||||
QString GenerateTools::getCodetoIp(QString code)
|
||||
{
|
||||
if (code.isEmpty()) {
|
||||
qInfo() << "The code entered is empty.";
|
||||
return QString("");
|
||||
}
|
||||
int index = 0;
|
||||
QStringList list;
|
||||
while (index < code.count()) {
|
||||
QString hex = code.mid(index, 2);
|
||||
bool ok;
|
||||
int dec = hex.toInt(&ok, 16);
|
||||
QString num = QString::number(dec);
|
||||
list.append(num);
|
||||
index = index + 2;
|
||||
}
|
||||
QString request = list.join(".");
|
||||
qInfo() << "IP conversion result is " << request;
|
||||
return request;
|
||||
}
|
||||
|
||||
quint64 GenerateTools::getVfsFreeSize(QString path)
|
||||
{
|
||||
int state = 0;
|
||||
struct statvfs vfs;
|
||||
fsblkcnt_t block_size = 0;
|
||||
fsblkcnt_t free_size = 0;
|
||||
|
||||
state = statvfs(path.toStdString().c_str(), &vfs);
|
||||
if (state < 0) {
|
||||
qCritical() << "read error!";
|
||||
return 0;
|
||||
}
|
||||
block_size = vfs.f_bsize; // 块大小
|
||||
free_size = vfs.f_bfree * block_size;
|
||||
|
||||
return free_size;
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
#ifndef GENERATEQRCODE_H
|
||||
#define GENERATEQRCODE_H
|
||||
|
||||
#include <QPixmap>
|
||||
#include "buriedpoint.hpp"
|
||||
|
||||
class GenerateTools
|
||||
{
|
||||
public:
|
||||
enum KEY_USERPASS {
|
||||
KEY_USER = 0, // 用户名
|
||||
KEY_PASSWORD // 密码
|
||||
};
|
||||
|
||||
GenerateTools();
|
||||
|
||||
static QPixmap getCode(QString info, int width = 170, int height = 170, bool *ok = nullptr);
|
||||
|
||||
static void getUserPassword(QStringList &list);
|
||||
|
||||
static QString getUuid();
|
||||
|
||||
static void delayMs(int ms);
|
||||
|
||||
static void buriedPoint(kabase::BuriedPoint::PT pt);
|
||||
|
||||
static QString getIptoCode(QString ip);
|
||||
|
||||
static QString getCodetoIp(QString code);
|
||||
|
||||
static quint64 getVfsFreeSize(QString path);
|
||||
};
|
||||
|
||||
#endif // GENERATEQRCODE_H
|
|
@ -0,0 +1,107 @@
|
|||
/*
|
||||
* Qt5-UKUI's Library
|
||||
*
|
||||
* Copyright (C) 2020, Tianjin KYLIN Information Technology Co., Ltd.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* 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 General Public License
|
||||
* along with this library. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* Authors: Yue Lan <lanyue@kylinos.cn>
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef HIGHLIGHTEFFECT_H
|
||||
#define HIGHLIGHTEFFECT_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QStyleOption>
|
||||
|
||||
class QAbstractItemView;
|
||||
|
||||
class QAbstractButton;
|
||||
|
||||
class QMenu;
|
||||
|
||||
class HighLightEffect : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
enum HighLightMode {
|
||||
skipHighlight = 0x0,
|
||||
HighlightEffect = 0x1,
|
||||
ordinaryHighLight = 0x2,
|
||||
hoverHighLight = 0x4,
|
||||
defaultHighLight = 0x8,
|
||||
filledSymbolicColorHighLight = 0x10,
|
||||
};
|
||||
|
||||
enum EffectMode { HighlightOnly, BothDefaultAndHighlit };
|
||||
|
||||
Q_ENUM(EffectMode)
|
||||
|
||||
/*!
|
||||
* \brief setSkipEffect
|
||||
* \param w
|
||||
* \param skip
|
||||
* \details
|
||||
* in ukui-style, some widget such as menu will be set use highlight
|
||||
* icon effect automaticlly,
|
||||
* but we might not want to compose a special pure color image.
|
||||
* This function is use to skip the effect.
|
||||
*/
|
||||
static void setSkipEffect(QWidget *w, bool skip = true);
|
||||
|
||||
static bool isPixmapPureColor(const QPixmap &pixmap);
|
||||
|
||||
static bool setMenuIconHighlightEffect(QMenu *menu, HighLightMode hlmode = skipHighlight,
|
||||
EffectMode mode = HighlightOnly);
|
||||
|
||||
static bool setViewItemIconHighlightEffect(QAbstractItemView *view, HighLightMode hlmode = skipHighlight,
|
||||
EffectMode mode = HighlightOnly);
|
||||
|
||||
static bool setButtonIconHighlightEffect(QAbstractButton *button, HighLightMode hlmode = skipHighlight,
|
||||
EffectMode mode = HighlightOnly);
|
||||
|
||||
static HighLightMode isWidgetIconUseHighlightEffect(const QWidget *w);
|
||||
|
||||
static void setSymoblicColor(const QColor &color);
|
||||
|
||||
static void setWidgetIconFillSymbolicColor(QWidget *widget, bool fill);
|
||||
|
||||
static const QColor getCurrentSymbolicColor();
|
||||
|
||||
static const QColor defaultStyleDark();
|
||||
|
||||
static QPixmap generatePixmap(const QPixmap &pixmap, const QStyleOption *option, const QWidget *widget = nullptr,
|
||||
bool force = false, EffectMode mode = HighlightOnly);
|
||||
|
||||
static QPixmap ordinaryGeneratePixmap(const QPixmap &pixmap, const QStyleOption *option,
|
||||
const QWidget *widget = nullptr, EffectMode mode = HighlightOnly);
|
||||
|
||||
static QPixmap hoverGeneratePixmap(const QPixmap &pixmap, const QStyleOption *option,
|
||||
const QWidget *widget = nullptr);
|
||||
|
||||
static QPixmap bothOrdinaryAndHoverGeneratePixmap(const QPixmap &pixmap, const QStyleOption *option,
|
||||
const QWidget *widget = nullptr, EffectMode mode = HighlightOnly);
|
||||
|
||||
static QPixmap filledSymbolicColoredGeneratePixmap(const QPixmap &pixmap, const QStyleOption *option,
|
||||
const QWidget *widget = nullptr,
|
||||
EffectMode mode = HighlightOnly);
|
||||
|
||||
private:
|
||||
explicit HighLightEffect(QObject *parent = nullptr);
|
||||
|
||||
static QPixmap filledSymbolicColoredPixmap(const QPixmap &source, const QColor &baseColor);
|
||||
};
|
||||
|
||||
#endif // HIGHLIGHTEFFECT_H
|
|
@ -0,0 +1,40 @@
|
|||
#include "serverstatus.h"
|
||||
|
||||
#include <QTcpSocket>
|
||||
#include <QThread>
|
||||
#include <QUrl>
|
||||
|
||||
const int CONNECT_NUM_MAX = 10;
|
||||
|
||||
ServerStatus::ServerStatus(QUrl url)
|
||||
{
|
||||
m_url = url;
|
||||
}
|
||||
void ServerStatus::startServer()
|
||||
{
|
||||
bool state = isConnect();
|
||||
Q_EMIT sigServerState(state);
|
||||
}
|
||||
|
||||
bool ServerStatus::isConnect()
|
||||
{
|
||||
bool isConnect = false;
|
||||
int connectionTimes = 0;
|
||||
QTcpSocket *tcpSocket = new QTcpSocket;
|
||||
while (1) {
|
||||
tcpSocket->connectToHost(m_url.host(), m_url.port());
|
||||
isConnect = tcpSocket->waitForReadyRead();
|
||||
if (isConnect) {
|
||||
break;
|
||||
}
|
||||
connectionTimes++;
|
||||
if (connectionTimes > CONNECT_NUM_MAX) {
|
||||
// 尝试连接服务器十次
|
||||
break;
|
||||
}
|
||||
QThread::msleep(500);
|
||||
}
|
||||
qInfo() << "Server status: " << isConnect;
|
||||
tcpSocket->deleteLater();
|
||||
return isConnect;
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
#ifndef SERVERSTATUS_H
|
||||
#define SERVERSTATUS_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QUrl>
|
||||
|
||||
class ServerStatus : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ServerStatus(QUrl url);
|
||||
|
||||
void startServer();
|
||||
|
||||
private:
|
||||
bool isConnect();
|
||||
|
||||
private:
|
||||
QUrl m_url;
|
||||
Q_SIGNALS:
|
||||
void sigServerState(bool);
|
||||
};
|
||||
|
||||
#endif // SERVERSTATUS_H
|
|
@ -0,0 +1,47 @@
|
|||
#include "loadanimation.h"
|
||||
#include <QHBoxLayout>
|
||||
#include <QDebug>
|
||||
|
||||
#include "highlight-effect.h"
|
||||
|
||||
const int ICON_MAX_NUM = 8;
|
||||
|
||||
LoadAnimation::LoadAnimation(QWidget *parent) : QWidget(parent)
|
||||
{
|
||||
m_loadLab = new QLabel(this);
|
||||
m_timer = new QTimer(this);
|
||||
|
||||
QHBoxLayout *hLayout = new QHBoxLayout;
|
||||
hLayout->addStretch();
|
||||
hLayout->addWidget(m_loadLab);
|
||||
hLayout->addStretch();
|
||||
|
||||
QVBoxLayout *vLayout = new QVBoxLayout;
|
||||
vLayout->addStretch();
|
||||
vLayout->addLayout(hLayout);
|
||||
vLayout->addStretch();
|
||||
|
||||
setLayout(vLayout);
|
||||
|
||||
m_loadLab->setPixmap(QPixmap(":/loadicon/" + QString::number(m_count) + ".png"));
|
||||
|
||||
connect(m_timer, &QTimer::timeout, this, &LoadAnimation::timeout);
|
||||
m_timer->start(100);
|
||||
}
|
||||
|
||||
void LoadAnimation::setHighLight()
|
||||
{
|
||||
m_loadLab->setProperty("useIconHighlightEffect", 0x2);
|
||||
}
|
||||
|
||||
void LoadAnimation::timeout()
|
||||
{
|
||||
QString qpmQss = ":/loadicon/";
|
||||
qpmQss.append(QString::number(m_count));
|
||||
qpmQss.append(".png");
|
||||
m_loadLab->setPixmap(QPixmap(qpmQss));
|
||||
m_count++;
|
||||
if (m_count == ICON_MAX_NUM) {
|
||||
m_count = 1;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
#ifndef LOADANIMATION_H
|
||||
#define LOADANIMATION_H
|
||||
|
||||
#include <QWidget>
|
||||
#include <QLabel>
|
||||
#include <QTimer>
|
||||
|
||||
class LoadAnimation : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit LoadAnimation(QWidget *parent = nullptr);
|
||||
|
||||
void setHighLight();
|
||||
|
||||
private:
|
||||
QLabel *m_loadLab = nullptr;
|
||||
QTimer *m_timer = nullptr;
|
||||
int m_count = 1;
|
||||
|
||||
Q_SIGNALS:
|
||||
|
||||
public Q_SLOTS:
|
||||
void timeout();
|
||||
};
|
||||
|
||||
#endif // LOADANIMATION_H
|
|
@ -0,0 +1,76 @@
|
|||
//
|
||||
// Created by sqp on 2021/11/17.
|
||||
//
|
||||
|
||||
#include "tipwidget.h"
|
||||
#include <QTimer>
|
||||
|
||||
TipWidget::TipWidget() : mpParent(nullptr), mnTransparent(200)
|
||||
{
|
||||
setWindowFlags(Qt::Tool | Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint);
|
||||
setAlignment(Qt::AlignCenter);
|
||||
|
||||
mpTimer = new QTimer(this);
|
||||
connect(mpTimer, &QTimer::timeout, this, &TipWidget::OnTimer);
|
||||
}
|
||||
|
||||
TipWidget::~TipWidget()
|
||||
{
|
||||
deleteLater();
|
||||
}
|
||||
|
||||
void TipWidget::OnTimer()
|
||||
{
|
||||
mnTransparent -= 3;
|
||||
if (mnTransparent > 0) {
|
||||
if (mpParent && parentWidget()) {
|
||||
QPoint pt((parentWidget()->width() - width()) >> 1, (parentWidget()->height() - height()) - 100);
|
||||
if (pos() != pt) {
|
||||
move(pt);
|
||||
}
|
||||
}
|
||||
setStyleSheet(
|
||||
QString(
|
||||
"color:white;font:12px \"Microsoft YaHei\";border-radius:5px;background-color:rgba(80, 80, 80, %1);")
|
||||
.arg(mnTransparent));
|
||||
} else {
|
||||
mpTimer->stop();
|
||||
setVisible(false);
|
||||
deleteLater();
|
||||
}
|
||||
}
|
||||
|
||||
void TipWidget::SetMesseage(const QString &strMessage, const QPoint *pPoint, const int time)
|
||||
{
|
||||
if (strMessage.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
QFontMetrics fm1(font());
|
||||
setFixedSize(fm1.width(strMessage) + 30, 30);
|
||||
|
||||
mpParent = parentWidget();
|
||||
|
||||
if (width() > mpParent->width()) {
|
||||
setFixedSize(mpParent->width() - 60, 60);
|
||||
setWordWrap(true);
|
||||
} else {
|
||||
setWordWrap(false);
|
||||
}
|
||||
|
||||
setText(strMessage);
|
||||
|
||||
if (nullptr != mpParent) {
|
||||
if (nullptr != pPoint) {
|
||||
move(mpParent->mapFromGlobal(*pPoint));
|
||||
mpParent = nullptr;
|
||||
} else {
|
||||
move((mpParent->width() - width()) >> 1, (mpParent->height() - height()) - 100);
|
||||
}
|
||||
}
|
||||
|
||||
setVisible(true);
|
||||
mnTransparent = 200;
|
||||
|
||||
mpTimer->start(3 * time);
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
//
|
||||
// Created by sqp on 2021/11/17.
|
||||
//
|
||||
|
||||
#ifndef KYLIN_MOBILE_ASSISTANT_TIPWIDGET_H
|
||||
#define KYLIN_MOBILE_ASSISTANT_TIPWIDGET_H
|
||||
|
||||
|
||||
#include <QLabel>
|
||||
|
||||
class TipWidget : public QLabel
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
TipWidget();
|
||||
~TipWidget();
|
||||
void SetMesseage(const QString &strMessage, const QPoint *pPoint = nullptr, const int time = 10);
|
||||
|
||||
private:
|
||||
void OnTimer();
|
||||
|
||||
private:
|
||||
QWidget *mpParent;
|
||||
QTimer *mpTimer;
|
||||
int mnTransparent;
|
||||
};
|
||||
|
||||
|
||||
#endif // KYLIN_MOBILE_ASSISTANT_TIPWIDGET_H
|
|
@ -0,0 +1,7 @@
|
|||
HEADERS += \
|
||||
$$PWD/loadanimation.h \
|
||||
$$PWD/tipwidget.h
|
||||
|
||||
SOURCES += \
|
||||
$$PWD/loadanimation.cpp \
|
||||
$$PWD/tipwidget.cpp
|
|
@ -0,0 +1,39 @@
|
|||
//
|
||||
// Created by sqp on 2022/5/11.
|
||||
//
|
||||
|
||||
#include "util.h"
|
||||
#include <QFileInfo>
|
||||
#include <unistd.h>
|
||||
#include <QProcess>
|
||||
|
||||
namespace KMobileCommon
|
||||
{
|
||||
QString getUserName()
|
||||
{
|
||||
QStringList envVariables;
|
||||
envVariables << "USERNAME.*"
|
||||
<< "USER.*"
|
||||
<< "USERDOMAIN.*"
|
||||
<< "HOSTNAME.*"
|
||||
<< "DOMAINNAME.*";
|
||||
QStringList environment = QProcess::systemEnvironment();
|
||||
for (QString string : envVariables) {
|
||||
int index = environment.indexOf(QRegExp(string));
|
||||
if (index != -1) {
|
||||
QStringList stringList = environment.at(index).split('=');
|
||||
if (stringList.size() == 2) {
|
||||
return stringList.at(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
QString getHostName()
|
||||
{
|
||||
char hostName[100] = {};
|
||||
gethostname(hostName, sizeof(hostName));
|
||||
return hostName;
|
||||
}
|
||||
} // namespace KMobileCommon
|
|
@ -0,0 +1,34 @@
|
|||
//
|
||||
// Created by sqp on 2021/11/15.
|
||||
//
|
||||
|
||||
#ifndef KYLIN_MOBILE_ASSISTANT_UTIL_H
|
||||
#define KYLIN_MOBILE_ASSISTANT_UTIL_H
|
||||
|
||||
#include <QUuid>
|
||||
|
||||
namespace KMobileCommon
|
||||
{
|
||||
|
||||
enum DeviceType
|
||||
{
|
||||
PC = 0,
|
||||
Android = 1,
|
||||
Phone = 2,
|
||||
};
|
||||
|
||||
struct DiscoveryDeviceInfo
|
||||
{
|
||||
QString uuid;
|
||||
QString ip;
|
||||
QString port;
|
||||
QString deviceName;
|
||||
quint16 deviceType;
|
||||
};
|
||||
|
||||
QString getUserName();
|
||||
QString getHostName();
|
||||
|
||||
} // namespace KMobileCommon
|
||||
|
||||
#endif // KYLIN_MOBILE_ASSISTANT_UTIL_H
|
|
@ -0,0 +1,30 @@
|
|||
section: screens
|
||||
client:
|
||||
halfDuplexCapsLock = false
|
||||
halfDuplexNumLock = false
|
||||
halfDuplexScrollLock = false
|
||||
xtestIsXineramaUnaware = false
|
||||
preserveFocus = false
|
||||
switchCorners = none
|
||||
switchCornerSize = 0
|
||||
server:
|
||||
halfDuplexCapsLock = false
|
||||
halfDuplexNumLock = false
|
||||
halfDuplexScrollLock = false
|
||||
xtestIsXineramaUnaware = false
|
||||
preserveFocus = false
|
||||
switchCorners = none
|
||||
switchCornerSize = 0
|
||||
end
|
||||
|
||||
section: options
|
||||
relativeMouseMoves = false
|
||||
screenSaverSync = false
|
||||
win32KeepForeground = false
|
||||
clipboardSharing = true
|
||||
switchCorners = none
|
||||
switchCornerSize = 0
|
||||
keystroke(Control+g) = switchToScreen(server)
|
||||
keystroke(Control+h) = switchToScreen(client)
|
||||
end
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
[common]
|
||||
# 窗口标题
|
||||
WindowTitle = kylin-mobile-assistant
|
||||
# 推送到安卓设备的文件保存路径(必须以/结尾)
|
||||
PushFilePath = /sdcard/
|
||||
# 最大fps(仅支持Android 10以上)
|
||||
MaxFps = 60
|
||||
# 是否渲染过期视频帧(跳过过期视频帧意味着更低的延迟)
|
||||
RenderExpiredFrames = 0
|
||||
# 视频解码方式:-1 自动,0 软解,1 dx硬解,2 opengl硬解
|
||||
UseDesktopOpenGL = -1
|
||||
# scrcpy-server的版本号(不要修改)
|
||||
ServerVersion = 1.21
|
||||
# scrcpy-server推送到安卓设备的路径
|
||||
ServerPath = /data/local/tmp/scrcpy-server.jar
|
||||
# 自定义adb路径,例如D:/android/tools/adb.exe
|
||||
AdbPath =
|
||||
# 编码选项 "-"表示默认
|
||||
# 例如 CodecOptions="profile=1,level=2"
|
||||
# 更多编码选项参考 https://d.android.com/reference/android/media/MediaFormat
|
||||
CodecOptions = ""
|
||||
# 指定编码器名称,必须是H.264编码器
|
||||
# 例如 CodecName="OMX.qcom.video.encoder.avc"
|
||||
CodecName=""
|
||||
|
||||
# Set the log level (debug, info, warn, error)
|
||||
LogLevel = info
|
||||
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
protoc -I=./ --cpp_out=../../connectmanage/ ./messageserialize.proto
|
||||
protoc -I=./ --cpp_out=../../pcscreenmanage/ ./screenmanagemsg.proto
|
|
@ -0,0 +1,70 @@
|
|||
syntax = "proto2";
|
||||
|
||||
message ProtobufFileInfo {
|
||||
required int64 id = 1;
|
||||
required string name = 2;
|
||||
required int64 size = 3;
|
||||
required string path = 4;
|
||||
required string date = 5;
|
||||
optional int64 duration = 6;
|
||||
optional string thumb_path = 7;
|
||||
}
|
||||
|
||||
message ProtobufFilesInfo {
|
||||
repeated ProtobufFileInfo file_info = 1;
|
||||
}
|
||||
|
||||
message FtpUserPwd {
|
||||
required string username = 1;
|
||||
required string pwd = 2;
|
||||
}
|
||||
|
||||
message DeviceInfo {
|
||||
enum DeviceType {
|
||||
PC = 0;
|
||||
ANDROID = 1;
|
||||
UNKNOWN = 2;
|
||||
}
|
||||
enum DeviceRole {
|
||||
INITIATOR = 0;
|
||||
RECIPIENT = 1;
|
||||
}
|
||||
required string uuid = 1;
|
||||
required string device_name = 2;
|
||||
required DeviceType device_type = 3;
|
||||
optional FtpUserPwd ftp_userpwd = 4;
|
||||
required DeviceRole device_role = 5;
|
||||
}
|
||||
|
||||
message ReplyMessage {
|
||||
enum StatusType {
|
||||
ERROR = 0;
|
||||
CONNECTED = 1;
|
||||
DISCONNECTED = 2;
|
||||
DEVICEINFO = 3;
|
||||
DATA = 4;
|
||||
DATAREADY = 5;
|
||||
FILEINFO = 6;
|
||||
FILEREADY = 7;
|
||||
STREAM = 8;
|
||||
STREAMREADY = 9;
|
||||
BUSY = 10;
|
||||
STARTAUDIOSERVER = 11;
|
||||
CANCELSCREEN = 12;
|
||||
URGENTCLIENT = 13;
|
||||
URGENTSERVER = 14;
|
||||
REFUSE = 15;
|
||||
}
|
||||
enum ConnType {
|
||||
ADB = 0;
|
||||
WIFI = 1;
|
||||
WIFIADB = 2;
|
||||
}
|
||||
required StatusType status = 1;
|
||||
optional int64 dataSize = 2;
|
||||
optional DeviceInfo device_info = 3;
|
||||
optional ProtobufFilesInfo files_info = 4;
|
||||
optional ConnType conn_type = 5;
|
||||
optional string error_string = 6;
|
||||
}
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
syntax = "proto2";
|
||||
|
||||
message ScreenManageMsg {
|
||||
enum MessageType {
|
||||
CURTAINREADY = 0;
|
||||
SCREENREADY = 1;
|
||||
CURTAINEXIT = 2;
|
||||
SCREENEXIT = 3;
|
||||
REFUSE = 4;
|
||||
STARTEDCONTROL = 5;
|
||||
EXITCONTROL = 6;
|
||||
}
|
||||
required MessageType msg = 1;
|
||||
optional string roomid = 2;
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
set(MOBILE_CONNECTMANAGE_SOURCES
|
||||
wifimanager.h
|
||||
wifimanager.cpp
|
||||
usbmanage.h
|
||||
usbmanage.cpp
|
||||
connectionservice.h
|
||||
connectionservice.cpp
|
||||
messageserialize.pb.h
|
||||
messageserialize.pb.cc
|
||||
)
|
||||
|
||||
add_library(connectmanage ${MOBILE_CONNECTMANAGE_SOURCES})
|
||||
|
||||
find_package(PkgConfig REQUIRED)
|
||||
pkg_check_modules(GLIB
|
||||
glib-2.0
|
||||
gobject-2.0
|
||||
gio-2.0
|
||||
protobuf
|
||||
)
|
||||
|
||||
target_include_directories(connectmanage PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
target_include_directories(connectmanage PUBLIC ${GLIB_INCLUDE_DIRS})
|
||||
|
||||
target_link_libraries(connectmanage PUBLIC
|
||||
Qt${QT_VERSION_MAJOR}::Widgets
|
||||
${GLIB_LIBRARIES}
|
||||
mobile_common
|
||||
)
|
|
@ -0,0 +1,188 @@
|
|||
#ifndef CONNECTIONSERVICE_H
|
||||
#define CONNECTIONSERVICE_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QMap>
|
||||
#include <QThread>
|
||||
#include <QTcpServer>
|
||||
#include <QTcpSocket>
|
||||
#include <QTimer>
|
||||
|
||||
#include "serverstatus.h"
|
||||
#include "messageserialize.pb.h"
|
||||
#include "adbprocess.h"
|
||||
|
||||
typedef std::function<void()> ConnectSuccessCallBack; // 定义连接成功函数类型
|
||||
typedef std::function<void()> ConnectFailCallBack; // 定义连接失败函数类型
|
||||
|
||||
class ConnectionService : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
ConnectionService(QObject *parent = nullptr);
|
||||
~ConnectionService();
|
||||
|
||||
// wifi连接
|
||||
// 启动客户端连接服务器
|
||||
void startClient(const QString host);
|
||||
// 设置连接是否成功回调函数
|
||||
void setConnectionCallback(ConnectSuccessCallBack connectSuccessCallBack, ConnectFailCallBack connectFailCallBack);
|
||||
// 尝试连接address:port主机地址,使用前需设置成功和失败的回调函数
|
||||
void connectRemoteHost(const QString address);
|
||||
// 设置验证结果
|
||||
void setConnectionRespond(bool isAgree);
|
||||
// 断开连接
|
||||
bool abortService();
|
||||
// 发送字节数据
|
||||
bool sendByteData(const QString data);
|
||||
bool sendByteData(const char *buffer, const qint64 bufSize);
|
||||
// 发送文件数据
|
||||
void setFileSavePath(const QString path);
|
||||
bool sendFileData(const QString path);
|
||||
bool sendFileData(const QStringList pathList);
|
||||
// 发送流数据
|
||||
bool openStream(bool flag = true);
|
||||
bool sendStreamData(char *buffer, qint32 bufSize);
|
||||
|
||||
// USB连接
|
||||
void connectLocDev();
|
||||
// 是否支持反控
|
||||
bool isSupportADB();
|
||||
// 获取设备序列号
|
||||
QString getDeviceSerial();
|
||||
|
||||
// 业务能力
|
||||
bool closeAbility();
|
||||
void setUserPassword(QString userName, QString password);
|
||||
|
||||
public:
|
||||
enum ConnectType {
|
||||
NOTCONNECT = 0, // 未连接
|
||||
WIFI, // WiFi连接
|
||||
USB // USB连接
|
||||
};
|
||||
Q_ENUM(ConnectType)
|
||||
enum DeviceType {
|
||||
PC = 0, // PC端
|
||||
ANDROID, // 安卓端
|
||||
UNKNOWN // 未知设备
|
||||
};
|
||||
Q_ENUM(DeviceType)
|
||||
enum DeviceRole {
|
||||
INITIATOR = 0, // 发起者
|
||||
RECIPIENT, // 接收者
|
||||
};
|
||||
Q_ENUM(DeviceRole)
|
||||
struct FtpNamePwd
|
||||
{
|
||||
QString username = ""; // 用户名
|
||||
QString pwd = ""; // 密码
|
||||
};
|
||||
|
||||
struct ConnectionInfo
|
||||
{
|
||||
QString uuid = 0;
|
||||
QString deviceName = "";
|
||||
QString address = "";
|
||||
DeviceType deviceType = DeviceType::UNKNOWN;
|
||||
ConnectType connectType = ConnectType::NOTCONNECT;
|
||||
FtpNamePwd usernamePwd;
|
||||
DeviceRole deviceRole = DeviceRole::INITIATOR;
|
||||
};
|
||||
|
||||
Q_SIGNALS:
|
||||
void sigConnectRequest(QString, ConnectionService::DeviceType);
|
||||
void sigConnectDenied();
|
||||
void sigConnectInfo(const ConnectionInfo &);
|
||||
void sigDisconnect();
|
||||
// test
|
||||
void sigByteReceived(QString);
|
||||
void sigFileReceived(QString);
|
||||
// usb
|
||||
void sigNotFountApk();
|
||||
void sigDeviceRedundancy();
|
||||
public Q_SLOTS:
|
||||
void slotServerNewConnection();
|
||||
void onMessageReadyRead();
|
||||
void onDataReadyRead();
|
||||
void onHeartbeatReadyRead();
|
||||
void slotServerState(bool state);
|
||||
void onAdbExec(AdbProcess::ADB_EXEC_RESULT processResult);
|
||||
void updateSocketState();
|
||||
void slotHeartbeatConnection();
|
||||
|
||||
private:
|
||||
enum DataType {
|
||||
FILE_DATA = 0, // 文件内容
|
||||
STREAM_DATA, // 流数据
|
||||
BYTE_DATA, // 字节数据
|
||||
FREE // 空闲
|
||||
};
|
||||
|
||||
enum AndroidConnType {
|
||||
ADB = 0, // 有线adb
|
||||
CONNECTWIFI = 1, // wifi
|
||||
WIFIADB = 2, // 无线adb
|
||||
NOTANDROID = 3 // 不是安卓设备
|
||||
};
|
||||
|
||||
private:
|
||||
void deleteSocket();
|
||||
void disconnectSocket();
|
||||
bool sendMessage(const ReplyMessage &message);
|
||||
bool sendBusyMessage();
|
||||
bool sendStartAudioMessage();
|
||||
void clearConnectionInfo();
|
||||
void updateDevice();
|
||||
void checkApk(QString serials);
|
||||
void setMapPort();
|
||||
void startApp(QString serials);
|
||||
bool isSameDevice(QString serials);
|
||||
void handleWifiConnection();
|
||||
void sendDeviceInfo();
|
||||
void receiveDeviceInfo(const ReplyMessage &reply);
|
||||
void connectDataSocket();
|
||||
void startHeartbeat();
|
||||
void connectHeartbeat();
|
||||
QString getSocketAddress();
|
||||
void sendHeartbeat(bool isServer);
|
||||
|
||||
private:
|
||||
// wifi
|
||||
QTcpServer *m_tcpServer = nullptr; // Tcp服务
|
||||
QTcpSocket *m_messageTcpSocket = nullptr; // 消息通道
|
||||
QTcpSocket *m_dataTcpSocket = nullptr; // 数据通道
|
||||
QTcpServer *m_heartTcpServer = nullptr; // 心跳机制服务
|
||||
QTcpSocket *m_heartbeatSocket = nullptr; //心跳通道
|
||||
ServerStatus *m_serverStatus = nullptr; // 判断服务器状态
|
||||
QThread *m_statusThread = nullptr; // 判断服务器状态线程
|
||||
ConnectSuccessCallBack m_connectSuccessCallBack = nullptr; // 连接成功回调函数
|
||||
ConnectFailCallBack m_connectFailCallBack = nullptr; // 连接失败回调函数
|
||||
// usb
|
||||
AdbProcess *m_adb = nullptr; // adb接口
|
||||
QTimer *m_timer = nullptr; //获取socket状态定时器
|
||||
|
||||
ConnectionInfo m_connectInfo; // 连接信息
|
||||
QString m_serverIp = ""; // 服务器主机地址
|
||||
int m_port = 0; // 服务器端口
|
||||
QStringList m_filePathList; // 所有文件路径
|
||||
ProtobufFilesInfo m_filesInfo; // 所有文件信息
|
||||
bool m_isMsgSocketConnect = false; // 消息通道是否已连接
|
||||
DataType m_dataType = DataType::FREE; // 当前数据类型
|
||||
qint64 m_dataSize = 0; // 接收的数据大小
|
||||
bool m_isHead = true; // 是否为数据头部
|
||||
int m_currentFileIndex = 0; // 当前文件索引
|
||||
QByteArray m_data; // 需要发送的数据
|
||||
QString m_fileSavePath = ""; // 文件保存路径
|
||||
QStringList m_deviceSerialList; // 设备序列号列表
|
||||
bool m_isSupportADB = false; // 安卓设备是否支持adb反控
|
||||
QString m_userName = ""; // ftp用户名
|
||||
QString m_password = ""; // ftp密码
|
||||
AndroidConnType m_androidConnType = AndroidConnType::NOTANDROID; // 安卓连接类型
|
||||
bool m_isClient = false; // 是否为客户端
|
||||
bool m_isSurvival = false; // 是否收到心跳
|
||||
bool m_isAgainSendHeartbeat = true; // 是否重新发送
|
||||
bool m_isRemoteDisconnect = false; // 是否为远程主机断开
|
||||
};
|
||||
|
||||
#endif // CONNECTIONSERVICE_H
|
|
@ -0,0 +1,21 @@
|
|||
QT += core dbus x11extras KWindowSystem
|
||||
|
||||
PKGCONFIG += gio-2.0
|
||||
|
||||
CONFIG += no_keywords
|
||||
CONFIG += c++11 link_pkgconfig
|
||||
CONFIG += link_pkgconfig
|
||||
|
||||
LIBS += -lgio-2.0
|
||||
LIBS += -lglib-2.0
|
||||
LIBS += -lprotobuf
|
||||
|
||||
HEADERS += $$PWD/usbmanage.h \
|
||||
$$PWD/wifimanager.h \
|
||||
$$PWD/connectionservice.h \
|
||||
$$PWD/messageserialize.pb.h
|
||||
|
||||
SOURCES += $$PWD/usbmanage.cpp \
|
||||
$$PWD/wifimanager.cpp \
|
||||
$$PWD/connectionservice.cpp \
|
||||
$$PWD/messageserialize.pb.cc
|
|
@ -0,0 +1,68 @@
|
|||
/*
|
||||
* Copyright (C) 2021 KylinSoft Co., Ltd.
|
||||
*
|
||||
* Authors:
|
||||
* Ding Jing dingjing@kylinos.cn
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation; either version 2.1, 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 <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "usbmanage.h"
|
||||
#include <QDebug>
|
||||
|
||||
UsbManage::UsbManage(QObject *parent) : QObject(parent)
|
||||
{
|
||||
qInfo() << "Start listening for USB devices";
|
||||
mGvolumeMonitor = g_volume_monitor_get();
|
||||
|
||||
g_signal_connect(mGvolumeMonitor, "volume-added", G_CALLBACK(volumeConnectedCallback), this);
|
||||
g_signal_connect(mGvolumeMonitor, "volume-removed", G_CALLBACK(volumeDisconnectedCallback), this);
|
||||
}
|
||||
|
||||
UsbManage::~UsbManage()
|
||||
{
|
||||
qInfo() << "Stop listening for USB devices";
|
||||
if (mGvolumeMonitor) {
|
||||
g_object_unref(mGvolumeMonitor);
|
||||
}
|
||||
}
|
||||
|
||||
void UsbManage::volumeConnectedCallback(GVolumeMonitor *monitor, GVolume *drive, gpointer pThis)
|
||||
{
|
||||
g_return_if_fail(drive);
|
||||
g_return_if_fail(pThis);
|
||||
|
||||
UsbManage *dm = static_cast<UsbManage *>(pThis);
|
||||
|
||||
QString volumeName = g_volume_get_name(drive);
|
||||
|
||||
Q_EMIT dm->sigVolumeConnected(volumeName);
|
||||
|
||||
Q_UNUSED(monitor);
|
||||
}
|
||||
|
||||
void UsbManage::volumeDisconnectedCallback(GVolumeMonitor *monitor, GVolume *drive, gpointer pThis)
|
||||
{
|
||||
g_return_if_fail(drive);
|
||||
g_return_if_fail(pThis);
|
||||
|
||||
QString volumeName = g_volume_get_name(drive);
|
||||
UsbManage *dm = static_cast<UsbManage *>(pThis);
|
||||
|
||||
Q_EMIT dm->sigVolumeDisconnected(volumeName);
|
||||
|
||||
Q_UNUSED(dm);
|
||||
Q_UNUSED(monitor);
|
||||
}
|
|
@ -0,0 +1,51 @@
|
|||
/*
|
||||
* Copyright (C) 2021 KylinSoft Co., Ltd.
|
||||
*
|
||||
* Authors:
|
||||
* Ding Jing dingjing@kylinos.cn
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation; either version 2.1, 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 <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef USBMANAGE_H
|
||||
#define USBMANAGE_H
|
||||
|
||||
#include <gio/gio.h>
|
||||
|
||||
#include <QObject>
|
||||
|
||||
class UsbManage : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit UsbManage(QObject *parent = nullptr);
|
||||
~UsbManage();
|
||||
|
||||
private:
|
||||
static void volumeConnectedCallback(GVolumeMonitor *monitor, GVolume *drive, gpointer pThis);
|
||||
|
||||
static void volumeDisconnectedCallback(GVolumeMonitor *monitor, GVolume *drive, gpointer pThis);
|
||||
|
||||
Q_SIGNALS:
|
||||
|
||||
void sigVolumeConnected(QString);
|
||||
|
||||
void sigVolumeDisconnected(QString);
|
||||
|
||||
private:
|
||||
GVolumeMonitor *mGvolumeMonitor = nullptr;
|
||||
};
|
||||
|
||||
#endif // USBMANAGE_H
|
|
@ -0,0 +1,142 @@
|
|||
#include "wifimanager.h"
|
||||
|
||||
#include <QObject>
|
||||
#include <QCoreApplication>
|
||||
#include <QDebug>
|
||||
#include <QtDBus/QDBusConnection>
|
||||
#include <QtDBus/QDBusConnectionInterface>
|
||||
#include <QtDBus/QDBusMessage>
|
||||
#include <QtDBus/QDBusReply>
|
||||
#include <QtDBus/QDBusInterface>
|
||||
#include <QVariant>
|
||||
#include <QVariantMap>
|
||||
|
||||
WifiManager::~WifiManager() {}
|
||||
|
||||
void WifiManager::onPropertiesChanged(QVariantMap map)
|
||||
{
|
||||
Q_UNUSED(map);
|
||||
QString wifiIP = checkWifiConnectivity();
|
||||
if (!m_wifiIP.isEmpty()) {
|
||||
if (wifiIP.isEmpty()) {
|
||||
qInfo() << m_wifiIP << "disconnect";
|
||||
m_wifiIP.clear();
|
||||
Q_EMIT sigWifiDisconnected();
|
||||
}
|
||||
} else {
|
||||
while (checkWifiConnectivity().isEmpty()) {}
|
||||
m_wifiIP = wifiIP;
|
||||
qInfo() << m_wifiIP << "connect";
|
||||
Q_EMIT sigWifiConnected(m_wifiIP);
|
||||
}
|
||||
}
|
||||
|
||||
QString WifiManager::checkWifiConnectivity()
|
||||
{
|
||||
QDBusInterface *interface = new QDBusInterface("org.freedesktop.NetworkManager", "/org/freedesktop/NetworkManager",
|
||||
"org.freedesktop.NetworkManager", QDBusConnection::systemBus());
|
||||
if (!interface->isValid()) {
|
||||
qCritical() << "Failed to get NetworkManager!";
|
||||
interface->deleteLater();
|
||||
return QString("");
|
||||
}
|
||||
|
||||
QVariant var = interface->property("ActiveConnections");
|
||||
if (!var.isValid()) {
|
||||
qCritical() << "Failed to get ActiveConnections!";
|
||||
interface->deleteLater();
|
||||
return QString("");
|
||||
}
|
||||
QList<QDBusObjectPath> msg;
|
||||
if (var.canConvert(QMetaType::QVariantList)) {
|
||||
msg = var.value<QList<QDBusObjectPath>>();
|
||||
for (auto path : msg) {
|
||||
QDBusObjectPath wifiIPPath = getConnectedWiFiIPPath(path);
|
||||
if (!wifiIPPath.path().isEmpty()) {
|
||||
QString wifiIP = getConnectedWiFiIP(wifiIPPath);
|
||||
if (!wifiIP.isEmpty()) {
|
||||
interface->deleteLater();
|
||||
return wifiIP;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
interface->deleteLater();
|
||||
return QString("");
|
||||
}
|
||||
|
||||
QDBusObjectPath WifiManager::getConnectedWiFiIPPath(QDBusObjectPath objPath)
|
||||
{
|
||||
QDBusInterface *interfaceType = new QDBusInterface("org.freedesktop.NetworkManager", objPath.path(),
|
||||
"org.freedesktop.DBus.Properties", QDBusConnection::systemBus());
|
||||
|
||||
QDBusReply<QVariant> replyType =
|
||||
interfaceType->call("Get", "org.freedesktop.NetworkManager.Connection.Active", "Type");
|
||||
if (replyType.value().toString() == "wifi" || replyType.value().toString() == "802-11-wireless") {
|
||||
QDBusReply<QVariant> replyState =
|
||||
interfaceType->call("Get", "org.freedesktop.NetworkManager.Connection.Active", "State");
|
||||
int wifiState = replyState.value().toUInt(); //正在连接的状态是1,连接上的状态是2
|
||||
if (wifiState == 2) {
|
||||
QDBusMessage replyIp4 =
|
||||
interfaceType->call("Get", "org.freedesktop.NetworkManager.Connection.Active", "Ip4Config");
|
||||
QList<QVariant> outArgsIp4 = replyIp4.arguments();
|
||||
if (!outArgsIp4.isEmpty()) {
|
||||
QVariant firstIp4 = outArgsIp4.at(0);
|
||||
QDBusVariant dbvFirstIp4 = firstIp4.value<QDBusVariant>();
|
||||
QVariant vFirstIp4 = dbvFirstIp4.variant();
|
||||
QDBusObjectPath dbusPathIp4 = vFirstIp4.value<QDBusObjectPath>();
|
||||
interfaceType->deleteLater();
|
||||
return dbusPathIp4;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
interfaceType->deleteLater();
|
||||
return QDBusObjectPath();
|
||||
}
|
||||
|
||||
QString WifiManager::getConnectedWiFiIP(QDBusObjectPath objPath)
|
||||
{
|
||||
QDBusInterface *interfaceIpv4 = new QDBusInterface("org.freedesktop.NetworkManager", objPath.path(),
|
||||
"org.freedesktop.DBus.Properties", QDBusConnection::systemBus());
|
||||
QDBusMessage replyIpv4 = interfaceIpv4->call("Get", "org.freedesktop.NetworkManager.IP4Config", "AddressData");
|
||||
|
||||
QList<QVariant> outArgsIpv4 = replyIpv4.arguments();
|
||||
if (!outArgsIpv4.isEmpty()) {
|
||||
QVariant firstIpv4 = outArgsIpv4.at(0);
|
||||
QDBusVariant dbvFirstIpv4 = firstIpv4.value<QDBusVariant>();
|
||||
QVariant vFirstIpv4 = dbvFirstIpv4.variant();
|
||||
|
||||
const QDBusArgument &dbusArgIpv4 = vFirstIpv4.value<QDBusArgument>();
|
||||
QList<QVariantMap> mDatasIpv4;
|
||||
dbusArgIpv4 >> mDatasIpv4;
|
||||
if (!mDatasIpv4.isEmpty()) {
|
||||
for (QVariantMap mDataIpv4 : mDatasIpv4) {
|
||||
QString wifiIP = mDataIpv4.value("address").toString();
|
||||
if (!wifiIP.isEmpty()) {
|
||||
interfaceIpv4->deleteLater();
|
||||
return wifiIP;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
interfaceIpv4->deleteLater();
|
||||
return QString("");
|
||||
}
|
||||
|
||||
void WifiManager::startWifiInfo()
|
||||
{
|
||||
m_wifiIP = checkWifiConnectivity();
|
||||
if (!m_wifiIP.isEmpty()) {
|
||||
qInfo() << m_wifiIP << "connect";
|
||||
Q_EMIT sigWifiConnected(m_wifiIP);
|
||||
} else {
|
||||
qInfo() << "There is currently no WiFi connection!";
|
||||
Q_EMIT sigWifiDisconnected();
|
||||
}
|
||||
QDBusConnection::systemBus().connect("org.freedesktop.NetworkManager", "/org/freedesktop/NetworkManager",
|
||||
"org.freedesktop.NetworkManager", "PropertiesChanged", this,
|
||||
SLOT(onPropertiesChanged(QVariantMap)));
|
||||
}
|
|
@ -0,0 +1,38 @@
|
|||
#ifndef WIFIMANAGER_H
|
||||
#define WIFIMANAGER_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
#include <QtDBus/QDBusObjectPath>
|
||||
|
||||
class WifiManager : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
WifiManager() {}
|
||||
~WifiManager();
|
||||
|
||||
private:
|
||||
QString checkWifiConnectivity();
|
||||
|
||||
QDBusObjectPath getConnectedWiFiIPPath(QDBusObjectPath objPath);
|
||||
|
||||
QString getConnectedWiFiIP(QDBusObjectPath objPath);
|
||||
|
||||
Q_SIGNALS:
|
||||
|
||||
void sigWifiConnected(QString wifiIP);
|
||||
|
||||
void sigWifiDisconnected();
|
||||
|
||||
public Q_SLOTS:
|
||||
|
||||
void startWifiInfo();
|
||||
|
||||
void onPropertiesChanged(QVariantMap map);
|
||||
|
||||
private:
|
||||
QString m_wifiIP = "";
|
||||
};
|
||||
|
||||
#endif // WIFIMANAGER_H
|
After Width: | Height: | Size: 29 KiB |
After Width: | Height: | Size: 70 KiB |
After Width: | Height: | Size: 73 KiB |
After Width: | Height: | Size: 83 KiB |
After Width: | Height: | Size: 88 KiB |
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 43 KiB |
After Width: | Height: | Size: 608 KiB |
After Width: | Height: | Size: 608 KiB |
After Width: | Height: | Size: 160 KiB |
After Width: | Height: | Size: 160 KiB |
After Width: | Height: | Size: 45 KiB |
After Width: | Height: | Size: 72 KiB |
After Width: | Height: | Size: 64 KiB |
|
@ -0,0 +1,173 @@
|
|||
# Mobile Assistant
|
||||
## PC end
|
||||
### Summary
|
||||
Mobile assistant is a tool software that helps users browse, view and manage mobile phone files conveniently, and can quickly project the mobile phone screen to the computer (Kirin computer).
|
||||
|
||||
<br>
|
||||
|
||||
### Usage method
|
||||
|
||||
#### Connect
|
||||
|
||||
Open the PC side of Kirin mobile assistant, and you can choose to scan the code on the Android side of Kirin mobile assistant or use USB cable to connect Android mobile phone and computer.
|
||||
|
||||
<br>
|
||||
|
||||
![Fig 1 connect-pc-big](image/1.png)
|
||||
|
||||
<br>
|
||||
|
||||
#### Connection successful
|
||||
|
||||
After the Android device is successfully connected to the Kirin computer, enter the display mobile file page.
|
||||
|
||||
<br>
|
||||
|
||||
![Fig 2 connect-successful-pc-big](image/2.png)
|
||||
|
||||
<br>
|
||||
|
||||
### Projection screen
|
||||
|
||||
After the Android device is successfully connected to the Kirin computer, click the mobile screen projection to synchronize the mobile screen and sound (sync system sound above Android Q, sync mic sound below Android q) to the computer. The three key navigation bar at the bottom of the screen projection window shows that the anti control operation (ADB connection) is supported. Click x to turn off the screen projection and sound synchronization, and support full screen and top setting operations. The screen can rotate with the rotation of the mobile phone screen.
|
||||
|
||||
<br>
|
||||
|
||||
![Fig 3 projection-screen-big](image/3.png)
|
||||
|
||||
<br>
|
||||
|
||||
### Chinese input
|
||||
|
||||
After the Android device is connected (USB connection only), install kylin keyboard. Set kylin keyboard as the default input method of the system, and you can input Chinese from the computer keyboard.
|
||||
|
||||
<br>
|
||||
|
||||
![Fig 4 chinese-input-big](image/4.png)
|
||||
|
||||
<br>
|
||||
|
||||
### Classification of mobile multimedia files
|
||||
|
||||
After the Android device and kylin computer are successfully connected, you can view the classified display list of photos, videos, music, documents and other files in the mobile phone, as well as the files in wechat and QQ applications (due to the different storage locations of various system files, the number of files is less than 100% accurate). Pictures and videos support folding display by day, and icon and list mode switching.
|
||||
|
||||
<br>
|
||||
|
||||
![Fig 5 document-classification-big](image/5.png)
|
||||
|
||||
<br>
|
||||
|
||||
### Download multimedia files
|
||||
|
||||
After the Android device is successfully connected to the Kirin computer, you can select a single or multiple multimedia files to download. Pictures and videos support full selection and half selection.
|
||||
|
||||
<br>
|
||||
|
||||
![Fig 6 download-multimedia-files-big](image/6.png)
|
||||
|
||||
<br>
|
||||
|
||||
### Mobile storage
|
||||
|
||||
After the Android device is successfully connected to the Kirin computer, you can view the mobile phone's stored files, and support list and icon mode switching.
|
||||
|
||||
<br>
|
||||
|
||||
![Fig 7 mobile-storage-big](image/7.png)
|
||||
|
||||
<br>
|
||||
|
||||
### Computer document display
|
||||
|
||||
After the Android device and kylin computer are successfully connected, the file manager of the computer can display multi terminal collaboration entries. Click open to directly view the mobile phone file storage, and open, copy and download files.
|
||||
|
||||
<br>
|
||||
|
||||
![Fig 8 computer-document-display-big](image/8.png)
|
||||
|
||||
<br>
|
||||
|
||||
### Download and upload
|
||||
|
||||
After the Android device and kylin computer are successfully connected, select the file or folder to download to the specified directory of the computer, drag and drop the computer file to the mobile assistant interface, and then upload the file to the mobile download directory.
|
||||
|
||||
<br>
|
||||
|
||||
![Fig 9 download-and-upload-big](image/9.png)
|
||||
|
||||
<br>
|
||||
|
||||
### Search mobile phone files
|
||||
|
||||
After the Android device is successfully connected to the Kirin computer, it can search the mobile phone files and display the search results in real time. The search results support list and icon mode switching, and support the download of search result files to the computer.
|
||||
|
||||
<br>
|
||||
|
||||
![Fig 10 search-mobile-phone-files-big](image/10.png)
|
||||
|
||||
<br>
|
||||
|
||||
### Disconnect
|
||||
|
||||
After the Android device is successfully connected to the Kirin computer, click disconnect to disconnect the computer from the mobile phone.
|
||||
|
||||
<br>
|
||||
|
||||
## Android end
|
||||
### Summary
|
||||
|
||||
Mobile assistant is a tool software (Android terminal) that helps users browse, view and manage mobile phone files conveniently, and can quickly project the mobile phone screen to the computer.
|
||||
|
||||
<br>
|
||||
|
||||
### Usage method
|
||||
|
||||
#### Connect
|
||||
|
||||
Kylin mobile assistant Android terminal scans the QR code of Kirin mobile assistant PC terminal or connects Android mobile phone and Kirin computer through USB cable.
|
||||
|
||||
<br>
|
||||
|
||||
![Fig 11 connect-android-big](image/11.png)
|
||||
|
||||
<br>
|
||||
|
||||
#### Connection successful
|
||||
|
||||
After the Android device is successfully connected to the Kirin computer, you can view the list of mobile phone classification files and mobile phone storage files. It supports icon and list mode switching, and pictures and videos can be displayed by day.
|
||||
|
||||
<br>
|
||||
|
||||
![Fig 12 connect-successful-android-big](image/12.png)
|
||||
|
||||
<br>
|
||||
|
||||
### Send files
|
||||
|
||||
After the Android device is successfully connected to the Kirin computer, you can view the list of mobile phone classification files and mobile phone storage files. It supports icon and list mode switching, and pictures and videos can be displayed by day.
|
||||
|
||||
<br>
|
||||
|
||||
![Fig 13 send-files-big](image/13.png)
|
||||
|
||||
<br>
|
||||
|
||||
### Personal information
|
||||
|
||||
After the Android device is successfully connected to the Kirin computer, you can view the list of mobile phone classification files and mobile phone storage files. It supports icon and list mode switching, and pictures and videos can be displayed by day.
|
||||
|
||||
<br>
|
||||
|
||||
![Fig 14 image/personal-information-big](image/14.png)
|
||||
|
||||
<br>
|
||||
|
||||
### Disconnect
|
||||
|
||||
After the Android device is successfully connected to the Kirin computer, you can view the list of mobile phone classification files and mobile phone storage files. It supports icon and list mode switching, and pictures and videos can be displayed by day.
|
||||
|
||||
<br>
|
||||
|
||||
![Fig 15 disconnect-big](image/15.png)
|
||||
|
||||
<br>
|
After Width: | Height: | Size: 289 KiB |
After Width: | Height: | Size: 425 KiB |
After Width: | Height: | Size: 393 KiB |
After Width: | Height: | Size: 73 KiB |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 83 KiB |
After Width: | Height: | Size: 37 KiB |
After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 108 KiB |
After Width: | Height: | Size: 58 KiB |
After Width: | Height: | Size: 107 KiB |
After Width: | Height: | Size: 41 KiB |
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 624 KiB |
After Width: | Height: | Size: 57 KiB |
After Width: | Height: | Size: 88 KiB |
|
@ -0,0 +1,173 @@
|
|||
# 手机助手
|
||||
## PC 端
|
||||
### 概 述
|
||||
手机助手是一款帮助用户便捷浏览、查看、管理手机文件,并能快速将手机屏幕投射到电脑的工具软件(麒麟电脑端)。
|
||||
|
||||
<br>
|
||||
|
||||
### 使用方式
|
||||
|
||||
#### 连接
|
||||
|
||||
打开麒麟手机助手PC端,可以选择麒麟手机助手Android端扫码连接或者使用USB线连接Android手机和电脑。
|
||||
|
||||
<br>
|
||||
|
||||
![图 1 连接-big](image/connect-pc.png)
|
||||
|
||||
<br>
|
||||
|
||||
#### 连接成功
|
||||
|
||||
Android设备和麒麟电脑连接成功后,进入展示手机文件页面。
|
||||
|
||||
<br>
|
||||
|
||||
![图 2 连接成功-big](image/connect-successful-pc.png)
|
||||
|
||||
<br>
|
||||
|
||||
### 投屏
|
||||
|
||||
Android设备和麒麟电脑连接成功后,点击手机投屏,可将手机屏幕和声音(Android Q以上同步系统声音,Android Q以下同步mic声音),同步到电脑。投屏窗口显示底部三键导航栏代表支持反控操作(ADB连接),点击X可关闭投屏和声音同步,支持全屏和置顶等操作,屏幕可随手机屏幕旋转而旋转。
|
||||
|
||||
<br>
|
||||
|
||||
![图 3 投屏-big](image/projection-screen.png)
|
||||
|
||||
<br>
|
||||
|
||||
### 中文输入
|
||||
|
||||
Android设备通过连接后(仅限USB连接),安装kylin-keyboard,将kylin-keyboard设为系统默认输入法,可通过电脑键盘进行Android设备的中文输入。
|
||||
|
||||
<br>
|
||||
|
||||
![图 4 中文输入-big](image/chinese-input.png)
|
||||
|
||||
<br>
|
||||
|
||||
### 手机多媒体文件分类
|
||||
|
||||
Android设备和麒麟电脑连接成功后,可分别查看手机中照片、视频、音乐、文档等文件的分类显示列表,以及微信、QQ应用中的文件(由于各个系统文件存放位置不同,文件数量达不到百分百精确),图片和视频支持按天折叠显示,支持图标、列表模式切换。
|
||||
|
||||
<br>
|
||||
|
||||
![图 5 手机多媒体文件分类-big](image/document-classification.png)
|
||||
|
||||
<br>
|
||||
|
||||
### 下载多媒体文件
|
||||
|
||||
Android设备和麒麟电脑连接成功后,可选择单个或多个多媒体文件进行下载,图片和视频支持全选和半选。
|
||||
|
||||
<br>
|
||||
|
||||
![图 6 下载多媒体文件-big](image/download-multimedia-files.png)
|
||||
|
||||
<br>
|
||||
|
||||
### 手机存储
|
||||
|
||||
Android设备和麒麟电脑连接成功后,可查看手机存储文件,支持列表和图标模式切换。
|
||||
|
||||
<br>
|
||||
|
||||
![图 7 手机存储-big](image/mobile-storage.png)
|
||||
|
||||
<br>
|
||||
|
||||
### 电脑文管显示
|
||||
|
||||
Android设备和麒麟电脑连接成功后,电脑的文件管理器可显示多端协同条目,点击点击打开,可直接查看手机文件存储,可进行文件打开、复制下载。
|
||||
|
||||
<br>
|
||||
|
||||
![图 8 电脑文管显示-big](image/computer-document-display.png)
|
||||
|
||||
<br>
|
||||
|
||||
### 下载和上传
|
||||
|
||||
Android设备和麒麟电脑连接成功后,选中文件或文件夹可下载到电脑指定目录,将电脑文件拖拽到手机助手界面中,即可将文件上传到手机下载目录中。
|
||||
|
||||
<br>
|
||||
|
||||
![图 9 下载和上传-big](image/download-and-upload.png)
|
||||
|
||||
<br>
|
||||
|
||||
### 搜索手机文件
|
||||
|
||||
Android设备和麒麟电脑连接成功后,可对手机文件进行搜索,并实时显示搜索结果,搜索结果支持列表和图标模式切换,支持搜索结果文件下载至电脑。
|
||||
|
||||
<br>
|
||||
|
||||
![图 10 搜索手机文件-big](image/search-mobile-phone-files.png)
|
||||
|
||||
<br>
|
||||
|
||||
### 断开连接
|
||||
|
||||
Android设备和麒麟电脑连接成功后,点击断开连接,可断开电脑与手机的连接。
|
||||
|
||||
<br>
|
||||
|
||||
## Android端
|
||||
### 概述
|
||||
|
||||
手机助手是一款帮助用户便捷浏览、查看、管理手机文件,并能快速将手机屏幕投射到电脑的工具软件(Android端)。
|
||||
|
||||
<br>
|
||||
|
||||
### 使用方法
|
||||
|
||||
#### 连接
|
||||
|
||||
麒麟手机助手Android端扫描麒麟手机助手PC端的二维码或者通过USB线连接Android手机和麒麟电脑。
|
||||
|
||||
<br>
|
||||
|
||||
![图 11 连接-big](image/connect-android.png)
|
||||
|
||||
<br>
|
||||
|
||||
#### 连接成功
|
||||
|
||||
Android设备和麒麟电脑连接成功后,可查看手机分类文件列表,和手机存储文件。支持图标和列表模式切换,图片和视频支持按天显示。
|
||||
|
||||
<br>
|
||||
|
||||
![图 12 连接成功-big](image/connect-successful-android.png)
|
||||
|
||||
<br>
|
||||
|
||||
### 发送文件
|
||||
|
||||
Android设备和麒麟电脑连接成功后,可查看手机分类文件列表,和手机存储文件。支持图标和列表模式切换,图片和视频支持按天显示。
|
||||
|
||||
<br>
|
||||
|
||||
![图 13 发送文件-big](image/send-files.png)
|
||||
|
||||
<br>
|
||||
|
||||
### 个人信息
|
||||
|
||||
Android设备和麒麟电脑连接成功后,可查看手机分类文件列表,和手机存储文件。支持图标和列表模式切换,图片和视频支持按天显示。
|
||||
|
||||
<br>
|
||||
|
||||
![图 14 个人信息-big](image/personal-information.png)
|
||||
|
||||
<br>
|
||||
|
||||
### 断开连接
|
||||
|
||||
Android设备和麒麟电脑连接成功后,可查看手机分类文件列表,和手机存储文件。支持图标和列表模式切换,图片和视频支持按天显示。
|
||||
|
||||
<br>
|
||||
|
||||
![图 15 断开连接-big](image/disconnect.png)
|
||||
|
||||
<br>
|
|
@ -0,0 +1,16 @@
|
|||
set(MOBILE_COMMON_SOURCES
|
||||
dbusvfsinterface.h
|
||||
dbusvfsinterface.cpp
|
||||
)
|
||||
|
||||
add_library(mobile_dbus ${MOBILE_COMMON_SOURCES})
|
||||
|
||||
target_include_directories(mobile_dbus PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
|
||||
target_link_libraries(mobile_dbus PUBLIC
|
||||
${Qt5DBus_LIBRARIES}
|
||||
mobileui
|
||||
mobile_common
|
||||
)
|
|
@ -0,0 +1,3 @@
|
|||
HEADERS += $$PWD/dbusvfsinterface.h
|
||||
|
||||
SOURCES += $$PWD/dbusvfsinterface.cpp
|
|
@ -0,0 +1,52 @@
|
|||
#include "dbusvfsinterface.h"
|
||||
#include "mainwindow.h"
|
||||
|
||||
DbusVfsInterface::DbusVfsInterface(QObject *parent) : QObject(parent)
|
||||
{
|
||||
FileInfo::registerMetaType();
|
||||
FileInfoList::registerMetaType();
|
||||
connect(MainWindow::getInstance(), &MainWindow::sigConnected, this, &DbusVfsInterface::sigDeviceUpdate);
|
||||
connect(MainWindow::getInstance(), &MainWindow::sigDisconnect, this, [=]() {
|
||||
Q_EMIT sigDeviceUpdate(QString(""));
|
||||
});
|
||||
connect(MainWindow::getInstance(), &MainWindow::sigFileInfoList, this, [=](const QMap<QString, FileInfo> &fileMap) {
|
||||
qInfo() << "Publish file list.";
|
||||
m_fileMap.clear();
|
||||
m_fileMap = fileMap;
|
||||
FileInfoList list;
|
||||
QMap<QString, FileInfo>::const_iterator it = fileMap.begin();
|
||||
while (it != fileMap.end()) {
|
||||
list.addFileInfo(it.value());
|
||||
it++;
|
||||
}
|
||||
Q_EMIT sigFileInfoList(list);
|
||||
});
|
||||
}
|
||||
|
||||
QString DbusVfsInterface::getDeviceName()
|
||||
{
|
||||
qInfo() << "Get current external connection request name.";
|
||||
return MainWindow::getInstance()->getDeviceName();
|
||||
}
|
||||
|
||||
QString DbusVfsInterface::getMountDir()
|
||||
{
|
||||
qInfo() << "External request to get the current mount directory.";
|
||||
return MOUNT_DIR;
|
||||
}
|
||||
|
||||
void DbusVfsInterface::getFileInfoList(QString path)
|
||||
{
|
||||
qInfo() << "External request for file list." << path;
|
||||
MainWindow::getInstance()->list(path);
|
||||
}
|
||||
|
||||
void DbusVfsInterface::downFile(QStringList fromPathList, QString targetPath)
|
||||
{
|
||||
qInfo() << "External request for download file." << targetPath;
|
||||
QList<FileInfo> list;
|
||||
for (int i = 0; i < fromPathList.size(); i++) {
|
||||
list.append(m_fileMap.find(fromPathList.value(i)).value());
|
||||
}
|
||||
MainWindow::getInstance()->downFile(list, targetPath);
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
#ifndef DBUSVFSINTERFACE_H
|
||||
#define DBUSVFSINTERFACE_H
|
||||
|
||||
#define KYLIN_MOBILE_PATH "/"
|
||||
#define KYLIN_MOBILE_SERVICE "com.kylinos.Multiterminal.Manager"
|
||||
#define KYLIN_MOBILE_INTERFACE "com.kylinos.Multiterminal.Manager"
|
||||
|
||||
#include <QObject>
|
||||
#include "fileinfo.h"
|
||||
#include "fileinfolist.h"
|
||||
|
||||
class DbusVfsInterface : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_CLASSINFO("D-Bus Interface", KYLIN_MOBILE_SERVICE)
|
||||
public:
|
||||
DbusVfsInterface(QObject *parent = nullptr);
|
||||
|
||||
Q_SIGNALS:
|
||||
void sigDeviceUpdate(QString);
|
||||
void sigFileInfoList(FileInfoList);
|
||||
|
||||
public Q_SLOTS:
|
||||
QString getDeviceName();
|
||||
QString getMountDir();
|
||||
void getFileInfoList(QString path);
|
||||
void downFile(QStringList fromPathList, QString targetPath);
|
||||
|
||||
private:
|
||||
QMap<QString, FileInfo> m_fileMap; // 缓存当前目录文件信息
|
||||
};
|
||||
|
||||
#endif // DBUSVFSINTERFACE_H
|
|
@ -0,0 +1,44 @@
|
|||
Source: kylin-connectivity
|
||||
Section: admin
|
||||
Priority: optional
|
||||
Maintainer: huheng <huheng@kylinos.cn>
|
||||
Build-Depends: debhelper-compat (= 12),
|
||||
qtbase5-dev,
|
||||
qt5-qmake,
|
||||
qttools5-dev-tools,
|
||||
qttools5-dev,
|
||||
libkf5windowsystem-dev,
|
||||
libqt5x11extras5-dev,
|
||||
cmake,
|
||||
pkgconf,
|
||||
libgsettings-qt-dev,
|
||||
libavformat-dev,
|
||||
libswscale-dev,
|
||||
libavcodec-dev,
|
||||
libavutil-dev,
|
||||
libffmpegthumbnailer-dev,
|
||||
libqrencode-dev,
|
||||
libkysdk-qtwidgets-dev,
|
||||
libkysdk-diagnostics-dev,
|
||||
libkysdk-waylandhelper-dev,
|
||||
libkysdk-alm-dev,
|
||||
libkysdk-ukenv-dev,
|
||||
libkysdk-log-dev,
|
||||
libkysdk-config-dev,
|
||||
libkysdk-utils-dev,
|
||||
libsystemd-dev,
|
||||
libsqlite3-dev,
|
||||
libglib2.0-dev,
|
||||
libpeony-dev,
|
||||
libprotobuf-dev,
|
||||
qtwebengine5-dev
|
||||
Standards-Version: 4.4.1
|
||||
Homepage: http://gitlab2.kylin.com/kylin-desktop/kmre-tianjin/intel-lookingglass/-/tree/master/kylin-mobile-assistant
|
||||
#Vcs-Browser: http://gitlab2.kylin.com/kylin-desktop/kmre-tianjin/intel-lookingglass/-/tree/master/kylin-mobile-assistant
|
||||
#Vcs-Git: http://gitlab2.kylin.com/kylin-desktop/kmre-tianjin/intel-lookingglass/-/tree/master/kylin-mobile-assistant
|
||||
|
||||
Package: kylin-connectivity
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends},adb,vlc-bin,vlc-plugin-base,xdotool,curlftpfs
|
||||
Description: kylin-connectivity
|
||||
<kylin-connectivity>
|
|
@ -0,0 +1,43 @@
|
|||
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Upstream-Name: kylin-connectivity
|
||||
Upstream-Contact: <preferred name and address to reach the upstream project>
|
||||
Source: <url://example.com>
|
||||
|
||||
Files: *
|
||||
Copyright: <years> <put author's name and email here>
|
||||
<years> <likewise for another author>
|
||||
License: <special license>
|
||||
<Put the license of the package here indented by 1 space>
|
||||
<This follows the format of Description: lines in control file>
|
||||
.
|
||||
<Including paragraphs>
|
||||
|
||||
# If you want to use GPL v2 or later for the /debian/* files use
|
||||
# the following clauses, or change it to suit. Delete these two lines
|
||||
Files: debian/*
|
||||
Copyright: 2022 huheng <huheng@kylinos.cn>
|
||||
License: GPL-2+
|
||||
This package 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 package 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/>
|
||||
.
|
||||
On Debian systems, the complete text of the GNU General
|
||||
Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".
|
||||
|
||||
# Please also look if there are files or directories which have a
|
||||
# different copyright/license attached and list them here.
|
||||
# Please avoid picking licenses with terms that are more restrictive than the
|
||||
# packaged work, as it may make Debian's contributions unacceptable upstream.
|
||||
#
|
||||
# If you need, there are some extra license texts available in two places:
|
||||
# /usr/share/debhelper/dh_make/licenses/
|
||||
# /usr/share/common-licenses/
|
|
@ -0,0 +1,15 @@
|
|||
kylin-connectivity /usr/bin/
|
||||
mobile-assistant.desktop /usr/share/applications/
|
||||
third_party/scrcpy-server.jar /usr/share/kylin-mobile-assistant/
|
||||
third_party/plugins-simple/src/lib/libsimple.so /usr/share/kylin-mobile-assistant/
|
||||
config/phoneServerConfig.ini ~/.config/kylin-mobile-assistant/
|
||||
third_party/sndcpy /usr/share/kylin-mobile-assistant/
|
||||
config/control.conf /usr/share/kylin-mobile-assistant/
|
||||
translations/ /usr/share/kylin-mobile-assistant/
|
||||
plugin/peony-vfs-kylin-multiterminal/translations/peony-vfs-kylin-multiterminal_zh_CN.ts /usr/share/kylin-mobile-assistant/translations/
|
||||
plugin/peony-vfs-kylin-multiterminal/translations/peony-vfs-kylin-multiterminal_zh_CN.qm /usr/share/kylin-mobile-assistant/translations/
|
||||
plugin/peony-vfs-kylin-multiterminal/lib/libpeony-vfs-kylin-multiterminal.so /lib
|
||||
plugin/peony-send-to-mobile-assistant/translations/peony-send-to-mobile-assistant_zh_CN.ts /usr/share/kylin-mobile-assistant/translations/
|
||||
plugin/peony-send-to-mobile-assistant/translations/peony-send-to-mobile-assistant_zh_CN.qm /usr/share/kylin-mobile-assistant/translations/
|
||||
plugin/peony-send-to-mobile-assistant/lib/libpeony-send-to-mobile-assistant.so /lib
|
||||
data/kylin-mobile-assistant /usr/share/kylin-user-guide/data/guide/
|
|
@ -0,0 +1,20 @@
|
|||
#!/bin/bash
|
||||
if [ ! -d "/var/lib/mult" ]; then
|
||||
mkdir /var/lib/mult
|
||||
fi
|
||||
|
||||
#arch
|
||||
get_arch=`uname -i`
|
||||
if [[ $get_arch =~ "x86_64" ]];then
|
||||
mv /lib/libpeony-vfs-kylin-multiterminal.so /lib/x86_64-linux-gnu/peony-extensions/
|
||||
mv /lib/libpeony-send-to-mobile-assistant.so /lib/x86_64-linux-gnu/peony-extensions/
|
||||
elif [[ $get_arch =~ "aarch64" ]];then
|
||||
mv /lib/libpeony-vfs-kylin-multiterminal.so /lib/aarch64-linux-gnu/peony-extensions/
|
||||
mv /lib/libpeony-send-to-mobile-assistant.so /lib/aarch64-linux-gnu/peony-extensions/
|
||||
else
|
||||
echo "unknown!!"
|
||||
fi
|
||||
|
||||
if [ ! -f "/usr/lib/libsimple.so" ];then
|
||||
cp /usr/share/kylin-mobile-assistant/libsimple.so /usr/lib/
|
||||
fi
|
|
@ -0,0 +1,4 @@
|
|||
#!/bin/bash
|
||||
if [ -d "/var/lib/mult" ]; then
|
||||
rm -rf /var/lib/mult
|
||||
fi
|
|
@ -0,0 +1,20 @@
|
|||
#!/usr/bin/make -f
|
||||
|
||||
%:
|
||||
dh $@
|
||||
|
||||
override_dh_auto_configure:
|
||||
cmake . && \
|
||||
make -j10
|
||||
|
||||
override_dh_missing:
|
||||
dh_missing --fail-missing
|
||||
|
||||
override_dh_auto_clean:
|
||||
[ ! -d .moc ] || $(RM) -r .moc
|
||||
[ ! -d .obj ] || $(RM) -r .obj
|
||||
[ ! -d .ui ] || $(RM) -r .ui
|
||||
[ ! -f Makefile ] || dh_auto_clean
|
||||
|
||||
override_dh_auto_build:
|
||||
dh_auto_build -- $(MAKE_OPTS)
|
|
@ -0,0 +1 @@
|
|||
3.0 (native)
|
|
@ -0,0 +1,20 @@
|
|||
set(MOBILE_DISCOVERY_SOURCES
|
||||
discovery.cpp
|
||||
discovery.h
|
||||
discdeviceinfo.cpp
|
||||
discdeviceinfo.h
|
||||
tlv.h
|
||||
tlv.cpp
|
||||
unix-util.h
|
||||
)
|
||||
|
||||
add_library(discovery ${MOBILE_DISCOVERY_SOURCES})
|
||||
|
||||
target_include_directories(discovery PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/discserver)
|
||||
target_include_directories(discovery PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
target_link_libraries(discovery PRIVATE
|
||||
Qt${QT_VERSION_MAJOR}::Widgets
|
||||
Qt${QT_VERSION_MAJOR}::Network
|
||||
mobile_common
|
||||
)
|
|
@ -0,0 +1,204 @@
|
|||
#include <string.h>
|
||||
#include <arpa/inet.h>
|
||||
#include "tlv.h"
|
||||
#include "discdeviceinfo.h"
|
||||
|
||||
namespace tlv
|
||||
{
|
||||
|
||||
DiscoveryDeviceInfo::DiscoveryDeviceInfo() {}
|
||||
|
||||
DiscoveryDeviceInfo::~DiscoveryDeviceInfo()
|
||||
{
|
||||
if (mSerializedBuffer != nullptr) {
|
||||
delete[] mSerializedBuffer;
|
||||
mSerializedBuffer = nullptr;
|
||||
}
|
||||
|
||||
std::map<int, Tlv *>::iterator itor;
|
||||
for (itor = mTlvMap.begin(); itor != mTlvMap.end(); itor++) {
|
||||
delete itor->second;
|
||||
}
|
||||
|
||||
mTlvMap.clear();
|
||||
}
|
||||
|
||||
bool DiscoveryDeviceInfo::Serialize()
|
||||
{
|
||||
if (mSerializedBuffer != nullptr) {
|
||||
return false;
|
||||
}
|
||||
|
||||
int offset = 0;
|
||||
mSerializedBuffer = new unsigned char[mSerializedBytes];
|
||||
|
||||
std::map<int, Tlv *>::iterator itor;
|
||||
for (itor = mTlvMap.begin(); itor != mTlvMap.end(); itor++) {
|
||||
int type = htonl(itor->second->GetType());
|
||||
memcpy(mSerializedBuffer + offset, &type, sizeof(int));
|
||||
offset += sizeof(int);
|
||||
int length = itor->second->GetLength();
|
||||
int nwlength = htonl(length);
|
||||
memcpy(mSerializedBuffer + offset, &nwlength, sizeof(int));
|
||||
offset += sizeof(int);
|
||||
memcpy(mSerializedBuffer + offset, itor->second->GetValue(), length);
|
||||
offset += length;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool DiscoveryDeviceInfo::Parse(const unsigned char *buffer, int buffersize)
|
||||
{
|
||||
if (mSerializedBuffer != nullptr || buffer == nullptr) {
|
||||
return false;
|
||||
}
|
||||
|
||||
unsigned char *cached = new unsigned char[buffersize];
|
||||
memcpy(cached, buffer, buffersize);
|
||||
|
||||
int offset = 0;
|
||||
while (offset < buffersize) {
|
||||
int type = ntohl((*(int *)(cached + offset)));
|
||||
offset += sizeof(int);
|
||||
int length = ntohl((*(int *)(cached + offset)));
|
||||
offset += sizeof(int);
|
||||
PutValue(new Tlv(type, cached + offset, length));
|
||||
offset += length;
|
||||
}
|
||||
|
||||
mSerializedBuffer = cached;
|
||||
mSerializedBytes = buffersize;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
unsigned char *DiscoveryDeviceInfo::GetSerializedBuffer() const
|
||||
{
|
||||
return mSerializedBuffer;
|
||||
}
|
||||
|
||||
int DiscoveryDeviceInfo::GetSerializedBytes() const
|
||||
{
|
||||
return mSerializedBytes;
|
||||
}
|
||||
|
||||
bool DiscoveryDeviceInfo::PutValue(Tlv *value)
|
||||
{
|
||||
std::map<int, Tlv *>::iterator itor = mTlvMap.find(value->GetType());
|
||||
if (itor != mTlvMap.end()) {
|
||||
Tlv *prevTlv = itor->second;
|
||||
mSerializedBytes = mSerializedBytes - (sizeof(int) * 2 + prevTlv->GetLength());
|
||||
delete itor->second;
|
||||
itor->second = value;
|
||||
} else {
|
||||
mTlvMap.insert(std::pair<int, Tlv *>(value->GetType(), value));
|
||||
}
|
||||
|
||||
mSerializedBytes += (sizeof(int) * 2 + value->GetLength());
|
||||
return true;
|
||||
}
|
||||
|
||||
bool DiscoveryDeviceInfo::PutRequestValue(int type, int value)
|
||||
{
|
||||
if (mSerializedBuffer != nullptr) {
|
||||
return false;
|
||||
}
|
||||
int nwvalue = htonl(value);
|
||||
return PutValue(new Tlv(type, nwvalue));
|
||||
}
|
||||
|
||||
bool DiscoveryDeviceInfo::PutObjectValue(int type, const DiscoveryDeviceInfo &value)
|
||||
{
|
||||
if (mSerializedBuffer != nullptr) {
|
||||
return false;
|
||||
}
|
||||
unsigned char *buffer = value.GetSerializedBuffer();
|
||||
if (buffer == nullptr) {
|
||||
return false;
|
||||
}
|
||||
return PutValue(new Tlv(type, buffer, value.GetSerializedBytes()));
|
||||
}
|
||||
|
||||
bool DiscoveryDeviceInfo::GetResponseValue(int type, int &value) const
|
||||
{
|
||||
std::map<int, Tlv *>::const_iterator itor = mTlvMap.find(type);
|
||||
if (itor != mTlvMap.end()) {
|
||||
value = ntohl((*(int *)(itor->second->GetValue())));
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool DiscoveryDeviceInfo::GetDevTypeValue(int type, int &value) const
|
||||
{
|
||||
std::map<int, Tlv *>::const_iterator itor = mTlvMap.find(type);
|
||||
if (itor != mTlvMap.end()) {
|
||||
value = ntohl((*(int *)(itor->second->GetValue())));
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool DiscoveryDeviceInfo::GetUuidValue(int type, char *value, int &length) const
|
||||
{
|
||||
return GetBytesValue(type, (unsigned char *)value, length);
|
||||
}
|
||||
|
||||
bool DiscoveryDeviceInfo::GetDevNameValue(int type, char *value, int &length) const
|
||||
{
|
||||
return GetBytesValue(type, (unsigned char *)value, length);
|
||||
}
|
||||
|
||||
bool DiscoveryDeviceInfo::GetDevIpValue(int type, char *value, int &length) const
|
||||
{
|
||||
return GetBytesValue(type, (unsigned char *)value, length);
|
||||
}
|
||||
|
||||
bool DiscoveryDeviceInfo::GetDevPortValue(int type, int &value) const
|
||||
{
|
||||
std::map<int, Tlv *>::const_iterator itor = mTlvMap.find(type);
|
||||
if (itor != mTlvMap.end()) {
|
||||
value = ntohl((*(int *)(itor->second->GetValue())));
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool DiscoveryDeviceInfo::GetBytesValue(int type, unsigned char *value, int &length) const
|
||||
{
|
||||
std::map<int, Tlv *>::const_iterator itor = mTlvMap.find(type);
|
||||
if (itor == mTlvMap.end()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (length < itor->second->GetLength()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
memset(value, 0, length);
|
||||
length = itor->second->GetLength();
|
||||
memcpy(value, itor->second->GetValue(), length);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool DiscoveryDeviceInfo::GetObjectValue(int type, DiscoveryDeviceInfo &value) const
|
||||
{
|
||||
std::map<int, Tlv *>::const_iterator itor = mTlvMap.find(type);
|
||||
if (itor == mTlvMap.end()) {
|
||||
return false;
|
||||
}
|
||||
return value.Parse(itor->second->GetValue(), itor->second->GetLength());
|
||||
}
|
||||
|
||||
int DiscoveryDeviceInfo::GetTLVList(std::vector<int> &list) const
|
||||
{
|
||||
std::map<int, Tlv *>::const_iterator iter;
|
||||
for (iter = mTlvMap.begin(); iter != mTlvMap.end(); iter++) {
|
||||
list.push_back(iter->first);
|
||||
}
|
||||
return list.size();
|
||||
}
|
||||
|
||||
} // namespace tlv
|
|
@ -0,0 +1,68 @@
|
|||
#ifndef KYLIN_MOBILE_ASSISTANT_DISCDEVICEINFO_H
|
||||
#define KYLIN_MOBILE_ASSISTANT_DISCDEVICEINFO_H
|
||||
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include <map>
|
||||
|
||||
namespace tlv
|
||||
{
|
||||
enum InfoType { DEVICE_ALL = 1, DEVICE_UUID = 2, DEVICE_TYPE = 3, DEVICE_NAME = 4, DEVICE_IP = 5, DEVICE_PORT = 6 };
|
||||
|
||||
class Tlv;
|
||||
class DiscoveryDeviceInfo
|
||||
{
|
||||
|
||||
public:
|
||||
DiscoveryDeviceInfo();
|
||||
virtual ~DiscoveryDeviceInfo();
|
||||
|
||||
private:
|
||||
DiscoveryDeviceInfo(const DiscoveryDeviceInfo &c);
|
||||
DiscoveryDeviceInfo &operator=(const DiscoveryDeviceInfo &c);
|
||||
|
||||
public:
|
||||
// put one TLV object
|
||||
bool PutRequestValue(int type, int value);
|
||||
|
||||
bool PutObjectValue(int type, const DiscoveryDeviceInfo &value);
|
||||
|
||||
// do encode
|
||||
bool Serialize();
|
||||
|
||||
// access encoded buffer and length
|
||||
unsigned char *GetSerializedBuffer() const;
|
||||
int GetSerializedBytes() const;
|
||||
|
||||
// returns number of TLVs in TlvBox, along with a vector of the types
|
||||
int GetTLVList(std::vector<int> &list) const;
|
||||
|
||||
public:
|
||||
// do decode
|
||||
bool Parse(const unsigned char *buffer, int buffersize);
|
||||
|
||||
// get one TLV object
|
||||
bool GetBytesValue(int type, unsigned char *value, int &length) const;
|
||||
|
||||
bool GetResponseValue(int type, int &value) const;
|
||||
bool GetUuidValue(int type, char *value, int &length) const;
|
||||
bool GetDevTypeValue(int type, int &value) const;
|
||||
bool GetDevNameValue(int type, char *value, int &length) const;
|
||||
bool GetDevIpValue(int type, char *value, int &length) const;
|
||||
bool GetDevPortValue(int type, int &value) const;
|
||||
|
||||
bool GetObjectValue(int type, DiscoveryDeviceInfo &value) const;
|
||||
|
||||
private:
|
||||
bool PutValue(Tlv *value);
|
||||
|
||||
private:
|
||||
std::map<int, Tlv *> mTlvMap;
|
||||
unsigned char *mSerializedBuffer = nullptr;
|
||||
int mSerializedBytes = 0;
|
||||
};
|
||||
|
||||
} // namespace tlv
|
||||
// #endif
|
||||
|
||||
#endif // KYLIN_MOBILE_ASSISTANT_DISCDEVICEINFO_H
|
|
@ -0,0 +1,192 @@
|
|||
//
|
||||
// Created by sqp on 2022/4/26.
|
||||
//
|
||||
|
||||
#include "discovery.h"
|
||||
|
||||
#include <QLocalSocket>
|
||||
#include <QDataStream>
|
||||
#include <QRandomGenerator>
|
||||
#include "generatetools.h"
|
||||
#include "unix-util.h"
|
||||
|
||||
namespace KMobileDiscovery
|
||||
{
|
||||
const char *SERVER_UNIX_SOCKET_ADDR = "/tmp/kylin.deviceDiscover.socket";
|
||||
const int BUF_LEN = 1024;
|
||||
|
||||
using namespace tlv;
|
||||
|
||||
Discovery::Discovery(QObject *parent) : QObject(parent)
|
||||
{
|
||||
m_socket = new QLocalSocket(this);
|
||||
connect(m_socket, &QLocalSocket::readyRead, this, &Discovery::onReadyRead);
|
||||
connect(m_socket, &QLocalSocket::disconnected, m_socket, &QLocalSocket::deleteLater);
|
||||
}
|
||||
|
||||
Discovery::~Discovery() noexcept
|
||||
{
|
||||
qInfo() << "~Discovery()";
|
||||
// stopDiscovery();
|
||||
}
|
||||
|
||||
void Discovery::startDiscovery()
|
||||
{
|
||||
qInfo() << "start discovery";
|
||||
m_socket->connectToServer(SERVER_UNIX_SOCKET_ADDR);
|
||||
GenerateTools::delayMs(200);
|
||||
sendRequest(START_DISCOVERY);
|
||||
}
|
||||
|
||||
void Discovery::stopDiscovery()
|
||||
{
|
||||
qInfo() << "stop discovery";
|
||||
|
||||
sendRequest(STOP_DISCOVERY);
|
||||
|
||||
GenerateTools::delayMs(100);
|
||||
|
||||
// m_socket->close();
|
||||
m_discoveryDeviceInfo.clear();
|
||||
}
|
||||
|
||||
void Discovery::onReadyRead()
|
||||
{
|
||||
char buf[BUF_LEN];
|
||||
int len = m_socket->read(buf, BUF_LEN);
|
||||
if (len < 0) {
|
||||
qWarning() << "recv device info fail";
|
||||
}
|
||||
getDeviceInfo(buf, len);
|
||||
}
|
||||
|
||||
void Discovery::getDeviceInfo(char *buf, qint64 len)
|
||||
{
|
||||
DiscoveryDeviceInfo parsedBoxes;
|
||||
if (!parsedBoxes.Parse((unsigned char *)buf, len)) {
|
||||
qWarning() << "DiscoveryDeviceInfo Parse Failed !\n";
|
||||
return;
|
||||
}
|
||||
|
||||
DiscoveryDeviceInfo parsedBox;
|
||||
if (!parsedBoxes.GetObjectValue(RESPONSE, parsedBox)) {
|
||||
qWarning() << "GetObjectValue Failed !\n";
|
||||
return;
|
||||
}
|
||||
|
||||
int value;
|
||||
if (!parsedBox.GetResponseValue(RESPONSE, value)) {
|
||||
qWarning() << "GetResponseValue Failed !\n";
|
||||
return;
|
||||
}
|
||||
|
||||
switch (value) {
|
||||
|
||||
case DEVICE_INFO: {
|
||||
|
||||
{
|
||||
char value[128];
|
||||
int length = 128;
|
||||
if (!parsedBox.GetUuidValue(DEVICE_UUID, value, length)) {
|
||||
qWarning() << "GetUuidValue Failed !\n";
|
||||
return;
|
||||
}
|
||||
qInfo() << "GetUuidValue Success " << value;
|
||||
m_uuid = value;
|
||||
}
|
||||
|
||||
{
|
||||
int value;
|
||||
if (!parsedBox.GetDevTypeValue(DEVICE_TYPE, value)) {
|
||||
qWarning() << "GetDevTypeValue Failed !\n";
|
||||
return;
|
||||
}
|
||||
qInfo() << "GetDevTypeValue Success " << value;
|
||||
m_devType = value;
|
||||
}
|
||||
|
||||
{
|
||||
char value[128];
|
||||
int length = 128;
|
||||
if (!parsedBox.GetDevNameValue(DEVICE_NAME, value, length)) {
|
||||
qWarning() << "GetDevNameValue Failed !\n";
|
||||
return;
|
||||
}
|
||||
qInfo() << "GetDevNameValue Success " << value;
|
||||
m_deviceName = value;
|
||||
}
|
||||
|
||||
{
|
||||
char value[128];
|
||||
int length = 128;
|
||||
if (!parsedBox.GetDevIpValue(DEVICE_IP, value, length)) {
|
||||
qWarning() << "GetDevIpValue Failed !\n";
|
||||
return;
|
||||
}
|
||||
qInfo() << "GetDevIpValue Success " << value;
|
||||
m_clientIp = value;
|
||||
}
|
||||
|
||||
{
|
||||
int value;
|
||||
if (!parsedBox.GetDevPortValue(DEVICE_PORT, value)) {
|
||||
qWarning() << "GetDevPortValue Failed !\n";
|
||||
return;
|
||||
}
|
||||
qInfo() << "GetDevPortValue Success " << value;
|
||||
m_clientport = value;
|
||||
}
|
||||
|
||||
if (!m_currentDeviceIpList.contains(m_clientIp)) {
|
||||
getClientInfo();
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void Discovery::getClientInfo()
|
||||
{
|
||||
KMobileCommon::DiscoveryDeviceInfo deviceInfo;
|
||||
|
||||
deviceInfo.ip = m_clientIp;
|
||||
deviceInfo.port = m_clientport;
|
||||
deviceInfo.uuid = m_uuid;
|
||||
deviceInfo.deviceType = m_devType;
|
||||
deviceInfo.deviceName = m_deviceName;
|
||||
|
||||
if (!m_discoveryDeviceInfo.contains(m_clientIp)) {
|
||||
m_discoveryDeviceInfo.insert(m_clientIp, deviceInfo);
|
||||
Q_EMIT sigAllDeviceInfo(m_discoveryDeviceInfo);
|
||||
}
|
||||
}
|
||||
|
||||
void Discovery::sendRequest(RequestType type)
|
||||
{
|
||||
DiscoveryDeviceInfo requestMsg;
|
||||
|
||||
requestMsg.PutRequestValue(REQUEST, type);
|
||||
|
||||
if (!requestMsg.Serialize()) {
|
||||
qWarning() << "requestMsg Serialize Failed !\n";
|
||||
return;
|
||||
}
|
||||
|
||||
DiscoveryDeviceInfo request;
|
||||
request.PutObjectValue(REQUEST, requestMsg);
|
||||
|
||||
if (!request.Serialize()) {
|
||||
qWarning() << "REQUEST Serialize Failed !\n";
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_socket) {
|
||||
if ((m_socket->write((const char *)request.GetSerializedBuffer(), request.GetSerializedBytes())) < 0) {
|
||||
qWarning() << "send request fail";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace KMobileDiscovery
|
|
@ -0,0 +1,54 @@
|
|||
//
|
||||
// Created by sqp on 2022/4/26.
|
||||
//
|
||||
|
||||
#ifndef KYLIN_MOBILE_ASSISTANT_DISCOVERY_H
|
||||
#define KYLIN_MOBILE_ASSISTANT_DISCOVERY_H
|
||||
|
||||
#include <QUdpSocket>
|
||||
#include <QLocalServer>
|
||||
#include <QList>
|
||||
#include <QTimer>
|
||||
|
||||
#include <thread>
|
||||
#include "util.h"
|
||||
#include "discdeviceinfo.h"
|
||||
#include "unix-util.h"
|
||||
|
||||
namespace KMobileDiscovery
|
||||
{
|
||||
class Discovery : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
Discovery(QObject *parent = nullptr);
|
||||
~Discovery();
|
||||
void startDiscovery();
|
||||
void stopDiscovery();
|
||||
void sendRequest(RequestType type);
|
||||
|
||||
Q_SIGNALS:
|
||||
void sigAllDeviceInfo(const QMap<QString, KMobileCommon::DiscoveryDeviceInfo> &deviceInfo);
|
||||
|
||||
private Q_SLOTS:
|
||||
void onReadyRead();
|
||||
|
||||
private:
|
||||
void getClientInfo();
|
||||
void getDeviceInfo(char *buf, qint64 len);
|
||||
|
||||
|
||||
private:
|
||||
QLocalSocket *m_socket = nullptr;
|
||||
|
||||
QString m_clientIp;
|
||||
quint16 m_clientport; //端口号
|
||||
QString m_deviceName;
|
||||
QString m_uuid;
|
||||
quint16 m_devType;
|
||||
QList<QString> m_currentDeviceIpList;
|
||||
QMap<QString, KMobileCommon::DiscoveryDeviceInfo> m_discoveryDeviceInfo;
|
||||
};
|
||||
} // namespace KMobileDiscovery
|
||||
|
||||
#endif // KYLIN_MOBILE_ASSISTANT_DISCOVERY_H
|
|
@ -0,0 +1,100 @@
|
|||
|
||||
#include <string.h>
|
||||
#include "tlv.h"
|
||||
|
||||
namespace tlv
|
||||
{
|
||||
|
||||
Tlv::Tlv(int type) : mType(type)
|
||||
{
|
||||
Initialize(nullptr, 0);
|
||||
}
|
||||
|
||||
Tlv::Tlv(int type, bool value) : mType(type)
|
||||
{
|
||||
Initialize(&value, sizeof(bool));
|
||||
}
|
||||
|
||||
Tlv::Tlv(int type, char value) : mType(type)
|
||||
{
|
||||
Initialize(&value, sizeof(char));
|
||||
}
|
||||
|
||||
Tlv::Tlv(int type, short value) : mType(type)
|
||||
{
|
||||
Initialize(&value, sizeof(short));
|
||||
}
|
||||
|
||||
Tlv::Tlv(int type, int value) : mType(type)
|
||||
{
|
||||
Initialize(&value, sizeof(int));
|
||||
}
|
||||
|
||||
Tlv::Tlv(int type, long value) : mType(type)
|
||||
{
|
||||
Initialize(&value, sizeof(long));
|
||||
}
|
||||
|
||||
Tlv::Tlv(int type, long long value) : mType(type)
|
||||
{
|
||||
Initialize(&value, sizeof(long long));
|
||||
}
|
||||
|
||||
Tlv::Tlv(int type, float value) : mType(type)
|
||||
{
|
||||
Initialize(&value, sizeof(float));
|
||||
}
|
||||
|
||||
Tlv::Tlv(int type, double value) : mType(type)
|
||||
{
|
||||
Initialize(&value, sizeof(double));
|
||||
}
|
||||
|
||||
Tlv::Tlv(int type, char *value) : mType(type)
|
||||
{
|
||||
Initialize(value, strlen(value) + 1);
|
||||
}
|
||||
|
||||
Tlv::Tlv(int type, std::string value) : mType(type)
|
||||
{
|
||||
Initialize(value.c_str(), value.size() + 1);
|
||||
}
|
||||
|
||||
Tlv::Tlv(int type, unsigned char *value, int length) : mType(type)
|
||||
{
|
||||
Initialize(value, length);
|
||||
}
|
||||
|
||||
Tlv::Tlv(int type, const Tlv &value) : mType(type)
|
||||
{
|
||||
Initialize(value.GetValue(), value.GetLength());
|
||||
}
|
||||
|
||||
Tlv::~Tlv()
|
||||
{
|
||||
delete[] mValue;
|
||||
}
|
||||
|
||||
void Tlv::Initialize(const void *value, int length)
|
||||
{
|
||||
mLength = length;
|
||||
mValue = new unsigned char[length];
|
||||
memcpy(mValue, value, length);
|
||||
}
|
||||
|
||||
int Tlv::GetType() const
|
||||
{
|
||||
return mType;
|
||||
}
|
||||
|
||||
int Tlv::GetLength() const
|
||||
{
|
||||
return mLength;
|
||||
}
|
||||
|
||||
unsigned char *Tlv::GetValue() const
|
||||
{
|
||||
return mValue;
|
||||
}
|
||||
|
||||
} // namespace tlv
|
|
@ -0,0 +1,46 @@
|
|||
|
||||
#ifndef KYLIN_MOBILE_ASSISTANT_TLV_H
|
||||
#define KYLIN_MOBILE_ASSISTANT_TLV_H
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace tlv
|
||||
{
|
||||
|
||||
class Tlv
|
||||
{
|
||||
public:
|
||||
Tlv(int type);
|
||||
Tlv(int type, bool value);
|
||||
Tlv(int type, char value);
|
||||
Tlv(int type, short value);
|
||||
Tlv(int type, int value);
|
||||
Tlv(int type, long value);
|
||||
Tlv(int type, long long value);
|
||||
Tlv(int type, float value);
|
||||
Tlv(int type, double value);
|
||||
Tlv(int type, char *value);
|
||||
Tlv(int type, std::string value);
|
||||
Tlv(int type, unsigned char *value, int length);
|
||||
Tlv(int type, const Tlv &value);
|
||||
~Tlv();
|
||||
|
||||
public:
|
||||
int GetType() const;
|
||||
int GetLength() const;
|
||||
unsigned char *GetValue() const;
|
||||
|
||||
private:
|
||||
Tlv(const Tlv &c);
|
||||
Tlv &operator=(const Tlv &c);
|
||||
void Initialize(const void *value, int length);
|
||||
|
||||
private:
|
||||
int mType;
|
||||
int mLength;
|
||||
unsigned char *mValue;
|
||||
};
|
||||
|
||||
} // namespace tlv
|
||||
|
||||
#endif // KYLIN_MOBILE_ASSISTANT_TLV_H
|
|
@ -0,0 +1,45 @@
|
|||
//
|
||||
// Created by sqp on 2022/6/22.
|
||||
//
|
||||
|
||||
#ifndef KYLIN_MOBILE_ASSISTANT_UNIX_UTIL_H
|
||||
#define KYLIN_MOBILE_ASSISTANT_UNIX_UTIL_H
|
||||
|
||||
namespace KMobileDiscovery
|
||||
{
|
||||
enum MessageType
|
||||
{
|
||||
REQUEST = 1,
|
||||
RESPONSE = 2,
|
||||
|
||||
DEVICE_UUID = 3,
|
||||
DEVICE_TYPE = 4,
|
||||
DEVICE_NAME = 5,
|
||||
DEVICE_IP = 6,
|
||||
DEVICE_PORT = 7,
|
||||
};
|
||||
|
||||
enum RequestType
|
||||
{
|
||||
START_DISCOVERY = 1,
|
||||
STOP_DISCOVERY = 2,
|
||||
};
|
||||
|
||||
enum ReponseType
|
||||
{
|
||||
DEVICE_INFO = 1
|
||||
};
|
||||
|
||||
enum ErrorType
|
||||
{
|
||||
SOCKET_CREATE_ERROR = -1,
|
||||
BIND_ERROR = -2,
|
||||
LISTEN_ERROR = -3,
|
||||
ACCEPT_ERROR = -4,
|
||||
CONNECT_ERROR = -5,
|
||||
SEND_ERROR = -6,
|
||||
RECV_ERROR = -7
|
||||
};
|
||||
} // namespace KMobileDiscovery
|
||||
|
||||
#endif // KYLIN_MOBILE_ASSISTANT_UNIX_UTIL_H
|
|
@ -0,0 +1,65 @@
|
|||
cmake_minimum_required(VERSION 3.10.2)
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
project("dsoftbus")
|
||||
|
||||
#set(CMAKE_OBJECT_PATH_MAX 500)
|
||||
set(DSOFTBUS_ROOT ${CMAKE_SOURCE_DIR}/dsoftbus/dsoftbus_build)
|
||||
set(dsoftbus_root_path "${DSOFTBUS_ROOT}/foundation/communication/dsoftbus")
|
||||
add_subdirectory(dsoftbus_build)
|
||||
|
||||
|
||||
add_executable(mobile_softbus_server server.cpp)
|
||||
SET(EXECUTABLE_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/output/bin)
|
||||
|
||||
target_include_directories (
|
||||
mobile_softbus_server
|
||||
PRIVATE
|
||||
${common_inc_dir}
|
||||
includes
|
||||
"${dsoftbus_root_path}/core/frame/common/include"
|
||||
)
|
||||
|
||||
|
||||
|
||||
target_link_libraries (
|
||||
mobile_softbus_server
|
||||
|
||||
softbus_server
|
||||
softbus_adapter
|
||||
dsoftbus_bus_center_monitor
|
||||
dsoftbus_auth_server
|
||||
dsoftbus_bus_center_ledger
|
||||
dsoftbus_bus_center_hub
|
||||
dsoftbus_bus_center_utils
|
||||
dsoftbus_bus_center_server
|
||||
softbus_log
|
||||
message_handler
|
||||
softbus_property
|
||||
softbus_utils
|
||||
json_utils
|
||||
softbus_permission
|
||||
conn_common
|
||||
conn_manager
|
||||
ble_connection
|
||||
br_connection
|
||||
tcp_connection
|
||||
dsoftbus_disc_server
|
||||
ble_discovery
|
||||
dsoftbus_disc_coap
|
||||
softbus_server_data
|
||||
dsoftbus_trans_session
|
||||
dsoftbus_trans_ipc_proxy
|
||||
dsoftbus_trans_proxy_channel
|
||||
dsoftbus_trans_udp_channel
|
||||
dsoftbus_trans_direct_channel
|
||||
softbus_trans_pending
|
||||
dsoftbus_trans_common
|
||||
nstackx_ctrl
|
||||
nstackx_util.open
|
||||
libcoap
|
||||
libhilog
|
||||
ipc_core
|
||||
deviceauth_sdk
|
||||
pthread
|
||||
rt
|
||||
)
|
|
@ -0,0 +1 @@
|
|||
/out/
|
|
@ -0,0 +1,18 @@
|
|||
set(dsoftbus_root_path "${DSOFTBUS_ROOT}/foundation/communication/dsoftbus")
|
||||
set(dsoftbus_sdk_path "${DSOFTBUS_ROOT}/foundation/communication/dsoftbus/sdk")
|
||||
set(dsoftbus_core_path "${DSOFTBUS_ROOT}/foundation/communication/dsoftbus/core")
|
||||
set(hispark_pegasus_sdk_path "${DSOFTBUS_ROOT}/device/hisilicon/hispark_pegasus/sdk_liteos")
|
||||
set(softbus_adapter_common "${DSOFTBUS_ROOT}/foundation/communication/dsoftbus/adapter/common")
|
||||
set(softbus_adapter_config "${DSOFTBUS_ROOT}/foundation/communication/dsoftbus/adapter/default_config")
|
||||
|
||||
|
||||
set(common_log_inc
|
||||
"${DSOFTBUS_ROOT}/depend/hilog/include"
|
||||
"${DSOFTBUS_ROOT}/third_party/bounds_checking_function/include"
|
||||
)
|
||||
|
||||
add_subdirectory(third_party)
|
||||
add_subdirectory(depend)
|
||||
add_subdirectory(utils)
|
||||
|
||||
add_subdirectory(foundation)
|
|
@ -0,0 +1,577 @@
|
|||
++++++++++++++++++++++++++++++++++++++++
|
||||
2022-05-16 11:28:55
|
||||
--product-name openEuler
|
||||
[33m OS version 21.10 is not supported for ohos build.[0m
|
||||
[33m Avaliable OS version are 18.04, 20.04.[0m
|
||||
build standard system...
|
||||
---------------------------------------
|
||||
--product-name openEuler --device-name openEuler --target-os ohos --target-cpu arm64
|
||||
build_ohos_cmd: build/build_scripts/build_ohos.sh product_name=openEuler target_os=ohos target_cpu=arm64 gn_args=is_standard_system=true build_target=images
|
||||
++++++++++++++++++++++++++++++++++++++++
|
||||
2022-05-16 11:28:55
|
||||
product_name=openEuler target_os=ohos target_cpu=arm64 gn_args=is_standard_system=true build_target=images
|
||||
pre_process
|
||||
Python 3.9.7
|
||||
OPTIONS=product_name
|
||||
PARAM=openEuler
|
||||
-------------------
|
||||
OPTIONS=target_os
|
||||
PARAM=ohos
|
||||
-------------------
|
||||
OPTIONS=target_cpu
|
||||
PARAM=arm64
|
||||
-------------------
|
||||
OPTIONS=gn_args
|
||||
PARAM=is_standard_system=true
|
||||
-------------------
|
||||
OPTIONS=build_target
|
||||
PARAM=images
|
||||
-------------------
|
||||
product_name=openEuler target_os=ohos target_cpu=arm64 gn_args=is_standard_system=true build_target=images
|
||||
root_out_dir=//out/ohos-arm64-release
|
||||
root_build_dir=//out/ohos-arm64-release
|
||||
root_gen_dir=//out/ohos-arm64-release/gen
|
||||
current_toolchain=//build/toolchain/linux:arm64
|
||||
host_toolchain=//build/toolchain/linux:x64
|
||||
|
||||
args: Namespace(platforms_config_file='/home/usr1/openeuler/src/dsoftbus_build/out/build_configs/standard_system/platforms.build', subsystem_config_file='/home/usr1/openeuler/src/dsoftbus_build/out/build_configs/subsystem_config.json', example_subsystem_file=None, source_root_dir='/home/usr1/openeuler/src/dsoftbus_build/', gn_root_out_dir='/home/usr1/openeuler/src/dsoftbus_build/out/ohos-arm64-release', build_platform_name='phone', build_xts=False, target_os='ohos', target_cpu='arm64', ignore_api_check=['xts', 'common', 'subsystem_examples'], scalable_build=False)
|
||||
|
||||
build configs generation is complete.
|
||||
Done. Made 197 targets from 97 files in 759ms
|
||||
Starting Ninja...
|
||||
python version: Python 3.9.7
|
||||
build_target: images
|
||||
ninja: Entering directory `/home/usr1/openeuler/src/dsoftbus_build/out/ohos-arm64-release'
|
||||
[1/515] STAMP obj/build/config/common_deps.stamp
|
||||
[2/515] STAMP obj/build/config/source_set_deps.stamp
|
||||
[3/515] STAMP obj/build/config/static_library_deps.stamp
|
||||
[4/515] STAMP obj/depend/appexecfwk_core.stamp
|
||||
[5/515] STAMP obj/depend/cesfwk_innerkits.stamp
|
||||
[6/515] STAMP obj/depend/want.stamp
|
||||
[7/515] STAMP obj/depend/libpermissionsdk_standard.stamp
|
||||
[8/515] STAMP obj/build/config/executable_deps.stamp
|
||||
[9/515] STAMP obj/build/config/shared_library_deps.stamp
|
||||
[10/515] STAMP obj/depend/samgr_proxy.stamp
|
||||
[11/515] STAMP obj/depend/system_ability_fwk.stamp
|
||||
[12/515] STAMP obj/utils/native/base/utilsecurec_shared.stamp
|
||||
[13/515] ACTION //foundation/communication/dsoftbus/components/nstackx/nstackx_util:nstackx_util.open__notice(//build/toolchain/linux:arm64)
|
||||
[14/515] ACTION //depend:deviceauth_sdk__notice(//build/toolchain/linux:arm64)
|
||||
[15/515] ACTION //depend:libhilog__notice(//build/toolchain/linux:arm64)
|
||||
[16/515] ACTION //foundation/communication/dsoftbus/adapter:softbus_adapter__notice(//build/toolchain/linux:arm64)
|
||||
[17/515] ACTION //depend:ipc_core__notice(//build/toolchain/linux:arm64)
|
||||
[18/515] ACTION //foundation/communication/dsoftbus/components/nstackx/nstackx_ctrl:nstackx_ctrl__notice(//build/toolchain/linux:arm64)
|
||||
[19/515] STAMP obj/foundation/communication/dsoftbus/components/nstackx/nstackx_util/nstackx_util.open__notice.stamp
|
||||
[20/515] STAMP obj/depend/deviceauth_sdk__notice.stamp
|
||||
[21/515] ACTION //foundation/communication/dsoftbus/components/mbedtls:mbedtls_shared__notice(//build/toolchain/linux:arm64)
|
||||
[22/515] STAMP obj/depend/libhilog__notice.stamp
|
||||
[23/515] ACTION //foundation/communication/dsoftbus/adapter/common/bus_center:dsoftbus_bus_center_monitor__notice(//build/toolchain/linux:arm64)
|
||||
[24/515] STAMP obj/foundation/communication/dsoftbus/adapter/softbus_adapter__notice.stamp
|
||||
[25/515] STAMP obj/depend/ipc_core__notice.stamp
|
||||
[26/515] STAMP obj/foundation/communication/dsoftbus/components/nstackx/nstackx_ctrl/nstackx_ctrl__notice.stamp
|
||||
[27/515] STAMP obj/foundation/communication/dsoftbus/components/mbedtls/mbedtls_shared__notice.stamp
|
||||
[28/515] STAMP obj/foundation/communication/dsoftbus/adapter/common/bus_center/dsoftbus_bus_center_monitor__notice.stamp
|
||||
[29/515] CC obj/third_party/mbedtls/library/mbedtls_shared/aesni.o
|
||||
[30/515] CC obj/depend/device_auth/deviceauth_sdk/device_auth.o
|
||||
[31/515] ACTION //foundation/communication/dsoftbus/core/bus_center/lnn/lane_hub:dsoftbus_bus_center_hub__notice(//build/toolchain/linux:arm64)
|
||||
[32/515] ACTION //foundation/communication/dsoftbus/core/bus_center:dsoftbus_bus_center_server__notice(//build/toolchain/linux:arm64)
|
||||
[33/515] ACTION //foundation/communication/dsoftbus/core/bus_center/lnn/net_ledger:dsoftbus_bus_center_ledger__notice(//build/toolchain/linux:arm64)
|
||||
[34/515] ACTION //foundation/communication/dsoftbus/core/common/json_utils:json_utils__notice(//build/toolchain/linux:arm64)
|
||||
[35/515] ACTION //foundation/communication/dsoftbus/core/authentication:dsoftbus_auth_server__notice(//build/toolchain/linux:arm64)
|
||||
[36/515] CC obj/third_party/mbedtls/library/mbedtls_shared/arc4.o
|
||||
[37/515] ACTION //foundation/communication/dsoftbus/core/bus_center/utils:dsoftbus_bus_center_utils__notice(//build/toolchain/linux:arm64)
|
||||
[38/515] CC obj/third_party/mbedtls/library/mbedtls_shared/aria.o
|
||||
[39/515] SOLINK common/common/libhilog.z.so
|
||||
[40/515] CC obj/third_party/mbedtls/library/mbedtls_shared/camellia.o
|
||||
[41/515] CC obj/third_party/mbedtls/library/mbedtls_shared/blowfish.o
|
||||
[42/515] CC obj/third_party/mbedtls/library/mbedtls_shared/ccm.o
|
||||
[43/515] CC obj/third_party/mbedtls/library/mbedtls_shared/base64.o
|
||||
[44/515] CC obj/third_party/mbedtls/library/mbedtls_shared/asn1parse.o
|
||||
[45/515] CC obj/third_party/mbedtls/library/mbedtls_shared/chacha20.o
|
||||
[46/515] CC obj/third_party/mbedtls/library/mbedtls_shared/asn1write.o
|
||||
[47/515] CC obj/third_party/mbedtls/library/mbedtls_shared/cmac.o
|
||||
[48/515] CC obj/third_party/mbedtls/library/mbedtls_shared/chachapoly.o
|
||||
[49/515] SOLINK common/common/libdeviceauth_sdk.z.so
|
||||
[50/515] CC obj/third_party/mbedtls/library/mbedtls_shared/des.o
|
||||
[51/515] CC obj/third_party/mbedtls/library/mbedtls_shared/dhm.o
|
||||
[52/515] CC obj/third_party/mbedtls/library/mbedtls_shared/cipher_wrap.o
|
||||
[53/515] CC obj/third_party/mbedtls/library/mbedtls_shared/ecjpake.o
|
||||
[54/515] CC obj/third_party/mbedtls/library/mbedtls_shared/ecdh.o
|
||||
[55/515] CC obj/third_party/mbedtls/library/mbedtls_shared/aes.o
|
||||
[56/515] CC obj/third_party/mbedtls/library/mbedtls_shared/ctr_drbg.o
|
||||
[57/515] CC obj/third_party/mbedtls/library/mbedtls_shared/entropy_poll.o
|
||||
[58/515] CC obj/third_party/mbedtls/library/mbedtls_shared/error.o
|
||||
[59/515] CC obj/third_party/mbedtls/library/mbedtls_shared/ecdsa.o
|
||||
[60/515] CC obj/third_party/mbedtls/library/mbedtls_shared/entropy.o
|
||||
[61/515] CC obj/third_party/mbedtls/library/mbedtls_shared/havege.o
|
||||
[62/515] CC obj/third_party/mbedtls/library/mbedtls_shared/hmac_drbg.o
|
||||
[63/515] CC obj/third_party/mbedtls/library/mbedtls_shared/cipher.o
|
||||
[64/515] CC obj/third_party/mbedtls/library/mbedtls_shared/md2.o
|
||||
[65/515] CC obj/third_party/mbedtls/library/mbedtls_shared/md4.o
|
||||
[66/515] CC obj/third_party/mbedtls/library/mbedtls_shared/hkdf.o
|
||||
[67/515] CC obj/third_party/mbedtls/library/mbedtls_shared/gcm.o
|
||||
[68/515] CC obj/third_party/mbedtls/library/mbedtls_shared/memory_buffer_alloc.o
|
||||
[69/515] CC obj/third_party/mbedtls/library/mbedtls_shared/md_wrap.o
|
||||
[70/515] CC obj/third_party/mbedtls/library/mbedtls_shared/md.o
|
||||
[71/515] CC obj/third_party/mbedtls/library/mbedtls_shared/nist_kw.o
|
||||
[72/515] CC obj/third_party/mbedtls/library/mbedtls_shared/padlock.o
|
||||
[73/515] CC obj/third_party/mbedtls/library/mbedtls_shared/md5.o
|
||||
[74/515] CC obj/third_party/mbedtls/library/mbedtls_shared/pkcs12.o
|
||||
[75/515] CC obj/third_party/mbedtls/library/mbedtls_shared/oid.o
|
||||
[76/515] CC obj/third_party/mbedtls/library/mbedtls_shared/pem.o
|
||||
[77/515] CC obj/third_party/mbedtls/library/mbedtls_shared/net_sockets.o
|
||||
[78/515] CC obj/third_party/mbedtls/library/mbedtls_shared/pk.o
|
||||
[79/515] CC obj/third_party/mbedtls/library/mbedtls_shared/pkcs5.o
|
||||
[80/515] CC obj/third_party/mbedtls/library/mbedtls_shared/platform.o
|
||||
[81/515] CC obj/third_party/mbedtls/library/mbedtls_shared/ripemd160.o
|
||||
[82/515] CC obj/third_party/mbedtls/library/mbedtls_shared/ecp_curves.o
|
||||
[83/515] CC obj/third_party/mbedtls/library/mbedtls_shared/pk_wrap.o
|
||||
[84/515] CC obj/third_party/mbedtls/library/mbedtls_shared/platform_util.o
|
||||
[85/515] CC obj/third_party/mbedtls/library/mbedtls_shared/pkwrite.o
|
||||
[86/515] CC obj/third_party/mbedtls/library/mbedtls_shared/poly1305.o
|
||||
[87/515] CC obj/third_party/mbedtls/library/mbedtls_shared/rsa_internal.o
|
||||
[88/515] CC obj/third_party/mbedtls/library/mbedtls_shared/ssl_ciphersuites.o
|
||||
[89/515] CC obj/third_party/mbedtls/library/mbedtls_shared/threading.o
|
||||
[90/515] CC obj/third_party/mbedtls/library/mbedtls_shared/sha256.o
|
||||
[91/515] CC obj/third_party/mbedtls/library/mbedtls_shared/sha512.o
|
||||
[92/515] CC obj/third_party/mbedtls/library/mbedtls_shared/ecp.o
|
||||
[93/515] CC obj/third_party/mbedtls/library/mbedtls_shared/version.o
|
||||
[94/515] CC obj/third_party/mbedtls/library/mbedtls_shared/pkparse.o
|
||||
[95/515] CC obj/third_party/mbedtls/library/mbedtls_shared/bignum.o
|
||||
[96/515] CC obj/third_party/mbedtls/library/mbedtls_shared/timing.o
|
||||
[97/515] CC obj/third_party/mbedtls/library/mbedtls_shared/version_features.o
|
||||
[98/515] STAMP obj/foundation/communication/dsoftbus/core/authentication/dsoftbus_auth_server__notice.stamp
|
||||
[99/515] STAMP obj/foundation/communication/dsoftbus/core/bus_center/lnn/lane_hub/dsoftbus_bus_center_hub__notice.stamp
|
||||
[100/515] STAMP obj/foundation/communication/dsoftbus/core/bus_center/dsoftbus_bus_center_server__notice.stamp
|
||||
[101/515] STAMP obj/foundation/communication/dsoftbus/core/bus_center/utils/dsoftbus_bus_center_utils__notice.stamp
|
||||
[102/515] STAMP obj/foundation/communication/dsoftbus/core/bus_center/lnn/net_ledger/dsoftbus_bus_center_ledger__notice.stamp
|
||||
[103/515] STAMP obj/foundation/communication/dsoftbus/core/common/json_utils/json_utils__notice.stamp
|
||||
[104/515] CC obj/third_party/mbedtls/library/mbedtls_shared/sha1.o
|
||||
[105/515] CC obj/third_party/mbedtls/library/mbedtls_shared/xtea.o
|
||||
[106/515] ACTION //foundation/communication/dsoftbus/core/common/log:softbus_log__notice(//build/toolchain/linux:arm64)
|
||||
[107/515] STAMP obj/foundation/communication/dsoftbus/core/common/log/softbus_log__notice.stamp
|
||||
[108/515] ACTION //foundation/communication/dsoftbus/core/common/message_handler:message_handler__notice(//build/toolchain/linux:arm64)
|
||||
[109/515] CC obj/third_party/mbedtls/library/mbedtls_shared/x509_crl.o
|
||||
[110/515] STAMP obj/foundation/communication/dsoftbus/core/common/message_handler/message_handler__notice.stamp
|
||||
[111/515] CC obj/third_party/mbedtls/library/mbedtls_shared/x509.o
|
||||
[112/515] ACTION //foundation/communication/dsoftbus/core/common/security/permission:softbus_permission_json__notice(//build/toolchain/linux:arm64)
|
||||
[113/515] ACTION //foundation/communication/dsoftbus/core/common/security/permission:softbus_permission__notice(//build/toolchain/linux:arm64)
|
||||
[114/515] STAMP obj/foundation/communication/dsoftbus/core/common/security/permission/softbus_permission_json__notice.stamp
|
||||
[115/515] CC obj/third_party/mbedtls/library/mbedtls_shared/ssl_cli.o
|
||||
[116/515] COPY ../../foundation/communication/dsoftbus/core/common/security/permission/softbus_trans_permission.json obj/foundation/communication/dsoftbus/core/common/security/permission/softbus_trans_permission.json
|
||||
[117/515] STAMP obj/foundation/communication/dsoftbus/core/common/security/permission/softbus_permission__notice.stamp
|
||||
[118/515] ACTION //foundation/communication/dsoftbus/core/common/softbus_property:softbus_property__notice(//build/toolchain/linux:arm64)
|
||||
[119/515] STAMP obj/foundation/communication/dsoftbus/core/common/security/permission/softbus_permission_json.stamp
|
||||
[120/515] ACTION //foundation/communication/dsoftbus/core/common/security/sequence_verification:softbus_seq_verification__notice(//build/toolchain/linux:arm64)
|
||||
[121/515] ACTION //foundation/communication/dsoftbus/core/common/utils:softbus_utils__notice(//build/toolchain/linux:arm64)
|
||||
[122/515] STAMP obj/foundation/communication/dsoftbus/core/common/softbus_property/softbus_property__notice.stamp
|
||||
[123/515] STAMP obj/foundation/communication/dsoftbus/core/common/utils/softbus_utils__notice.stamp
|
||||
[124/515] STAMP obj/foundation/communication/dsoftbus/core/common/security/sequence_verification/softbus_seq_verification__notice.stamp
|
||||
[125/515] ACTION //foundation/communication/dsoftbus/core/connection/ble:ble_connection__notice(//build/toolchain/linux:arm64)
|
||||
[126/515] STAMP obj/foundation/communication/dsoftbus/core/connection/ble/ble_connection__notice.stamp
|
||||
[127/515] CC obj/third_party/mbedtls/library/mbedtls_shared/rsa.o
|
||||
[128/515] ACTION //foundation/communication/dsoftbus/core/connection/br:br_connection__notice(//build/toolchain/linux:arm64)
|
||||
[129/515] CC obj/foundation/communication/dsoftbus/core/connection/ble/src/ble_connection/softbus_ble_connection_virtual.o
|
||||
[130/515] STAMP obj/foundation/communication/dsoftbus/core/connection/br/br_connection__notice.stamp
|
||||
[131/515] ACTION //foundation/communication/dsoftbus/core/connection/common:conn_common__notice(//build/toolchain/linux:arm64)
|
||||
[132/515] STAMP obj/foundation/communication/dsoftbus/core/connection/common/conn_common__notice.stamp
|
||||
[133/515] ACTION //foundation/communication/dsoftbus/core/discovery/ble:ble_discovery__notice(//build/toolchain/linux:arm64)
|
||||
[134/515] STAMP obj/foundation/communication/dsoftbus/core/discovery/ble/ble_discovery__notice.stamp
|
||||
[135/515] ACTION //foundation/communication/dsoftbus/core/connection/tcp:tcp_connection__notice(//build/toolchain/linux:arm64)
|
||||
[136/515] CC obj/foundation/communication/dsoftbus/core/connection/br/src/br_connection/br_connection_virtual.o
|
||||
[137/515] STAMP obj/foundation/communication/dsoftbus/core/connection/tcp/tcp_connection__notice.stamp
|
||||
[138/515] ACTION //foundation/communication/dsoftbus/core/frame/standard/client:softbus_client__notice(//build/toolchain/linux:arm64)
|
||||
[139/515] ACTION //foundation/communication/dsoftbus/core/discovery:dsoftbus_disc_server__notice(//build/toolchain/linux:arm64)
|
||||
[140/515] STAMP obj/foundation/communication/dsoftbus/core/frame/standard/client/softbus_client__notice.stamp
|
||||
[141/515] STAMP obj/foundation/communication/dsoftbus/core/discovery/dsoftbus_disc_server__notice.stamp
|
||||
[142/515] ACTION //foundation/communication/dsoftbus/core/connection/manager:conn_manager__notice(//build/toolchain/linux:arm64)
|
||||
[143/515] CC obj/foundation/communication/dsoftbus/core/discovery/ble/src/ble_discovery/disc_ble_virtual.o
|
||||
[144/515] SOLINK communication/dsoftbus_standard/libble_connection.z.so
|
||||
[145/515] ACTION //foundation/communication/dsoftbus/core/discovery/coap:dsoftbus_disc_coap__notice(//build/toolchain/linux:arm64)
|
||||
[146/515] STAMP obj/foundation/communication/dsoftbus/core/discovery/coap/dsoftbus_disc_coap__notice.stamp
|
||||
[147/515] STAMP obj/foundation/communication/dsoftbus/core/connection/manager/conn_manager__notice.stamp
|
||||
[148/515] ACTION //foundation/communication/dsoftbus/core/frame/standard/server:softbus_server.rc__notice(//build/toolchain/linux:arm64)
|
||||
[149/515] ACTION //foundation/communication/dsoftbus/core/frame/standard/server:softbus_server__notice(//build/toolchain/linux:arm64)
|
||||
[150/515] ACTION //foundation/communication/dsoftbus/core/frame/standard/server:softbus_server_main__notice(//build/toolchain/linux:arm64)
|
||||
[151/515] STAMP obj/foundation/communication/dsoftbus/core/frame/standard/server/softbus_server.rc__notice.stamp
|
||||
[152/515] STAMP obj/foundation/communication/dsoftbus/core/frame/standard/server/softbus_server_main__notice.stamp
|
||||
[153/515] COPY ../../foundation/communication/dsoftbus/core/frame/standard/server/src/softbus_server.rc obj/foundation/communication/dsoftbus/core/frame/standard/server/foundation/communication/dsoftbus/core/frame/standard/server/src/softbus_server.rc
|
||||
[154/515] ACTION //foundation/communication/dsoftbus/core/frame/standard/softbusdata:softbus_server_data__notice(//build/toolchain/linux:arm64)
|
||||
[155/515] STAMP obj/foundation/communication/dsoftbus/core/frame/standard/softbusdata/softbus_server_data__notice.stamp
|
||||
[156/515] STAMP obj/foundation/communication/dsoftbus/core/frame/standard/server/softbus_server__notice.stamp
|
||||
[157/515] ACTION //foundation/communication/dsoftbus/core/transmission/ipc:dsoftbus_trans_ipc_proxy__notice(//build/toolchain/linux:arm64)
|
||||
[158/515] STAMP obj/foundation/communication/dsoftbus/core/frame/standard/server/softbus_server.rc.stamp
|
||||
[159/515] ACTION //foundation/communication/dsoftbus/core/transmission/common:dsoftbus_trans_common__notice(//build/toolchain/linux:arm64)
|
||||
[160/515] SOLINK communication/dsoftbus_standard/libbr_connection.z.so
|
||||
[161/515] STAMP obj/foundation/communication/dsoftbus/core/transmission/ipc/dsoftbus_trans_ipc_proxy__notice.stamp
|
||||
[162/515] STAMP obj/foundation/communication/dsoftbus/core/transmission/common/dsoftbus_trans_common__notice.stamp
|
||||
[163/515] CC obj/third_party/mbedtls/library/mbedtls_shared/x509_crt.o
|
||||
[164/515] ACTION //foundation/communication/dsoftbus/core/transmission/pending_packet:softbus_trans_pending__notice(//build/toolchain/linux:arm64)
|
||||
[165/515] STAMP obj/foundation/communication/dsoftbus/core/transmission/pending_packet/softbus_trans_pending__notice.stamp
|
||||
[166/515] ACTION //foundation/communication/dsoftbus/core/transmission/trans_channel/proxy:dsoftbus_trans_proxy_channel__notice(//build/toolchain/linux:arm64)
|
||||
[167/515] STAMP obj/foundation/communication/dsoftbus/core/transmission/trans_channel/proxy/dsoftbus_trans_proxy_channel__notice.stamp
|
||||
[168/515] ACTION //foundation/communication/dsoftbus/core/transmission/trans_channel/tcp_direct:dsoftbus_trans_direct_channel__notice(//build/toolchain/linux:arm64)
|
||||
[169/515] SOLINK communication/dsoftbus_standard/libble_discovery.z.so
|
||||
[170/515] ACTION //foundation/communication/dsoftbus/core/transmission/session:dsoftbus_trans_session__notice(//build/toolchain/linux:arm64)
|
||||
[171/515] STAMP obj/foundation/communication/dsoftbus/core/transmission/trans_channel/tcp_direct/dsoftbus_trans_direct_channel__notice.stamp
|
||||
[172/515] ACTION //foundation/communication/dsoftbus/core/transmission/trans_channel/udp_negotiation:dsoftbus_trans_udp_channel__notice(//build/toolchain/linux:arm64)
|
||||
[173/515] STAMP obj/foundation/communication/dsoftbus/core/transmission/session/dsoftbus_trans_session__notice.stamp
|
||||
[174/515] ACTION //foundation/communication/dsoftbus/sdk/bus_center/service:dsoftbus_bus_center_service_sdk__notice(//build/toolchain/linux:arm64)
|
||||
[175/515] STAMP obj/foundation/communication/dsoftbus/sdk/bus_center/service/dsoftbus_bus_center_service_sdk__notice.stamp
|
||||
[176/515] STAMP obj/foundation/communication/dsoftbus/core/transmission/trans_channel/udp_negotiation/dsoftbus_trans_udp_channel__notice.stamp
|
||||
[177/515] ACTION //foundation/communication/dsoftbus/sdk/discovery:dsoftbus_disc_manager_sdk__notice(//build/toolchain/linux:arm64)
|
||||
[178/515] ACTION //foundation/communication/dsoftbus/sdk/bus_center:dsoftbus_bus_center_manager_sdk__notice(//build/toolchain/linux:arm64)
|
||||
[179/515] ACTION //foundation/communication/dsoftbus/sdk/discovery/service:dsoftbus_disc_service_sdk__notice(//build/toolchain/linux:arm64)
|
||||
[180/515] STAMP obj/foundation/communication/dsoftbus/sdk/discovery/dsoftbus_disc_manager_sdk__notice.stamp
|
||||
[181/515] STAMP obj/foundation/communication/dsoftbus/sdk/bus_center/dsoftbus_bus_center_manager_sdk__notice.stamp
|
||||
[182/515] STAMP obj/foundation/communication/dsoftbus/sdk/discovery/service/dsoftbus_disc_service_sdk__notice.stamp
|
||||
[183/515] ACTION //foundation/communication/dsoftbus/sdk/transmission/session:dsoftbus_trans_session_sdk__notice(//build/toolchain/linux:arm64)
|
||||
[184/515] ACTION //foundation/communication/dsoftbus/sdk/frame:softbus_client_frame__notice(//build/toolchain/linux:arm64)
|
||||
[185/515] STAMP obj/foundation/communication/dsoftbus/sdk/transmission/session/dsoftbus_trans_session_sdk__notice.stamp
|
||||
[186/515] STAMP obj/foundation/communication/dsoftbus/sdk/frame/softbus_client_frame__notice.stamp
|
||||
[187/515] ACTION //foundation/communication/dsoftbus/sdk/transmission/trans_channel/auth:dsoftbus_trans_auth_channel_sdk__notice(//build/toolchain/linux:arm64)
|
||||
[188/515] STAMP obj/foundation/communication/dsoftbus/sdk/transmission/trans_channel/auth/dsoftbus_trans_auth_channel_sdk__notice.stamp
|
||||
[189/515] ACTION //foundation/communication/dsoftbus/sdk/transmission/ipc:dsoftbus_trans_ipc_proxy_sdk__notice(//build/toolchain/linux:arm64)
|
||||
[190/515] ACTION //foundation/communication/dsoftbus/sdk/transmission/trans_channel/proxy:dsoftbus_trans_proxy_channel_sdk__notice(//build/toolchain/linux:arm64)
|
||||
[191/515] STAMP obj/foundation/communication/dsoftbus/sdk/transmission/trans_channel/proxy/dsoftbus_trans_proxy_channel_sdk__notice.stamp
|
||||
[192/515] ACTION //foundation/communication/dsoftbus/sdk/transmission/trans_channel/tcp_direct:dsoftbus_trans_direct_channel_sdk__notice(//build/toolchain/linux:arm64)
|
||||
[193/515] STAMP obj/foundation/communication/dsoftbus/sdk/transmission/ipc/dsoftbus_trans_ipc_proxy_sdk__notice.stamp
|
||||
[194/515] ACTION //foundation/communication/dsoftbus/sdk/transmission/trans_channel/udp:dsoftbus_trans_udp_channel_sdk__notice(//build/toolchain/linux:arm64)
|
||||
[195/515] STAMP obj/foundation/communication/dsoftbus/sdk/transmission/trans_channel/udp/dsoftbus_trans_udp_channel_sdk__notice.stamp
|
||||
[196/515] STAMP obj/foundation/communication/dsoftbus/sdk/transmission/trans_channel/udp/dsoftbus_trans_udp_channel_sdk.inputdeps.stamp
|
||||
[197/515] ACTION //foundation/communication/dsoftbus/sdk/transmission:dsoftbus_trans_session_manager_sdk__notice(//build/toolchain/linux:arm64)
|
||||
[198/515] STAMP obj/foundation/communication/dsoftbus/sdk/transmission/trans_channel/tcp_direct/dsoftbus_trans_direct_channel_sdk__notice.stamp
|
||||
[199/515] STAMP obj/foundation/communication/dsoftbus/sdk/transmission/dsoftbus_trans_session_manager_sdk__notice.stamp
|
||||
[200/515] ACTION //third_party/cJSON:cjson_static__notice(//build/toolchain/linux:arm64)
|
||||
[201/515] STAMP obj/third_party/cJSON/cjson_static__notice.stamp
|
||||
[202/515] CC obj/foundation/communication/dsoftbus/sdk/transmission/trans_channel/udp/common/src/dsoftbus_trans_udp_channel_sdk/client_trans_udp_virtual.o
|
||||
[203/515] CC obj/foundation/communication/dsoftbus/sdk/transmission/trans_channel/udp/file/src/dsoftbus_trans_udp_channel_sdk/client_trans_file_virtual.o
|
||||
[204/515] ACTION //third_party/bounds_checking_function:libsec_shared__notice(//build/toolchain/linux:arm64)
|
||||
[205/515] STAMP obj/third_party/bounds_checking_function/libsec_shared__notice.stamp
|
||||
[206/515] ACTION //third_party/libcoap:libcoap__notice(//build/toolchain/linux:arm64)
|
||||
[207/515] STAMP obj/foundation/communication/dsoftbus/components/nstackx/nstackx_util/nstackx_util.open.inputdeps.stamp
|
||||
[208/515] STAMP obj/third_party/libcoap/libcoap__notice.stamp
|
||||
[209/515] ACTION //third_party/libcoap:libcoap_src__notice(//build/toolchain/linux:arm64)
|
||||
[210/515] ACTION //utils/native/base:utils__notice(//build/toolchain/linux:arm64)
|
||||
[211/515] CC obj/third_party/bounds_checking_function/src/libsec_shared/fscanf_s.o
|
||||
[212/515] CC obj/third_party/bounds_checking_function/src/libsec_shared/fwscanf_s.o
|
||||
[213/515] CC obj/third_party/mbedtls/library/mbedtls_shared/ssl_tls.o
|
||||
[214/515] CC obj/foundation/communication/dsoftbus/components/nstackx/nstackx_util/core/nstackx_util.open/nstackx_dev.o
|
||||
[215/515] CC obj/third_party/bounds_checking_function/src/libsec_shared/gets_s.o
|
||||
[216/515] CC obj/foundation/communication/dsoftbus/components/nstackx/nstackx_util/core/nstackx_util.open/nstackx_event.o
|
||||
[217/515] CC obj/foundation/communication/dsoftbus/components/nstackx/nstackx_util/core/nstackx_util.open/nstackx_log.o
|
||||
[218/515] CC obj/foundation/communication/dsoftbus/components/nstackx/nstackx_util/core/nstackx_util.open/nstackx_mbedtls.o
|
||||
[219/515] CC obj/foundation/communication/dsoftbus/components/nstackx/nstackx_util/core/nstackx_util.open/nstackx_timer.o
|
||||
[220/515] SOLINK communication/dsoftbus_standard/libdsoftbus_trans_udp_channel_sdk.z.so
|
||||
[221/515] CC obj/foundation/communication/dsoftbus/components/nstackx/nstackx_util/core/nstackx_util.open/nstackx_util.o
|
||||
[222/515] CC obj/foundation/communication/dsoftbus/components/nstackx/nstackx_util/platform/unix/nstackx_util.open/sys_epoll.o
|
||||
[223/515] CC obj/foundation/communication/dsoftbus/components/nstackx/nstackx_util/platform/unix/nstackx_util.open/sys_event.o
|
||||
[224/515] CC obj/foundation/communication/dsoftbus/components/nstackx/nstackx_util/platform/unix/nstackx_util.open/sys_socket.o
|
||||
[225/515] CC obj/third_party/bounds_checking_function/src/libsec_shared/memmove_s.o
|
||||
[226/515] CC obj/foundation/communication/dsoftbus/components/nstackx/nstackx_util/core/nstackx_util.open/nstackx_socket.o
|
||||
[227/515] CC obj/foundation/communication/dsoftbus/components/nstackx/nstackx_util/platform/unix/nstackx_util.open/sys_dev.o
|
||||
[228/515] CC obj/foundation/communication/dsoftbus/components/nstackx/nstackx_util/platform/unix/nstackx_util.open/sys_log.o
|
||||
[229/515] CC obj/foundation/communication/dsoftbus/components/nstackx/nstackx_util/platform/unix/nstackx_util.open/sys_timer.o
|
||||
[230/515] CC obj/third_party/bounds_checking_function/src/libsec_shared/scanf_s.o
|
||||
[231/515] CC obj/foundation/communication/dsoftbus/components/nstackx/nstackx_util/platform/unix/nstackx_util.open/sys_util.o
|
||||
[232/515] SOLINK communication/dsoftbus_standard/libmbedtls.z.so
|
||||
[233/515] CC obj/third_party/bounds_checking_function/src/libsec_shared/securecutil.o
|
||||
[234/515] CC obj/third_party/bounds_checking_function/src/libsec_shared/snprintf_s.o
|
||||
[235/515] CC obj/third_party/bounds_checking_function/src/libsec_shared/memset_s.o
|
||||
[236/515] CC obj/third_party/bounds_checking_function/src/libsec_shared/memcpy_s.o
|
||||
[237/515] CC obj/third_party/bounds_checking_function/src/libsec_shared/sscanf_s.o
|
||||
[238/515] CC obj/third_party/bounds_checking_function/src/libsec_shared/sprintf_s.o
|
||||
[239/515] CC obj/third_party/bounds_checking_function/src/libsec_shared/strcat_s.o
|
||||
[240/515] CC obj/third_party/bounds_checking_function/src/libsec_shared/strncat_s.o
|
||||
[241/515] CC obj/third_party/bounds_checking_function/src/libsec_shared/swprintf_s.o
|
||||
[242/515] CC obj/third_party/bounds_checking_function/src/libsec_shared/strtok_s.o
|
||||
[243/515] CC obj/third_party/bounds_checking_function/src/libsec_shared/swscanf_s.o
|
||||
[244/515] CC obj/third_party/bounds_checking_function/src/libsec_shared/vfscanf_s.o
|
||||
[245/515] CC obj/third_party/bounds_checking_function/src/libsec_shared/vfwscanf_s.o
|
||||
[246/515] CC obj/third_party/bounds_checking_function/src/libsec_shared/vscanf_s.o
|
||||
[247/515] CC obj/third_party/bounds_checking_function/src/libsec_shared/vsprintf_s.o
|
||||
[248/515] CC obj/third_party/bounds_checking_function/src/libsec_shared/vsnprintf_s.o
|
||||
[249/515] CC obj/third_party/bounds_checking_function/src/libsec_shared/strncpy_s.o
|
||||
[250/515] CC obj/third_party/bounds_checking_function/src/libsec_shared/vsscanf_s.o
|
||||
[251/515] CC obj/third_party/bounds_checking_function/src/libsec_shared/vswprintf_s.o
|
||||
[252/515] CC obj/third_party/bounds_checking_function/src/libsec_shared/strcpy_s.o
|
||||
[253/515] CC obj/third_party/bounds_checking_function/src/libsec_shared/vwscanf_s.o
|
||||
[254/515] CC obj/third_party/bounds_checking_function/src/libsec_shared/vswscanf_s.o
|
||||
[255/515] CC obj/third_party/bounds_checking_function/src/libsec_shared/wcscat_s.o
|
||||
[256/515] CC obj/third_party/bounds_checking_function/src/libsec_shared/secureprintoutput_w.o
|
||||
[257/515] CC obj/third_party/bounds_checking_function/src/libsec_shared/wcscpy_s.o
|
||||
[258/515] CC obj/third_party/cJSON/cjson_static/cJSON.o
|
||||
[259/515] CC obj/third_party/bounds_checking_function/src/libsec_shared/secureinput_a.o
|
||||
[260/515] STAMP obj/third_party/libcoap/libcoap_src__notice.stamp
|
||||
[261/515] CC obj/third_party/bounds_checking_function/src/libsec_shared/wcsncat_s.o
|
||||
[262/515] AR obj/third_party/cJSON/libcjson_static.a
|
||||
[263/515] CC obj/third_party/bounds_checking_function/src/libsec_shared/wmemcpy_s.o
|
||||
[264/515] STAMP obj/foundation/communication/dsoftbus/components/nstackx/nstackx_ctrl/nstackx_ctrl.inputdeps.stamp
|
||||
[265/515] CC obj/third_party/bounds_checking_function/src/libsec_shared/wcsncpy_s.o
|
||||
[266/515] CC obj/third_party/bounds_checking_function/src/libsec_shared/wmemmove_s.o
|
||||
[267/515] CC obj/third_party/bounds_checking_function/src/libsec_shared/secureprintoutput_a.o
|
||||
[268/515] CC obj/third_party/bounds_checking_function/src/libsec_shared/wscanf_s.o
|
||||
[269/515] CC obj/third_party/bounds_checking_function/src/libsec_shared/wcstok_s.o
|
||||
[270/515] CC obj/third_party/bounds_checking_function/src/libsec_shared/secureinput_w.o
|
||||
[271/515] CC obj/third_party/libcoap/src/libcoap_src/address.o
|
||||
[272/515] CC obj/third_party/libcoap/src/libcoap_src/async.o
|
||||
[273/515] CC obj/foundation/communication/dsoftbus/components/nstackx/nstackx_ctrl/core/nstackx_ctrl/nstackx_smartgenius.o
|
||||
[274/515] CC obj/third_party/libcoap/src/libcoap_src/block.o
|
||||
[275/515] CC obj/foundation/communication/dsoftbus/components/nstackx/nstackx_ctrl/core/nstackx_ctrl/nstackx_database.o
|
||||
[276/515] CC obj/foundation/communication/dsoftbus/components/nstackx/nstackx_ctrl/core/coap_discover/nstackx_ctrl/json_payload.o
|
||||
[277/515] CC obj/third_party/libcoap/src/libcoap_src/coap_hashkey.o
|
||||
[278/515] CC obj/foundation/communication/dsoftbus/components/nstackx/nstackx_ctrl/core/coap_discover/nstackx_ctrl/coap_client.o
|
||||
[279/515] CC obj/third_party/libcoap/src/libcoap_src/coap_event.o
|
||||
[280/515] CC obj/third_party/libcoap/src/libcoap_src/coap_notls.o
|
||||
[281/515] SOLINK common/common/libsec_shared.z.so
|
||||
[282/515] CC obj/third_party/libcoap/src/libcoap_src/coap_openssl.o
|
||||
[283/515] CC obj/foundation/communication/dsoftbus/components/nstackx/nstackx_ctrl/core/coap_discover/nstackx_ctrl/coap_app.o
|
||||
[284/515] CC obj/foundation/communication/dsoftbus/components/nstackx/nstackx_ctrl/core/nstackx_ctrl/nstackx_common.o
|
||||
[285/515] CC obj/third_party/libcoap/src/libcoap_src/coap_time.o
|
||||
[286/515] SOLINK communication/dsoftbus_standard/libnstackx_util.open.z.so
|
||||
[287/515] CC obj/third_party/libcoap/src/libcoap_src/encode.o
|
||||
[288/515] CC obj/third_party/libcoap/src/libcoap_src/mem.o
|
||||
[289/515] CC obj/third_party/libcoap/src/libcoap_src/coap_debug.o
|
||||
[290/515] CC obj/foundation/communication/dsoftbus/components/nstackx/nstackx_ctrl/core/coap_discover/nstackx_ctrl/coap_discover.o
|
||||
[291/515] CC obj/third_party/libcoap/src/libcoap_src/subscribe.o
|
||||
[292/515] CC obj/foundation/communication/dsoftbus/components/nstackx/nstackx_ctrl/core/nstackx_ctrl/nstackx_device.o
|
||||
[293/515] STAMP obj/utils/native/base/utils__notice.stamp
|
||||
[294/515] STAMP obj/depend/ipc_core.inputdeps.stamp
|
||||
[295/515] STAMP obj/foundation/communication/dsoftbus/adapter/softbus_adapter.inputdeps.stamp
|
||||
[296/515] CC obj/third_party/libcoap/src/libcoap_src/option.o
|
||||
[297/515] CC obj/third_party/libcoap/src/libcoap_src/str.o
|
||||
[298/515] CC obj/third_party/libcoap/src/libcoap_src/coap_io.o
|
||||
[299/515] CC obj/third_party/libcoap/src/libcoap_src/pdu.o
|
||||
[300/515] CC obj/foundation/communication/dsoftbus/adapter/common/bus_center/platform/softbus_adapter/bus_center_adapter_weak.o
|
||||
[301/515] CC obj/third_party/libcoap/src/libcoap_src/uri.o
|
||||
[302/515] CC obj/foundation/communication/dsoftbus/adapter/common/kernel/liteos_a/softbus_adapter/softbus_adapter_mem.o
|
||||
[303/515] CC obj/third_party/libcoap/src/libcoap_src/coap_session.o
|
||||
[304/515] CC obj/foundation/communication/dsoftbus/adapter/common/kernel/liteos_a/softbus_adapter/softbus_adapter_file.o
|
||||
[305/515] CC obj/foundation/communication/dsoftbus/adapter/common/log/softbus_adapter/softbus_adapter_log.o
|
||||
[306/515] CC obj/foundation/communication/dsoftbus/adapter/common/kernel/liteos_a/softbus_adapter/softbus_adapter_timer.o
|
||||
[307/515] CC obj/third_party/libcoap/src/libcoap_src/resource.o
|
||||
[308/515] CC obj/foundation/communication/dsoftbus/adapter/default_config/spec_config/softbus_adapter/softbus_config_adapter.o
|
||||
[309/515] STAMP obj/foundation/communication/dsoftbus/core/bus_center/dsoftbus_bus_center_server.inputdeps.stamp
|
||||
[310/515] CC obj/third_party/libcoap/src/libcoap_src/net.o
|
||||
[311/515] STAMP obj/foundation/communication/dsoftbus/adapter/common/bus_center/dsoftbus_bus_center_monitor.inputdeps.stamp
|
||||
[312/515] STAMP obj/foundation/communication/dsoftbus/core/authentication/dsoftbus_auth_server.inputdeps.stamp
|
||||
[313/515] CC obj/foundation/communication/dsoftbus/adapter/common/mbedtls/softbus_adapter/softbus_adapter_crypto.o
|
||||
[314/515] CC obj/foundation/communication/dsoftbus/adapter/common/bus_center/platform/dsoftbus_bus_center_monitor/lnn_product_monitor_virtual.o
|
||||
[315/515] CC obj/foundation/communication/dsoftbus/core/bus_center/service/src/dsoftbus_bus_center_server/bus_center_manager.o
|
||||
[316/515] CXX obj/foundation/communication/dsoftbus/adapter/common/bus_center/wlan/dsoftbus_bus_center_monitor/lnn_wifiservice_monitor_virtual.o
|
||||
[317/515] CC obj/foundation/communication/dsoftbus/adapter/common/bus_center/network/dsoftbus_bus_center_monitor/lnn_lwip_monitor_virtual.o
|
||||
[318/515] CC obj/foundation/communication/dsoftbus/core/bus_center/lnn/net_builder/src/dsoftbus_bus_center_server/lnn_coap_discovery_impl.o
|
||||
[319/515] CC obj/foundation/communication/dsoftbus/core/authentication/src/dsoftbus_auth_server/auth_common.o
|
||||
[320/515] CC obj/foundation/communication/dsoftbus/adapter/common/bus_center/network/dsoftbus_bus_center_monitor/lnn_netlink_monitor.o
|
||||
[321/515] CC obj/foundation/communication/dsoftbus/core/bus_center/lnn/net_builder/sync_info/src/dsoftbus_bus_center_server/lnn_sync_item_info.o
|
||||
[322/515] CC obj/foundation/communication/dsoftbus/core/authentication/src/dsoftbus_auth_server/auth_connection.o
|
||||
[323/515] CXX obj/depend/ipc/ipc_core/ipc_object_stub.o
|
||||
[324/515] CXX obj/depend/ipc/ipc_core/ipc_center.o
|
||||
[325/515] CXX obj/depend/ipc/ipc_core/iremote_object.o
|
||||
[326/515] CXX obj/depend/ipc/ipc_core/message_parcel.o
|
||||
[327/515] STAMP obj/foundation/communication/dsoftbus/core/bus_center/lnn/net_ledger/dsoftbus_bus_center_ledger.inputdeps.stamp
|
||||
[328/515] CC obj/foundation/communication/dsoftbus/core/bus_center/lnn/net_builder/src/dsoftbus_bus_center_server/lnn_discovery_manager.o
|
||||
[329/515] CXX obj/depend/ipc/ipc_core/ipc_skeleton.o
|
||||
[330/515] CC obj/foundation/communication/dsoftbus/core/authentication/src/dsoftbus_auth_server/auth_socket.o
|
||||
[331/515] CC obj/foundation/communication/dsoftbus/core/authentication/src/dsoftbus_auth_server/auth_sessionkey.o
|
||||
[332/515] CC obj/foundation/communication/dsoftbus/core/bus_center/lnn/net_ledger/common/src/dsoftbus_bus_center_ledger/lnn_net_capability.o
|
||||
[333/515] CC obj/foundation/communication/dsoftbus/core/bus_center/lnn/net_ledger/common/src/dsoftbus_bus_center_ledger/lnn_map.o
|
||||
[334/515] STAMP obj/foundation/communication/dsoftbus/core/bus_center/lnn/lane_hub/dsoftbus_bus_center_hub.inputdeps.stamp
|
||||
[335/515] CC obj/foundation/communication/dsoftbus/core/bus_center/lnn/net_ledger/common/src/dsoftbus_bus_center_ledger/lnn_device_info.o
|
||||
[336/515] CC obj/foundation/communication/dsoftbus/core/bus_center/lnn/net_builder/src/dsoftbus_bus_center_server/lnn_connection_fsm.o
|
||||
[337/515] CC obj/foundation/communication/dsoftbus/core/authentication/src/dsoftbus_auth_server/auth_manager.o
|
||||
[338/515] CC obj/foundation/communication/dsoftbus/core/bus_center/lnn/lane_hub/lane_manager/src/dsoftbus_bus_center_hub/lnn_lane_manager.o
|
||||
[339/515] CC obj/foundation/communication/dsoftbus/core/bus_center/lnn/lane_hub/time_sync/src/dsoftbus_bus_center_hub/lnn_time_sync_manager_stub.o
|
||||
[340/515] CC obj/foundation/communication/dsoftbus/core/bus_center/lnn/net_ledger/common/src/dsoftbus_bus_center_ledger/lnn_node_info.o
|
||||
[341/515] CC obj/foundation/communication/dsoftbus/core/bus_center/lnn/lane_hub/lane_manager/src/dsoftbus_bus_center_hub/lnn_smart_communication.o
|
||||
[342/515] CC obj/foundation/communication/dsoftbus/core/bus_center/lnn/lane_hub/lane_manager/src/dsoftbus_bus_center_hub/lnn_lane_info.o
|
||||
[343/515] CC obj/foundation/communication/dsoftbus/core/bus_center/lnn/net_builder/src/dsoftbus_bus_center_server/lnn_network_id.o
|
||||
[344/515] CC obj/foundation/communication/dsoftbus/core/bus_center/lnn/net_builder/src/dsoftbus_bus_center_server/lnn_node_weight.o
|
||||
[345/515] CC obj/foundation/communication/dsoftbus/core/bus_center/lnn/net_ledger/local_ledger/src/dsoftbus_bus_center_ledger/lnn_local_net_ledger.o
|
||||
[346/515] CC obj/foundation/communication/dsoftbus/core/bus_center/lnn/net_ledger/distributed_ledger/src/dsoftbus_bus_center_ledger/lnn_distributed_net_ledger.o
|
||||
[347/515] CC obj/foundation/communication/dsoftbus/core/bus_center/service/src/dsoftbus_bus_center_server/bus_center_event.o
|
||||
[348/515] CC obj/foundation/communication/dsoftbus/core/bus_center/lnn/net_builder/src/dsoftbus_bus_center_server/lnn_state_machine.o
|
||||
[349/515] STAMP obj/foundation/communication/dsoftbus/sdk/transmission/ipc/dsoftbus_trans_ipc_proxy_sdk.inputdeps.stamp
|
||||
[350/515] CC obj/foundation/communication/dsoftbus/core/bus_center/lnn/net_buscenter/src/dsoftbus_bus_center_server/lnn_network_manager.o
|
||||
[351/515] STAMP obj/foundation/communication/dsoftbus/core/bus_center/utils/dsoftbus_bus_center_utils.inputdeps.stamp
|
||||
[352/515] CC obj/foundation/communication/dsoftbus/core/bus_center/monitor/src/dsoftbus_bus_center_server/lnn_event_monitor.o
|
||||
[353/515] CC obj/foundation/communication/dsoftbus/core/bus_center/lnn/net_buscenter/src/dsoftbus_bus_center_server/lnn_ip_network_impl.o
|
||||
[354/515] CXX obj/foundation/communication/dsoftbus/core/bus_center/ipc/standard_system/src/dsoftbus_bus_center_server/lnn_bus_center_ipc.o
|
||||
[355/515] CC obj/foundation/communication/dsoftbus/core/bus_center/utils/src/dsoftbus_bus_center_utils/lnn_ip_utils.o
|
||||
[356/515] CC obj/foundation/communication/dsoftbus/core/bus_center/lnn/net_builder/sync_info/src/dsoftbus_bus_center_server/lnn_exchange_device_info.o
|
||||
[357/515] CC obj/foundation/communication/dsoftbus/core/bus_center/utils/src/dsoftbus_bus_center_utils/lnn_connection_addr_utils.o
|
||||
[358/515] CC obj/foundation/communication/dsoftbus/core/bus_center/utils/src/dsoftbus_bus_center_utils/lnn_async_callback_utils.o
|
||||
[359/515] CXX obj/foundation/communication/dsoftbus/core/bus_center/ipc/standard_system/src/dsoftbus_bus_center_server/bus_center_client_proxy_standard.o
|
||||
[360/515] STAMP obj/foundation/communication/dsoftbus/core/common/security/permission/softbus_permission.inputdeps.stamp
|
||||
[361/515] CC obj/foundation/communication/dsoftbus/core/bus_center/lnn/net_ledger/dsoftbus_bus_center_ledger/net_ledger.o
|
||||
[362/515] CC obj/foundation/communication/dsoftbus/core/bus_center/utils/src/dsoftbus_bus_center_utils/lnn_file_utils.o
|
||||
[363/515] CC obj/foundation/communication/dsoftbus/core/common/json_utils/json_utils/softbus_json_utils.o
|
||||
[364/515] CC obj/foundation/communication/dsoftbus/core/common/log/softbus_log/softbus_log.o
|
||||
[365/515] CXX obj/foundation/communication/dsoftbus/core/common/security/permission/standard_system/softbus_permission/permission_utils.o
|
||||
[366/515] CC obj/foundation/communication/dsoftbus/core/bus_center/lnn/net_builder/src/dsoftbus_bus_center_server/lnn_net_builder.o
|
||||
[367/515] CXX obj/foundation/communication/dsoftbus/core/bus_center/ipc/standard_system/src/dsoftbus_bus_center_server/bus_center_client_proxy.o
|
||||
[368/515] CC obj/foundation/communication/dsoftbus/core/common/security/sequence_verification/src/softbus_seq_verification/softbus_sequence_verification.o
|
||||
[369/515] CC obj/foundation/communication/dsoftbus/core/common/softbus_property/src/softbus_property/softbus_feature_config.o
|
||||
[370/515] STAMP obj/foundation/communication/dsoftbus/core/discovery/dsoftbus_disc_server.inputdeps.stamp
|
||||
[371/515] CXX obj/foundation/communication/dsoftbus/core/common/security/permission/standard_system/softbus_permission/softbus_permission.o
|
||||
[372/515] STAMP obj/foundation/communication/dsoftbus/core/connection/common/conn_common.inputdeps.stamp
|
||||
[373/515] CC obj/foundation/communication/dsoftbus/core/common/message_handler/message_handler/message_handler.o
|
||||
[374/515] CC obj/foundation/communication/dsoftbus/core/common/security/permission/common/softbus_permission/permission_entry.o
|
||||
[375/515] CC obj/foundation/communication/dsoftbus/core/common/utils/softbus_utils/softbus_utils.o
|
||||
[376/515] CC obj/foundation/communication/dsoftbus/core/connection/common/src/conn_common/softbus_thread_pool.o
|
||||
[377/515] CC obj/foundation/communication/dsoftbus/core/connection/manager/conn_manager/softbus_conn_manager.o
|
||||
[378/515] STAMP obj/foundation/communication/dsoftbus/core/frame/standard/client/softbus_client.inputdeps.stamp
|
||||
[379/515] CC obj/foundation/communication/dsoftbus/core/connection/tcp/src/tcp_connection/softbus_tcp_connect_manager.o
|
||||
[380/515] STAMP obj/foundation/communication/dsoftbus/core/discovery/coap/dsoftbus_disc_coap.inputdeps.stamp
|
||||
[381/515] CC obj/foundation/communication/dsoftbus/core/connection/common/src/conn_common/softbus_tcp_socket.o
|
||||
[382/515] CC obj/foundation/communication/dsoftbus/core/discovery/manager/src/dsoftbus_disc_server/softbus_disc_server.o
|
||||
[383/515] STAMP obj/foundation/communication/dsoftbus/core/frame/standard/server/softbus_server.inputdeps.stamp
|
||||
[384/515] CXX obj/foundation/communication/dsoftbus/core/frame/standard/server/src/softbus_server/if_softbus_server.o
|
||||
[385/515] CC obj/foundation/communication/dsoftbus/core/discovery/coap/src/dsoftbus_disc_coap/disc_nstackx_adapter.o
|
||||
[386/515] CC obj/foundation/communication/dsoftbus/core/frame/standard/server/src/softbus_server/softbus_server_frame.o
|
||||
[387/515] CC obj/foundation/communication/dsoftbus/core/connection/common/src/conn_common/softbus_base_listener.o
|
||||
[388/515] CC obj/foundation/communication/dsoftbus/core/discovery/coap/src/dsoftbus_disc_coap/disc_coap.o
|
||||
[389/515] CXX obj/foundation/communication/dsoftbus/core/frame/standard/client/src/softbus_client/if_softbus_client.o
|
||||
[390/515] CC obj/foundation/communication/dsoftbus/core/discovery/manager/src/dsoftbus_disc_server/disc_manager.o
|
||||
[391/515] CXX obj/foundation/communication/dsoftbus/sdk/transmission/ipc/standard/src/dsoftbus_trans_ipc_proxy_sdk/trans_server_proxy_standard.o
|
||||
[392/515] CC obj/foundation/communication/dsoftbus/core/frame/standard/server/src/softbus_server_main/softbus_server_main.o
|
||||
[393/515] CXX obj/foundation/communication/dsoftbus/sdk/transmission/ipc/standard/src/dsoftbus_trans_ipc_proxy_sdk/trans_server_proxy.o
|
||||
[394/515] STAMP obj/foundation/communication/dsoftbus/core/transmission/ipc/dsoftbus_trans_ipc_proxy.inputdeps.stamp
|
||||
[395/515] CC obj/foundation/communication/dsoftbus/core/transmission/pending_packet/src/softbus_trans_pending/trans_pending_pkt.o
|
||||
[396/515] CC obj/foundation/communication/dsoftbus/core/transmission/common/src/dsoftbus_trans_common/softbus_message_open_channel.o
|
||||
[397/515] STAMP obj/foundation/communication/dsoftbus/core/transmission/trans_channel/proxy/dsoftbus_trans_proxy_channel.inputdeps.stamp
|
||||
[398/515] STAMP obj/foundation/communication/dsoftbus/core/transmission/session/dsoftbus_trans_session.inputdeps.stamp
|
||||
[399/515] CXX obj/foundation/communication/dsoftbus/core/discovery/ipc/standard/src/dsoftbus_disc_server/disc_client_proxy_standard.o
|
||||
[400/515] CC obj/foundation/communication/dsoftbus/core/transmission/trans_channel/manager/src/dsoftbus_trans_session/trans_channel_manager.o
|
||||
[401/515] CXX obj/foundation/communication/dsoftbus/core/discovery/ipc/standard/src/dsoftbus_disc_server/disc_client_proxy.o
|
||||
[402/515] CC obj/foundation/communication/dsoftbus/core/transmission/trans_channel/auth/src/dsoftbus_trans_session/trans_auth_manager.o
|
||||
[403/515] CC obj/foundation/communication/dsoftbus/core/transmission/trans_channel/auth/src/dsoftbus_trans_session/trans_auth_message.o
|
||||
[404/515] CC obj/foundation/communication/dsoftbus/core/transmission/session/src/dsoftbus_trans_session/trans_session_manager.o
|
||||
[405/515] CC obj/foundation/communication/dsoftbus/core/transmission/trans_channel/manager/src/dsoftbus_trans_session/trans_channel_callback.o
|
||||
[406/515] CXX obj/foundation/communication/dsoftbus/core/frame/standard/server/src/softbus_server/softbus_server_death_recipient.o
|
||||
[407/515] CC obj/foundation/communication/dsoftbus/core/transmission/session/src/dsoftbus_trans_session/trans_session_service.o
|
||||
[408/515] CC obj/foundation/communication/dsoftbus/core/transmission/trans_channel/manager/src/dsoftbus_trans_session/trans_lane_manager.o
|
||||
[409/515] CXX obj/foundation/communication/dsoftbus/core/transmission/ipc/standard/src/dsoftbus_trans_ipc_proxy/trans_client_proxy_standard.o
|
||||
[410/515] CC obj/foundation/communication/dsoftbus/core/transmission/trans_channel/proxy/src/dsoftbus_trans_proxy_channel/softbus_proxychannel_callback.o
|
||||
[411/515] CC obj/foundation/communication/dsoftbus/core/transmission/trans_channel/proxy/src/dsoftbus_trans_proxy_channel/softbus_proxychannel_control.o
|
||||
[412/515] CC obj/foundation/communication/dsoftbus/core/transmission/trans_channel/proxy/src/dsoftbus_trans_proxy_channel/softbus_proxychannel_listener.o
|
||||
[413/515] CXX obj/foundation/communication/dsoftbus/core/frame/standard/server/src/softbus_server/softbus_server.o
|
||||
[414/515] CXX obj/foundation/communication/dsoftbus/core/frame/standard/client/src/softbus_client/softbus_client_stub.o
|
||||
[415/515] STAMP obj/foundation/communication/dsoftbus/core/transmission/trans_channel/tcp_direct/dsoftbus_trans_direct_channel.inputdeps.stamp
|
||||
[416/515] CC obj/foundation/communication/dsoftbus/core/transmission/trans_channel/proxy/src/dsoftbus_trans_proxy_channel/softbus_proxychannel_network.o
|
||||
[417/515] CXX obj/foundation/communication/dsoftbus/core/frame/standard/softbusdata/src/softbus_server_data/softbus_server_data.o
|
||||
[418/515] CC obj/foundation/communication/dsoftbus/core/transmission/trans_channel/proxy/src/dsoftbus_trans_proxy_channel/softbus_proxychannel_message.o
|
||||
[419/515] CC obj/foundation/communication/dsoftbus/core/transmission/trans_channel/tcp_direct/src/dsoftbus_trans_direct_channel/trans_tcp_direct_callback.o
|
||||
[420/515] STAMP obj/foundation/communication/dsoftbus/sdk/bus_center/dsoftbus_bus_center_manager_sdk.inputdeps.stamp
|
||||
[421/515] CXX obj/foundation/communication/dsoftbus/core/frame/standard/server/src/softbus_server/softbus_server_stub.o
|
||||
[422/515] CC obj/foundation/communication/dsoftbus/sdk/bus_center/service/src/dsoftbus_bus_center_service_sdk/client_bus_center.o
|
||||
[423/515] CXX obj/foundation/communication/dsoftbus/core/transmission/ipc/standard/src/dsoftbus_trans_ipc_proxy/trans_client_proxy.o
|
||||
[424/515] CC obj/foundation/communication/dsoftbus/core/transmission/trans_channel/udp_negotiation/src/dsoftbus_trans_udp_channel/trans_udp_virtual.o
|
||||
[425/515] STAMP obj/foundation/communication/dsoftbus/sdk/discovery/dsoftbus_disc_manager_sdk.inputdeps.stamp
|
||||
[426/515] CC obj/foundation/communication/dsoftbus/core/transmission/trans_channel/proxy/src/dsoftbus_trans_proxy_channel/softbus_proxychannel_transceiver.o
|
||||
[427/515] CC obj/foundation/communication/dsoftbus/core/transmission/trans_channel/tcp_direct/src/dsoftbus_trans_direct_channel/trans_tcp_direct_listener.o
|
||||
[428/515] CC obj/foundation/communication/dsoftbus/core/transmission/trans_channel/tcp_direct/src/dsoftbus_trans_direct_channel/trans_tcp_direct_manager.o
|
||||
[429/515] STAMP obj/foundation/communication/dsoftbus/sdk/frame/softbus_client_frame.inputdeps.stamp
|
||||
[430/515] CC obj/foundation/communication/dsoftbus/sdk/discovery/manager/src/dsoftbus_disc_manager_sdk/client_disc_manager.o
|
||||
[431/515] CC obj/foundation/communication/dsoftbus/core/transmission/trans_channel/proxy/src/dsoftbus_trans_proxy_channel/softbus_proxychannel_session.o
|
||||
[432/515] CC obj/foundation/communication/dsoftbus/core/transmission/trans_channel/proxy/src/dsoftbus_trans_proxy_channel/softbus_proxychannel_manager.o
|
||||
[433/515] CC obj/foundation/communication/dsoftbus/core/transmission/trans_channel/tcp_direct/src/dsoftbus_trans_direct_channel/trans_tcp_direct_message.o
|
||||
[434/515] CC obj/foundation/communication/dsoftbus/sdk/frame/common/src/softbus_client_frame/softbus_client_frame_manager.o
|
||||
[435/515] STAMP obj/foundation/communication/dsoftbus/sdk/transmission/dsoftbus_trans_session_manager_sdk.inputdeps.stamp
|
||||
[436/515] CC obj/foundation/communication/dsoftbus/sdk/frame/common/src/softbus_client_frame/softbus_client_event_manager.o
|
||||
[437/515] CC obj/foundation/communication/dsoftbus/sdk/bus_center/manager/src/dsoftbus_bus_center_manager_sdk/client_bus_center_manager.o
|
||||
[438/515] CC obj/foundation/communication/dsoftbus/sdk/transmission/trans_channel/manager/src/dsoftbus_trans_session_manager_sdk/client_trans_channel_manager.o
|
||||
[439/515] CC obj/foundation/communication/dsoftbus/sdk/discovery/service/src/dsoftbus_disc_service_sdk/client_disc_service.o
|
||||
[440/515] CC obj/foundation/communication/dsoftbus/sdk/transmission/trans_channel/manager/src/dsoftbus_trans_session_manager_sdk/client_trans_channel_callback.o
|
||||
[441/515] CC obj/foundation/communication/dsoftbus/sdk/transmission/session/src/dsoftbus_trans_session_manager_sdk/client_trans_session_callback.o
|
||||
[442/515] STAMP obj/foundation/communication/dsoftbus/sdk/transmission/session/dsoftbus_trans_session_sdk.inputdeps.stamp
|
||||
[443/515] CC obj/foundation/communication/dsoftbus/sdk/transmission/trans_channel/auth/src/dsoftbus_trans_auth_channel_sdk/client_trans_auth_manager.o
|
||||
[444/515] CC obj/foundation/communication/dsoftbus/sdk/transmission/session/src/dsoftbus_trans_session_manager_sdk/client_trans_session_manager.o
|
||||
[445/515] CXX obj/foundation/communication/dsoftbus/sdk/transmission/session/cpp/src/dsoftbus_trans_session_sdk/session_mock.o
|
||||
[446/515] CXX obj/foundation/communication/dsoftbus/sdk/frame/standard/src/softbus_client_frame/softbus_client_death_recipient.o
|
||||
[447/515] CXX obj/foundation/communication/dsoftbus/sdk/discovery/ipc/standard/src/dsoftbus_disc_manager_sdk/disc_server_proxy_standard.o
|
||||
[448/515] CXX obj/foundation/communication/dsoftbus/sdk/discovery/ipc/standard/src/dsoftbus_disc_manager_sdk/disc_server_proxy.o
|
||||
[449/515] CC obj/foundation/communication/dsoftbus/sdk/transmission/session/src/dsoftbus_trans_session_sdk/client_trans_message_service.o
|
||||
[450/515] CXX obj/foundation/communication/dsoftbus/sdk/bus_center/ipc/standard/src/dsoftbus_bus_center_manager_sdk/bus_center_server_proxy.o
|
||||
[451/515] STAMP obj/foundation/communication/dsoftbus/sdk/transmission/trans_channel/tcp_direct/dsoftbus_trans_direct_channel_sdk.inputdeps.stamp
|
||||
[452/515] CC obj/foundation/communication/dsoftbus/sdk/transmission/trans_channel/proxy/src/dsoftbus_trans_proxy_channel_sdk/client_trans_proxy_manager.o
|
||||
[453/515] CXX obj/foundation/communication/dsoftbus/sdk/bus_center/ipc/standard/src/dsoftbus_bus_center_manager_sdk/bus_center_server_proxy_standard.o
|
||||
[454/515] CC obj/foundation/communication/dsoftbus/sdk/transmission/session/src/dsoftbus_trans_session_sdk/client_trans_session_service.o
|
||||
[455/515] CC obj/foundation/communication/dsoftbus/sdk/transmission/trans_channel/tcp_direct/src/dsoftbus_trans_direct_channel_sdk/client_trans_tcp_direct_callback.o
|
||||
[456/515] STAMP obj/third_party/libcoap/libcoap_src.stamp
|
||||
[457/515] CC obj/foundation/communication/dsoftbus/sdk/transmission/trans_channel/tcp_direct/src/dsoftbus_trans_direct_channel_sdk/client_trans_tcp_direct_listener.o
|
||||
[458/515] STAMP obj/utils/native/base/utils.inputdeps.stamp
|
||||
[459/515] SOLINK communication/dsoftbus_standard/libcoap.z.so
|
||||
[460/515] CC obj/foundation/communication/dsoftbus/sdk/transmission/trans_channel/tcp_direct/src/dsoftbus_trans_direct_channel_sdk/client_trans_tcp_direct_manager.o
|
||||
[461/515] CXX obj/foundation/communication/dsoftbus/sdk/transmission/session/cpp/src/dsoftbus_trans_session_sdk/session_impl.o
|
||||
[462/515] CXX obj/foundation/communication/dsoftbus/sdk/frame/standard/src/softbus_client_frame/softbus_server_proxy_frame.o
|
||||
[463/515] SOLINK communication/dsoftbus_standard/libnstackx_ctrl.z.so
|
||||
[464/515] CXX obj/foundation/communication/dsoftbus/core/frame/standard/client/src/softbus_client_frame/softbus_client_stub.o
|
||||
[465/515] CC obj/foundation/communication/dsoftbus/sdk/transmission/trans_channel/tcp_direct/src/dsoftbus_trans_direct_channel_sdk/client_trans_tcp_direct_message.o
|
||||
[466/515] CXX obj/foundation/communication/dsoftbus/sdk/transmission/session/cpp/src/dsoftbus_trans_session_sdk/session_callback_mock.o
|
||||
[467/515] CXX obj/foundation/communication/dsoftbus/sdk/frame/standard/src/softbus_client_frame/softbus_server_proxy_standard.o
|
||||
[468/515] CXX obj/utils/native/base/src/utils/refbase.o
|
||||
[469/515] CXX obj/foundation/communication/dsoftbus/sdk/transmission/session/cpp/src/dsoftbus_trans_session_sdk/session_service_impl.o
|
||||
[470/515] CXX obj/utils/native/base/src/utils/parcel.o
|
||||
[471/515] SOLINK common/common/libutils.z.so
|
||||
[472/515] SOLINK common/common/libipc_core.z.so
|
||||
[473/515] STAMP obj/depend/ipc_single.stamp
|
||||
[474/515] SOLINK communication/dsoftbus_standard/libsoftbus_adapter.z.so
|
||||
[475/515] SOLINK communication/dsoftbus_standard/libsoftbus_property.z.so
|
||||
[476/515] SOLINK communication/dsoftbus_standard/libsoftbus_log.z.so
|
||||
[477/515] SOLINK communication/dsoftbus_standard/libjson_utils.z.so
|
||||
[478/515] SOLINK communication/dsoftbus_standard/libmessage_handler.z.so
|
||||
[479/515] SOLINK communication/dsoftbus_standard/libsoftbus_seq_verification.z.so
|
||||
[480/515] SOLINK communication/dsoftbus_standard/libdsoftbus_bus_center_utils.z.so
|
||||
[481/515] SOLINK communication/dsoftbus_standard/libsoftbus_utils.z.so
|
||||
[482/515] SOLINK communication/dsoftbus_standard/libdsoftbus_bus_center_monitor.z.so
|
||||
[483/515] SOLINK communication/dsoftbus_standard/libdsoftbus_bus_center_ledger.z.so
|
||||
[484/515] SOLINK communication/dsoftbus_standard/libsoftbus_permission.z.so
|
||||
[485/515] SOLINK communication/dsoftbus_standard/libdsoftbus_bus_center_hub.z.so
|
||||
[486/515] SOLINK communication/dsoftbus_standard/libconn_common.z.so
|
||||
[487/515] SOLINK communication/dsoftbus_standard/libdsoftbus_disc_coap.z.so
|
||||
[488/515] SOLINK communication/dsoftbus_standard/libtcp_connection.z.so
|
||||
[489/515] SOLINK communication/dsoftbus_standard/libdsoftbus_trans_common.z.so
|
||||
[490/515] SOLINK communication/dsoftbus_standard/libconn_manager.z.so
|
||||
[491/515] SOLINK communication/dsoftbus_standard/libsoftbus_server_data.z.so
|
||||
[492/515] SOLINK communication/dsoftbus_standard/libdsoftbus_auth_server.z.so
|
||||
[493/515] SOLINK communication/dsoftbus_standard/libdsoftbus_disc_server.z.so
|
||||
[494/515] SOLINK communication/dsoftbus_standard/libdsoftbus_trans_ipc_proxy.z.so
|
||||
[495/515] SOLINK communication/dsoftbus_standard/libsoftbus_trans_pending.z.so
|
||||
[496/515] SOLINK communication/dsoftbus_standard/libdsoftbus_trans_direct_channel.z.so
|
||||
[497/515] SOLINK communication/dsoftbus_standard/libdsoftbus_trans_proxy_channel.z.so
|
||||
[498/515] SOLINK communication/dsoftbus_standard/libdsoftbus_trans_udp_channel.z.so
|
||||
[499/515] SOLINK communication/dsoftbus_standard/libdsoftbus_bus_center_server.z.so
|
||||
[500/515] SOLINK communication/dsoftbus_standard/libdsoftbus_bus_center_manager_sdk.z.so
|
||||
[501/515] SOLINK communication/dsoftbus_standard/libdsoftbus_trans_session.z.so
|
||||
[502/515] SOLINK communication/dsoftbus_standard/libdsoftbus_disc_manager_sdk.z.so
|
||||
[503/515] SOLINK communication/dsoftbus_standard/libsoftbus_server.z.so
|
||||
[504/515] SOLINK communication/dsoftbus_standard/libdsoftbus_trans_ipc_proxy_sdk.z.so
|
||||
[505/515] LINK communication/dsoftbus_standard/softbus_server_main
|
||||
[506/515] SOLINK communication/dsoftbus_standard/libdsoftbus_trans_auth_channel_sdk.z.so
|
||||
[507/515] SOLINK communication/dsoftbus_standard/libdsoftbus_trans_proxy_channel_sdk.z.so
|
||||
[508/515] SOLINK communication/dsoftbus_standard/libdsoftbus_trans_direct_channel_sdk.z.so
|
||||
[509/515] SOLINK communication/dsoftbus_standard/libdsoftbus_trans_session_manager_sdk.z.so
|
||||
[510/515] SOLINK communication/dsoftbus_standard/libsoftbus_client_frame.z.so
|
||||
[511/515] SOLINK communication/dsoftbus_standard/libdsoftbus_bus_center_service_sdk.z.so
|
||||
[512/515] SOLINK communication/dsoftbus_standard/libdsoftbus_disc_service_sdk.z.so
|
||||
[513/515] SOLINK communication/dsoftbus_standard/libdsoftbus_trans_session_sdk.z.so
|
||||
[514/515] SOLINK communication/dsoftbus_standard/libsoftbus_client.z.so
|
||||
[515/515] STAMP obj/build/core/gn/images.stamp
|
||||
used: 12 seconds
|
||||
pycache statistics
|
||||
manage pycache contents
|
||||
pycache daemon exit
|
||||
c targets overlap rate statistics
|
||||
subsystem files NO. percentage builds NO. percentage overlap rate
|
||||
communication 160 54.1% 160 54.1% 1.00
|
||||
depend 6 2.0% 6 2.0% 1.00
|
||||
third_party 128 43.2% 128 43.2% 1.00
|
||||
utils 2 0.7% 2 0.7% 1.00
|
||||
|
||||
c overall build overlap rate: 1.00
|
||||
|
||||
|
||||
post_process
|
||||
[32m=====build openEuler successful.[0m
|
||||
2022-05-16 11:29:07
|
||||
++++++++++++++++++++++++++++++++++++++++
|
|
@ -0,0 +1,8 @@
|
|||
scp out/ohos-arm64-release/lib.unstripped/communication/dsoftbus_standard/* lise@172.17.146.14:/home/lise/libc-test/private
|
||||
scp out/ohos-arm64-release/exe.unstripped/communication/dsoftbus_standard/* lise@172.17.146.14:/home/lise/libc-test/private
|
||||
scp out/ohos-arm64-release/lib.unstripped/common/common/* lise@172.17.146.14:/home/lise/libc-test/private
|
||||
|
||||
scp out/ohos-arm64-release/exe.unstripped/communication/dsoftbus_standard/* zyz@172.17.146.162:/home/zyz/softbus/libc-test/private
|
||||
scp out/ohos-arm64-release/lib.unstripped/communication/dsoftbus_standard/* zyz@172.17.146.162:/home/zyz/softbus/libc-test/private
|
||||
scp out/ohos-arm64-release/lib.unstripped/common/common/* zyz@172.17.146.162:/home/zyz/softbus/libc-test/private
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
scp out/ohos-arm64-release/communication/dsoftbus_standard/* lise@172.17.146.14:/home/lise/libc-test/private
|
||||
scp out/ohos-arm64-release/common/common/* lise@172.17.146.14:/home/lise/libc-test/private
|
||||
|
||||
rsync -avzh /home/usr1/openeuler/src/dsoftbus_standard lise@172.17.146.14:/home/usr1/openeuler/src
|
||||
|
||||
scp out/ohos-arm64-release/communication/dsoftbus_standard/* zyz@172.17.146.162:/home/zyz/softbus/libc-test/private
|
||||
scp out/ohos-arm64-release/common/common/* zyz@172.17.146.162:/home/zyz/softbus/libc-test/private
|
||||
|