mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-30 21:05:56 -05:00
feat: Added command line interface support (#1172)
System design has been discussed on discord Should fix #948 --------- Co-authored-by: WerWolv <werwolv98@gmail.com>
This commit is contained in:
35
main/include/messaging.hpp
Normal file
35
main/include/messaging.hpp
Normal file
@@ -0,0 +1,35 @@
|
||||
#pragma once
|
||||
|
||||
#include<string>
|
||||
#include<vector>
|
||||
|
||||
#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);
|
||||
}
|
||||
Reference in New Issue
Block a user