forked from doublejim/QYoutubeDownloader
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathipc_client_server.h
More file actions
44 lines (38 loc) · 1.1 KB
/
ipc_client_server.h
File metadata and controls
44 lines (38 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#ifndef IPC_CLIENT_SERVER_H
#include <QObject>
#include <QLocalSocket>
#include <QLocalServer>
#include <QtWidgets>
#include <QDialog>
#include <QDebug>
#include <QStringList>
#include <mainwindow.h>
#define IPC_CLIENT_SERVER_H
class IPCClientServer : QObject
{
Q_OBJECT
public:
IPCClientServer(MainWindow* window, QString youtube_url = "");
private slots:
void readAck();
void readReply();
void sendAck();
void sendReply();
void displayError(QLocalSocket::LocalSocketError socketError);
void displayErrorReply(QLocalSocket::LocalSocketError socketError);
private:
void sendMsg(QLocalServer * send_to, QString msg);
void readMsg(QLocalSocket * socket_to_read);
QLocalSocket * socket_ack;
QLocalSocket * socket_reply;
QLocalServer * server;
QLocalServer * server_reply;
const QString server_name = "QYoutubeDownloader";
const QString server_name_reply = "QYoutubeDownloaderReply";
QString youtube_url;
quint16 blockSize;
const bool activate_debugging = false;
void debug(QString msg);
MainWindow* window;
};
#endif // IPC_CLIENT_SERVER_H