rpc_app.h 761 B

1234567891011121314151617181920212223242526272829303132
  1. #pragma once
  2. #include "rpc.h"
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. typedef enum {
  7. RpcAppEventSessionClose,
  8. RpcAppEventAppExit,
  9. RpcAppEventLoadFile,
  10. RpcAppEventButtonPress,
  11. RpcAppEventButtonRelease,
  12. } RpcAppSystemEvent;
  13. typedef void (*RpcAppSystemCallback)(RpcAppSystemEvent event, void* context);
  14. typedef struct RpcAppSystem RpcAppSystem;
  15. void rpc_system_app_set_callback(RpcAppSystem* rpc_app, RpcAppSystemCallback callback, void* ctx);
  16. void rpc_system_app_send_started(RpcAppSystem* rpc_app);
  17. void rpc_system_app_send_exited(RpcAppSystem* rpc_app);
  18. const char* rpc_system_app_get_data(RpcAppSystem* rpc_app);
  19. void rpc_system_app_confirm(RpcAppSystem* rpc_app, RpcAppSystemEvent event, bool result);
  20. #ifdef __cplusplus
  21. }
  22. #endif