Documentation
¶
Index ¶
- Constants
- Variables
- func RoomKeyForCache(room commonrest.RoomInfo, profileID uuid.UUID) string
- type App
- func (a *App) AcquireProfileLaunchLock(profileID uuid.UUID) (*ProfileLaunchLock, error)
- func (a *App) ClearModCache() error
- func (a *App) ClearRunningProfile(profileID uuid.UUID)
- func (a *App) CurrentBusyProfile() (uuid.UUID, bool)
- func (a *App) CurrentRoomInfo(info *IPCLobbyInfo) (commonrest.RoomInfo, bool)
- func (a *App) CurrentRunningProfile() (profile.Profile, int, bool)
- func (a *App) CurrentRunningProfileAndPID() (uuid.UUID, int)
- func (a *App) DetectGamePath() (string, error)
- func (a *App) DetectLauncherType(path string) aumgr.LauncherType
- func (a *App) DownloadArchiveURLToTempFile(archiveURL string, progressListener progress.Progress) (string, error)
- func (a *App) ExecuteLaunch(gamePath string, dllDir string, joinInfo *LaunchJoinInfo, ...) error
- func (a *App) ExportProfile(prof profile.Profile) (string, error)
- func (a *App) ExportProfileArchive(prof profile.Profile, iconPNG []byte) ([]byte, error)
- func (a *App) GetGameVersion(gamePath string) (string, error)
- func (a *App) GetLobbyInfo() *IPCLobbyInfo
- func (a *App) GetLobbyInfoByPID(pid int) (*IPCLobbyInfo, error)
- func (a *App) GetSharedRoom() SharedRoomLink
- func (a *App) HandleImportReader(reader io.Reader, extension string) (*profile.SharedProfile, []byte, error)
- func (a *App) HandleJoinGameDownload(sessionID string, serverBase string) (*profile.SharedProfile, []byte, *LaunchJoinInfo, error)
- func (a *App) HandleSharedProfile(uri string) (*profile.SharedProfile, error)
- func (a *App) HandleSharedProfileArchive(reader io.ReaderAt, size int64) (*profile.SharedProfile, []byte, error)
- func (a *App) HandleSharedProfileArchiveFile(path string) (*profile.SharedProfile, []byte, error)
- func (a *App) HasDirectJoinFeature(versions []modmgr.ModVersion) bool
- func (a *App) HeartbeatRoomShareAsync()
- func (a *App) ImportSharedProfile(shared *profile.SharedProfile, iconPNG []byte) (*profile.Profile, error)
- func (a *App) InvalidateCachedRoomShareAsync()
- func (a *App) IsAnyProfileBusy() bool
- func (a *App) IsCurrentRunningProcess(profileID uuid.UUID, pid int) bool
- func (a *App) IsDirectJoinEnabledForRunningProfile() bool
- func (a *App) IsLobbyInfoAvailable() bool
- func (a *App) IsProfileBusy(profileID uuid.UUID) bool
- func (a *App) IsProfileRunning(profileID uuid.UUID) bool
- func (a *App) IsRoomShareGenerating() bool
- func (a *App) LoadRunningProfilesFromLocks() ([]RunningProfileInfo, error)
- func (a *App) OnGameExitedInternal(profileID uuid.UUID)
- func (a *App) OnGameStartedInternal(profileID uuid.UUID, pid int)
- func (a *App) ParseJoinGameURI(uri string) (*JoinGameLink, error)
- func (a *App) PrepareLaunch(gamePath string, profileID uuid.UUID) (string, func() error, error)
- func (a *App) ResolveDependencies(initialMods []modmgr.ModVersion) ([]modmgr.ModVersion, error)
- func (a *App) ResolveProfileDependencies(profileID uuid.UUID) ([]modmgr.ModVersion, error)
- func (a *App) SendLobbyJoinByPID(pid int, joinInfo LaunchJoinInfo) <-chan error
- func (a *App) SetLaunchingProfile(profileID uuid.UUID, launching bool)
- func (a *App) SetRoomShareGenerating(generating bool)
- func (a *App) SetRunningDirectJoin(enabled bool)
- func (a *App) SetRunningPlayStartedAt(startedAt time.Time)
- func (a *App) SetRunningProfile(profileID uuid.UUID)
- func (a *App) SetSharedRoom(link SharedRoomLink)
- func (a *App) StartActivityPolling(ctx context.Context)
- func (a *App) StartLobbyInfoPolling(pid int, interval time.Duration, onInfo func(*IPCLobbyInfo), ...) func()
- func (a *App) StartLobbyPolling(pid int)
- func (a *App) StopLobbyPolling()
- func (a *App) SyncProfile(profileID uuid.UUID, binaryType aumgr.BinaryType, gameVersion string, ...) error
- func (a *App) WatchRestoredRunningProfile(profileID uuid.UUID, pid int, startedAt time.Time, pollInterval time.Duration, ...)
- type IPCLobbyInfo
- type JoinGameLink
- type LaunchJoinInfo
- type ProfileLaunchLock
- type RunningProfileInfo
- type SharedRoomLink
Constants ¶
View Source
const ( ProfileVersion = "v1" ProfileArchiveDownloadTimeout = 30 * time.Second ProfileArchiveDownloadMaxBytes = int64(64 << 20) )
Variables ¶
View Source
var ErrProfileLaunchBusy = errors.New("profile launch is already running")
Functions ¶
func RoomKeyForCache ¶ added in v1.8.1
func RoomKeyForCache(room commonrest.RoomInfo, profileID uuid.UUID) string
Types ¶
type App ¶
type App struct {
Version string
ConfigDir string
Rest rest.Client
ProfileManager *profile.Manager
EpicSessionManager *aumgr.EpicSessionManager
EpicApi *aumgr.EpicApi
DiscordService *discord.DiscordService
// Callbacks for state changes
OnGameStarted func(profileID uuid.UUID, pid int)
OnGameExited func(profileID uuid.UUID)
OnLobbyInfoUpdated func(info *IPCLobbyInfo)
// contains filtered or unexported fields
}
func (*App) AcquireProfileLaunchLock ¶ added in v1.5.3
func (a *App) AcquireProfileLaunchLock(profileID uuid.UUID) (*ProfileLaunchLock, error)
func (*App) ClearModCache ¶
func (*App) ClearRunningProfile ¶ added in v1.8.1
func (*App) CurrentBusyProfile ¶ added in v1.8.1
func (*App) CurrentRoomInfo ¶ added in v1.8.1
func (a *App) CurrentRoomInfo(info *IPCLobbyInfo) (commonrest.RoomInfo, bool)
func (*App) CurrentRunningProfile ¶ added in v1.8.1
func (*App) CurrentRunningProfileAndPID ¶ added in v1.8.1
func (*App) DetectGamePath ¶
func (*App) DetectLauncherType ¶
func (a *App) DetectLauncherType(path string) aumgr.LauncherType
func (*App) DownloadArchiveURLToTempFile ¶ added in v1.8.1
func (*App) ExecuteLaunch ¶
func (a *App) ExecuteLaunch(gamePath string, dllDir string, joinInfo *LaunchJoinInfo, onStarted func(pid int) error) error
ExecuteLaunch launches the game and blocks until it exits.
func (*App) ExportProfileArchive ¶ added in v1.5.0
func (*App) GetGameVersion ¶ added in v1.6.10
func (*App) GetLobbyInfo ¶ added in v1.8.1
func (a *App) GetLobbyInfo() *IPCLobbyInfo
func (*App) GetLobbyInfoByPID ¶ added in v1.6.0
func (a *App) GetLobbyInfoByPID(pid int) (*IPCLobbyInfo, error)
func (*App) GetSharedRoom ¶ added in v1.8.1
func (a *App) GetSharedRoom() SharedRoomLink
func (*App) HandleImportReader ¶ added in v1.8.1
func (*App) HandleJoinGameDownload ¶ added in v1.8.1
func (a *App) HandleJoinGameDownload(sessionID string, serverBase string) (*profile.SharedProfile, []byte, *LaunchJoinInfo, error)
func (*App) HandleSharedProfile ¶
func (a *App) HandleSharedProfile(uri string) (*profile.SharedProfile, error)
func (*App) HandleSharedProfileArchive ¶ added in v1.5.0
func (*App) HandleSharedProfileArchiveFile ¶ added in v1.5.0
func (*App) HasDirectJoinFeature ¶ added in v1.8.1
func (a *App) HasDirectJoinFeature(versions []modmgr.ModVersion) bool
func (*App) HeartbeatRoomShareAsync ¶ added in v1.8.1
func (a *App) HeartbeatRoomShareAsync()
func (*App) ImportSharedProfile ¶ added in v1.8.1
func (*App) InvalidateCachedRoomShareAsync ¶ added in v1.8.1
func (a *App) InvalidateCachedRoomShareAsync()
func (*App) IsAnyProfileBusy ¶ added in v1.8.1
func (*App) IsCurrentRunningProcess ¶ added in v1.8.1
func (*App) IsDirectJoinEnabledForRunningProfile ¶ added in v1.8.1
func (*App) IsLobbyInfoAvailable ¶ added in v1.6.0
func (*App) IsProfileRunning ¶ added in v1.8.1
func (*App) IsRoomShareGenerating ¶ added in v1.8.1
func (*App) LoadRunningProfilesFromLocks ¶ added in v1.6.2
func (a *App) LoadRunningProfilesFromLocks() ([]RunningProfileInfo, error)
LoadRunningProfilesFromLocks scans the profile lock directory and returns information about profiles that are currently running (have valid lock files with active processes).
func (*App) OnGameExitedInternal ¶ added in v1.8.1
func (*App) OnGameStartedInternal ¶ added in v1.8.1
func (*App) ParseJoinGameURI ¶ added in v1.6.0
func (a *App) ParseJoinGameURI(uri string) (*JoinGameLink, error)
func (*App) PrepareLaunch ¶
PrepareLaunch prepares the game for launch by preparing the profile directory.
func (*App) ResolveDependencies ¶
func (a *App) ResolveDependencies(initialMods []modmgr.ModVersion) ([]modmgr.ModVersion, error)
func (*App) ResolveProfileDependencies ¶
ResolveProfileDependencies resolves all required dependencies for the given profile.
func (*App) SendLobbyJoinByPID ¶ added in v1.6.0
func (a *App) SendLobbyJoinByPID(pid int, joinInfo LaunchJoinInfo) <-chan error
func (*App) SetLaunchingProfile ¶ added in v1.8.1
func (*App) SetRoomShareGenerating ¶ added in v1.8.1
func (*App) SetRunningDirectJoin ¶ added in v1.8.1
func (*App) SetRunningPlayStartedAt ¶ added in v1.8.1
func (*App) SetRunningProfile ¶ added in v1.8.1
func (*App) SetSharedRoom ¶ added in v1.8.1
func (a *App) SetSharedRoom(link SharedRoomLink)
func (*App) StartActivityPolling ¶ added in v1.8.1
func (*App) StartLobbyInfoPolling ¶ added in v1.6.0
func (*App) StartLobbyPolling ¶ added in v1.8.1
func (*App) StopLobbyPolling ¶ added in v1.8.1
func (a *App) StopLobbyPolling()
type IPCLobbyInfo ¶ added in v1.6.0
type IPCLobbyInfo struct {
HasClient bool `json:"HasClient"`
IsConnected bool `json:"IsConnected"`
GameState string `json:"GameState"`
LobbyCode string `json:"LobbyCode"`
ServerIP string `json:"ServerIp"`
ServerPort int `json:"ServerPort"`
IsHost *bool `json:"IsHost"`
IsInGame *bool `json:"IsInGame"`
MatchMakerIp string `json:"MatchMakerIp"`
MatchMakerPort int `json:"MatchMakerPort"`
JoinedPlayers int `json:"JoinedPlayers"`
MaxPlayers int `json:"MaxPlayers"`
}
func (*IPCLobbyInfo) String ¶ added in v1.6.10
func (i *IPCLobbyInfo) String() string
type JoinGameLink ¶ added in v1.6.0
type LaunchJoinInfo ¶ added in v1.6.0
type ProfileLaunchLock ¶ added in v1.5.3
type ProfileLaunchLock struct {
// contains filtered or unexported fields
}
func (*ProfileLaunchLock) Release ¶ added in v1.5.3
func (l *ProfileLaunchLock) Release() error
func (*ProfileLaunchLock) SetGamePID ¶ added in v1.5.3
type RunningProfileInfo ¶ added in v1.6.2
type SharedRoomLink ¶ added in v1.8.1
type SharedRoomLink struct {
}
Click to show internal directories.
Click to hide internal directories.