yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
yaze::editor::AgentCollaborationCoordinator Class Reference

#include <agent_collaboration_coordinator.h>

Classes

struct  SessionFileData
 
struct  SessionInfo
 

Public Member Functions

 AgentCollaborationCoordinator ()
 
absl::StatusOr< SessionInfoHostSession (const std::string &session_name)
 
absl::StatusOr< SessionInfoJoinSession (const std::string &session_code)
 
absl::Status LeaveSession ()
 
absl::StatusOr< SessionInfoRefreshSession ()
 
bool active () const
 
const std::string & session_id () const
 
const std::string & session_name () const
 

Private Member Functions

absl::Status EnsureDirectory () const
 
std::string LocalUserName () const
 
std::string NormalizeSessionCode (const std::string &input) const
 
std::string GenerateSessionCode () const
 
std::filesystem::path SessionsDirectory () const
 
std::filesystem::path SessionFilePath (const std::string &code) const
 
absl::StatusOr< SessionFileDataLoadSessionFile (const std::filesystem::path &path) const
 
absl::Status WriteSessionFile (const std::filesystem::path &path, const SessionFileData &data) const
 

Private Attributes

bool active_ = false
 
bool hosting_ = false
 
std::string session_id_
 
std::string session_name_
 
std::string local_user_
 

Detailed Description

Definition at line 18 of file agent_collaboration_coordinator.h.

Constructor & Destructor Documentation

◆ AgentCollaborationCoordinator()

yaze::editor::AgentCollaborationCoordinator::AgentCollaborationCoordinator ( )

Definition at line 53 of file agent_collaboration_coordinator.cc.

Member Function Documentation

◆ HostSession()

◆ JoinSession()

◆ LeaveSession()

absl::Status yaze::editor::AgentCollaborationCoordinator::LeaveSession ( )

◆ RefreshSession()

◆ active()

bool yaze::editor::AgentCollaborationCoordinator::active ( ) const
inline

Definition at line 33 of file agent_collaboration_coordinator.h.

References active_.

◆ session_id()

const std::string & yaze::editor::AgentCollaborationCoordinator::session_id ( ) const
inline

Definition at line 34 of file agent_collaboration_coordinator.h.

References session_id_.

◆ session_name()

const std::string & yaze::editor::AgentCollaborationCoordinator::session_name ( ) const
inline

Definition at line 35 of file agent_collaboration_coordinator.h.

References session_name_.

Referenced by HostSession().

◆ EnsureDirectory()

absl::Status yaze::editor::AgentCollaborationCoordinator::EnsureDirectory ( ) const
private

Definition at line 204 of file agent_collaboration_coordinator.cc.

References SessionsDirectory().

Referenced by HostSession(), and JoinSession().

Here is the call graph for this function:

◆ LocalUserName()

std::string yaze::editor::AgentCollaborationCoordinator::LocalUserName ( ) const
private

Definition at line 214 of file agent_collaboration_coordinator.cc.

◆ NormalizeSessionCode()

std::string yaze::editor::AgentCollaborationCoordinator::NormalizeSessionCode ( const std::string &  input) const
private

Definition at line 236 of file agent_collaboration_coordinator.cc.

Referenced by JoinSession(), and LoadSessionFile().

◆ GenerateSessionCode()

std::string yaze::editor::AgentCollaborationCoordinator::GenerateSessionCode ( ) const
private

Definition at line 253 of file agent_collaboration_coordinator.cc.

Referenced by HostSession().

◆ SessionsDirectory()

std::filesystem::path yaze::editor::AgentCollaborationCoordinator::SessionsDirectory ( ) const
private

Definition at line 265 of file agent_collaboration_coordinator.cc.

References yaze::util::PlatformPaths::GetConfigDirectory().

Referenced by EnsureDirectory(), and SessionFilePath().

Here is the call graph for this function:

◆ SessionFilePath()

std::filesystem::path yaze::editor::AgentCollaborationCoordinator::SessionFilePath ( const std::string &  code) const
private

Definition at line 274 of file agent_collaboration_coordinator.cc.

References SessionsDirectory().

Referenced by HostSession(), JoinSession(), LeaveSession(), and RefreshSession().

Here is the call graph for this function:

◆ LoadSessionFile()

◆ WriteSessionFile()

Member Data Documentation

◆ active_

bool yaze::editor::AgentCollaborationCoordinator::active_ = false
private

◆ hosting_

bool yaze::editor::AgentCollaborationCoordinator::hosting_ = false
private

◆ session_id_

std::string yaze::editor::AgentCollaborationCoordinator::session_id_
private

◆ session_name_

std::string yaze::editor::AgentCollaborationCoordinator::session_name_
private

◆ local_user_

std::string yaze::editor::AgentCollaborationCoordinator::local_user_
private

Definition at line 60 of file agent_collaboration_coordinator.h.

Referenced by HostSession(), JoinSession(), and LeaveSession().


The documentation for this class was generated from the following files: