1#ifndef TCRSDK_TCR_SESSION_H_
2#define TCRSDK_TCR_SESSION_H_
222 bool Start(
const char* serverSession);
244 void SetRemoteVideoProfile(int32_t fps, int32_t minBitrate, int32_t maxBitrate, std::shared_ptr<AsyncCallback> callback);
292 std::shared_ptr<CustomDataChannel>
CreateCustomDataChannel(int32_t port, std::shared_ptr<CustomDataChannel::Observer>observer);
316 class TcrSessionImpl;
317 std::shared_ptr<TcrSessionImpl>impl_;
This interface is used to interact with the virtual Gamepad device on the server.
Definition gamepad.h:10
This interface is used to interact with the virtual Keyboard device on the server.
Definition keyboard.h:11
This interface is used to interact with the virtual Mouse device on the server.
Definition mouse.h:10
The Observer class is used to receive events from TcrSession.
Definition tcr_session.h:196
virtual void onEvent(Event event, const char *eventData)=0
This will be called when some event happened in the session.
This interface represents a session between the client and the TCR server.
Definition tcr_session.h:19
void SetRemoteDesktopResolution(int32_t width, int32_t height)
Set the resolution of Cloud Desktop.
void RestartCloudApp()
Restart the cloud application process.
bool Start(const char *serverSession)
Starts the session.
void SetVideoFrameObserver(std::shared_ptr< VideoFrameObserver > video_frame_observer)
Set the callback of the video frame.
const Keyboard * GetKeyboard()
Return the interface to interact with the cloud keyboard in this session.
void PauseStreaming()
Resume the media stream.
Event
Session event definitions.
Definition tcr_session.h:26
@ CLIENT_STATS
This event indicates that the performance data is updated.
@ CURSOR_STATE_CHANGE
This event indicates that the showing status of cloud cursor is changed.
@ CURSOR_IMAGE_INFO
This event indicates that the remote cursor image information is updated.
@ ARCHIVE_LOAD_STATUS
This event indicates the status of the archive loading in the server.
@ SCREEN_CONFIG_CHANGE
This event indicates that the configuration of the cloud screen configuration has been changed.
@ GAME_START_COMPLETE
This event indicates that the status of the game process on the server has been changed.
@ ARCHIVE_SAVE_STATUS
This event indicates the status of the archive saving in the server.
@ STATE_INITED
This event indicates that the session has been initialized.
@ STATE_CLOSED
This event indicates that the session is closed, and thus it can not be used any more.
@ REMOTE_DESKTOP_INFO
This event indicates that the remote desktop information is updated.
@ STATE_CONNECTED
This event indicates that the session is connected.
@ INPUT_STATUS_CHANGED
This event indicates that the input status of the server has changed.
void SetRemoteVideoProfile(int32_t fps, int32_t minBitrate, int32_t maxBitrate, std::shared_ptr< AsyncCallback > callback)
Set the local video profile.
TcrSession(std::shared_ptr< TcrSession::Observer > observer)
void PasteText(const char *msg)
Copy the text to the input box in the cloud application.
void ResumeStreaming()
Resume the media stream.
const Mouse * GetMouse()
Return the interface to interact with the cloud Mouse in this session.
std::shared_ptr< CustomDataChannel > CreateCustomDataChannel(int32_t port, std::shared_ptr< CustomDataChannel::Observer >observer)
Creates a custom data channel.
const Gamepad * GetGamepad()
Return the interface to interact with the cloud Gamepad in this session.