mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-08-11 22:23:49 +00:00
41 lines
817 B
C++
41 lines
817 B
C++
// This is the source code of AyuGram for Desktop.
|
|
//
|
|
// We do not and cannot prevent the use of our code,
|
|
// but be respectful and credit the original author.
|
|
//
|
|
// Copyright @Radolyn, 2023
|
|
|
|
#pragma once
|
|
|
|
#include "ayu/libs/json.hpp"
|
|
#include "utils/ayu_pipe_wrapper.h"
|
|
|
|
using json = nlohmann::json;
|
|
|
|
const std::string AgentFilename =
|
|
#ifdef _WIN32
|
|
"AyuSync.Agent.exe";
|
|
#else
|
|
"AyuSync.Agent";
|
|
#endif
|
|
|
|
const std::string AgentPath = "./AyuSync/" + AgentFilename;
|
|
|
|
namespace AyuSync {
|
|
class ayu_sync_controller {
|
|
public:
|
|
void initializeAgent();
|
|
|
|
void invokeHandler(json p);
|
|
private:
|
|
void receiver();
|
|
|
|
std::unique_ptr<ayu_pipe_wrapper> pipe;
|
|
};
|
|
|
|
ayu_sync_controller &getControllerInstance();
|
|
|
|
bool isAgentDownloaded();
|
|
bool isAgentRunning();
|
|
}
|