ios fixes
This commit is contained in:
parent
12b079df65
commit
9ae2e3fba2
28 changed files with 149639 additions and 39 deletions
18
ipc/ipc_interface.rep
Normal file
18
ipc/ipc_interface.rep
Normal file
|
@ -0,0 +1,18 @@
|
|||
#include <QtCore>
|
||||
#include <QString>
|
||||
|
||||
class IpcInterface
|
||||
{
|
||||
SLOT( int createPrivilegedProcess() ); // return local pid
|
||||
//SIGNAL(sendMessage(const QByteArray &message));
|
||||
|
||||
// Route functions
|
||||
SLOT( int routeAddList(const QString &gw, const QStringList &ips) );
|
||||
SLOT( bool clearSavedRoutes() );
|
||||
SLOT( bool routeDeleteList(const QString &gw, const QStringList &ip) );
|
||||
SLOT( void flushDns() );
|
||||
|
||||
SLOT( bool checkAndInstallDriver() );
|
||||
SLOT( QStringList getTapList() );
|
||||
};
|
||||
|
|
@ -1,21 +1,6 @@
|
|||
#include <QtCore>
|
||||
#include <QString>
|
||||
|
||||
class IpcInterface
|
||||
{
|
||||
SLOT( int createPrivilegedProcess() ); // return local pid
|
||||
//SIGNAL(sendMessage(const QByteArray &message));
|
||||
|
||||
// Route functions
|
||||
SLOT( int routeAddList(const QString &gw, const QStringList &ips) );
|
||||
SLOT( bool clearSavedRoutes() );
|
||||
SLOT( bool routeDeleteList(const QString &gw, const QStringList &ip) );
|
||||
SLOT( void flushDns() );
|
||||
|
||||
SLOT( bool checkAndInstallDriver() );
|
||||
SLOT( QStringList getTapList() );
|
||||
};
|
||||
|
||||
class IpcProcessInterface
|
||||
{
|
||||
SLOT( start(const QString &program, const QStringList &args) );
|
|
@ -48,15 +48,15 @@ int IpcServer::createPrivilegedProcess()
|
|||
qDebug() << "QRemoteObjectHost::destroyed";
|
||||
});
|
||||
|
||||
connect(pd.ipcProcess.data(), &IpcServerProcess::finished, this, [this, pid=m_localpid](int exitCode, QProcess::ExitStatus exitStatus){
|
||||
qDebug() << "IpcServerProcess finished" << exitCode << exitStatus;
|
||||
// if (m_processes.contains(pid)) {
|
||||
// m_processes[pid].ipcProcess.reset();
|
||||
// m_processes[pid].serverNode.reset();
|
||||
// m_processes[pid].localServer.reset();
|
||||
// m_processes.remove(pid);
|
||||
// }
|
||||
});
|
||||
// connect(pd.ipcProcess.data(), &IpcServerProcess::finished, this, [this, pid=m_localpid](int exitCode, QProcess::ExitStatus exitStatus){
|
||||
// qDebug() << "IpcServerProcess finished" << exitCode << exitStatus;
|
||||
//// if (m_processes.contains(pid)) {
|
||||
//// m_processes[pid].ipcProcess.reset();
|
||||
//// m_processes[pid].serverNode.reset();
|
||||
//// m_processes[pid].localServer.reset();
|
||||
//// m_processes.remove(pid);
|
||||
//// }
|
||||
// });
|
||||
|
||||
m_processes.insert(m_localpid, pd);
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#include "ipc.h"
|
||||
#include "ipcserverprocess.h"
|
||||
|
||||
#include "rep_ipcinterface_source.h"
|
||||
#include "rep_ipc_interface_source.h"
|
||||
|
||||
class IpcServer : public IpcInterfaceSource
|
||||
{
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
#include "ipcserverprocess.h"
|
||||
#include <QProcess>
|
||||
|
||||
#ifndef Q_OS_IOS
|
||||
|
||||
IpcServerProcess::IpcServerProcess(QObject *parent) :
|
||||
IpcProcessInterfaceSource(parent),
|
||||
m_process(QSharedPointer<QProcess>(new QProcess()))
|
||||
|
@ -103,3 +105,5 @@ QByteArray IpcServerProcess::readAllStandardOutput()
|
|||
{
|
||||
return m_process->readAllStandardOutput();
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -2,8 +2,9 @@
|
|||
#define IPCSERVERPROCESS_H
|
||||
|
||||
#include <QObject>
|
||||
#include "rep_ipcinterface_source.h"
|
||||
|
||||
#ifndef Q_OS_IOS
|
||||
#include "rep_ipc_process_interface_source.h"
|
||||
|
||||
class IpcServerProcess : public IpcProcessInterfaceSource
|
||||
{
|
||||
|
@ -33,4 +34,14 @@ private:
|
|||
QSharedPointer<QProcess> m_process;
|
||||
};
|
||||
|
||||
#else
|
||||
class IpcServerProcess : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit IpcServerProcess(QObject *parent = nullptr);
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif // IPCSERVERPROCESS_H
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue