1
0
mirror of synced 2024-12-04 20:17:57 +01:00
ImHex/main/gui/include/messaging.hpp

37 lines
1.0 KiB
C++
Raw Normal View History

#pragma once
2023-11-10 20:47:08 +01:00
#include <string>
#include <vector>
2023-11-10 20:47:08 +01:00
#include <hex/helpers/types.hpp>
/**
* Cross-instance (cross-process) messaging system
* As of now, this system may not be stable for use beyond its current use:
* forwarding providers opened in new instances
*/
namespace hex::messaging {
/**
* @brief Setup everything to be able to send/receive messages
*/
void setupMessaging();
/**
* @brief Internal method - setup platform-specific things to be able to send messages
* @return if this instance has been determined to be the main instance
*/
bool setupNative();
/**
* @brief Internal method - send a message to another Imhex instance in a platform-specific way
*/
void sendToOtherInstance(const std::string &eventName, const std::vector<u8> &args);
/**
* @brief Internal method - called by platform-specific code when a event has been received
*/
void messageReceived(const std::string &eventName, const std::vector<u8> &args);
2023-08-26 23:31:25 +02:00
}