Moonlight-XboxOG latest
Moonlight Xbox OG is a port of the Moonlight Game Streaming client to the original Xbox console.
client_identity_storage.h File Reference

Declares client identity persistence. More...

#include <string>
#include <vector>
#include "src/network/host_pairing.h"
Include dependency graph for client_identity_storage.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  startup::LoadClientIdentityResult
 Result of loading persisted client pairing identity material. More...
 
struct  startup::SaveClientIdentityResult
 Result of saving client pairing identity material. More...
 

Functions

std::string startup::default_client_identity_directory ()
 Return the default directory used to store pairing identity files.
 
bool startup::delete_client_identity (std::string *errorMessage=nullptr, const std::string &directoryPath=default_client_identity_directory())
 Delete persisted client identity material from disk.
 
LoadClientIdentityResult startup::load_client_identity (const std::string &directoryPath=default_client_identity_directory())
 Load persisted client pairing identity material from disk.
 
SaveClientIdentityResult startup::save_client_identity (const network::PairingIdentity &identity, const std::string &directoryPath=default_client_identity_directory())
 Save client pairing identity material to disk.
 

Detailed Description

Declares client identity persistence.

Function Documentation

◆ default_client_identity_directory()

std::string startup::default_client_identity_directory ( )

Return the default directory used to store pairing identity files.

Returns
Default client identity directory path.

◆ delete_client_identity()

bool startup::delete_client_identity ( std::string * errorMessage = nullptr,
const std::string & directoryPath = default_client_identity_directory() )

Delete persisted client identity material from disk.

Parameters
errorMessageOptional output for deletion failures.
directoryPathDirectory containing the identity files.
Returns
true when the files were removed or were already absent.

◆ load_client_identity()

LoadClientIdentityResult startup::load_client_identity ( const std::string & directoryPath = default_client_identity_directory())

Load persisted client pairing identity material from disk.

Parameters
directoryPathDirectory containing the identity files.
Returns
Loaded identity plus any non-fatal warnings.

◆ save_client_identity()

SaveClientIdentityResult startup::save_client_identity ( const network::PairingIdentity & identity,
const std::string & directoryPath = default_client_identity_directory() )

Save client pairing identity material to disk.

Parameters
identityClient identity to persist.
directoryPathDirectory where the identity files should be written.
Returns
Save result including success state and error detail.