You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
1.1 KiB
47 lines
1.1 KiB
// SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
|
|
//
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
#include "serviceqtdbus.h"
|
|
#include "loginwidget.h"
|
|
#include "pamtest.h"
|
|
|
|
#include <QApplication>
|
|
#include <QDesktopWidget>
|
|
#include <QTranslator>
|
|
|
|
#include <unistd.h>
|
|
|
|
using namespace std;
|
|
|
|
int main(int argc, char *argv[])
|
|
{
|
|
QApplication app(argc, argv);
|
|
|
|
if (QString(argv[1]) == "service") {
|
|
// 新建deepinServiceManager的服务
|
|
QString fileName = QString("%1user/plugin-dp4-service.json").arg(SERVICE_CONFIG_DIR);
|
|
Policy policy(nullptr);
|
|
policy.parseConfig(fileName);
|
|
ServiceQtDBus service;
|
|
service.init(QDBusConnection::BusType::SessionBus, &policy);
|
|
return app.exec();
|
|
}
|
|
|
|
if (QString(argv[1]) == "login") {
|
|
// 登錄插件的demo
|
|
LoginWidget widget;
|
|
widget.show();
|
|
widget.resize(500, 500);
|
|
return app.exec();
|
|
}
|
|
|
|
if (QString(argv[1]) == "pam") {
|
|
// 測試pam
|
|
PamTest test;
|
|
test.startPam();
|
|
return app.exec();
|
|
}
|
|
|
|
return app.exec();
|
|
}
|
|
|