Skip to main content

Module messages

Module messages 

Source
Expand description

§IPC Messages Module

This module defines the core IPC protocol structures used for communication between the RPFM frontend and backend server.

§Overview

The protocol is built around three main types:

  • Message<T>: A generic wrapper that adds request-response correlation via unique IDs.
  • Command: An enum defining all actions the frontend can request from the server.
  • Response: An enum defining all possible results the server can return.

§Message Correlation

Every message includes a unique id field that allows the frontend to match responses to their original requests. This enables:

  • Asynchronous communication: Multiple requests can be in flight simultaneously.
  • Non-blocking UI: The frontend doesn’t need to wait for responses before sending new requests.
  • Error handling: Responses can be matched back to the context that initiated them.

§Command Categories

Commands are organized into logical groups:

  • PackFile Operations: Open, save, close, and modify PackFiles.
  • PackedFile Operations: Create, delete, extract, rename, and decode individual files.
  • Dependency Operations: Query and manage game dependencies.
  • Search Operations: Global search and reference lookups.
  • Schema Operations: Load, save, and update table schemas.
  • Settings Operations: Get and set application settings.
  • Update Operations: Check for and apply updates to schemas, translations, etc.
  • Diagnostics: Run diagnostic checks on PackFiles.
  • Navigation: Go-to-definition and reference search features.

§Response Types

Responses are typically named after the types they contain (e.g., Response::Bool(bool), Response::String(String)). For complex operations, specialized responses like Response::DBRFileInfo or Response::ContainerInfoVecRFileInfo carry domain-specific data.

Each Command variant’s documentation specifies which Response variant(s) it returns.

Structs§

Message
This struct is a wrapper for all messages (commands and responses) sent between the UI and the server.

Enums§

Command
This enum defines the commands (messages) you can send to the background thread in order to execute actions.
OperationalMode
This enum represents the current operational mode for a pack.
Response
This enum defines the responses (messages) you can send to the UI thread as result of a command.