Commit 6d6de592 authored by Erik Jensen's avatar Erik Jensen Committed by Commit Bot

Switch chromoting_messages.h to new variadic macros.

The IPC_MESSAGE_CONTROL[0-5] macros have been deprecated in favor of a
new variadic IPC_MESSAGE_CONTROL macro.

Change-Id: I64a0e8c7ec3c51b387de615950f93b6d5798d3a6
Reviewed-on: https://chromium-review.googlesource.com/c/1354102
Commit-Queue: Erik Jensen <rkjnsn@chromium.org>
Reviewed-by: default avatarJoe Downing <joedow@chromium.org>
Reviewed-by: default avatarDaniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#612828}
parent eb740f10
...@@ -35,56 +35,56 @@ ...@@ -35,56 +35,56 @@
// sends this message when a fatal error has been detected indicating that // sends this message when a fatal error has been detected indicating that
// the receiving process misbehaves. The daemon passes the location of the code // the receiving process misbehaves. The daemon passes the location of the code
// that detected the error. // that detected the error.
IPC_MESSAGE_CONTROL3(ChromotingDaemonMsg_Crash, IPC_MESSAGE_CONTROL(ChromotingDaemonMsg_Crash,
std::string /* function_name */, std::string /* function_name */,
std::string /* file_name */, std::string /* file_name */,
int /* line_number */) int /* line_number */)
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Chromoting messages sent from the daemon to the network process. // Chromoting messages sent from the daemon to the network process.
// Delivers the host configuration (and updates) to the network process. // Delivers the host configuration (and updates) to the network process.
IPC_MESSAGE_CONTROL1(ChromotingDaemonNetworkMsg_Configuration, std::string) IPC_MESSAGE_CONTROL(ChromotingDaemonNetworkMsg_Configuration, std::string)
// Initializes the pairing registry on Windows. The passed key handles are // Initializes the pairing registry on Windows. The passed key handles are
// already duplicated by the sender. // already duplicated by the sender.
IPC_MESSAGE_CONTROL2(ChromotingDaemonNetworkMsg_InitializePairingRegistry, IPC_MESSAGE_CONTROL(ChromotingDaemonNetworkMsg_InitializePairingRegistry,
IPC::PlatformFileForTransit /* privileged_key */, IPC::PlatformFileForTransit /* privileged_key */,
IPC::PlatformFileForTransit /* unprivileged_key */) IPC::PlatformFileForTransit /* unprivileged_key */)
// Notifies the network process that the terminal |terminal_id| has been // Notifies the network process that the terminal |terminal_id| has been
// disconnected from the desktop session. // disconnected from the desktop session.
IPC_MESSAGE_CONTROL1(ChromotingDaemonNetworkMsg_TerminalDisconnected, IPC_MESSAGE_CONTROL(ChromotingDaemonNetworkMsg_TerminalDisconnected,
int /* terminal_id */) int /* terminal_id */)
// Notifies the network process that |terminal_id| is now attached to // Notifies the network process that |terminal_id| is now attached to
// a desktop integration process. |session_id| is the id of the desktop session // a desktop integration process. |session_id| is the id of the desktop session
// being attached. |desktop_pipe| is the client end of the desktop-to-network // being attached. |desktop_pipe| is the client end of the desktop-to-network
// pipe opened. // pipe opened.
IPC_MESSAGE_CONTROL3(ChromotingDaemonNetworkMsg_DesktopAttached, IPC_MESSAGE_CONTROL(ChromotingDaemonNetworkMsg_DesktopAttached,
int /* terminal_id */, int /* terminal_id */,
int /* session_id */, int /* session_id */,
IPC::ChannelHandle /* desktop_pipe */) IPC::ChannelHandle /* desktop_pipe */)
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Chromoting messages sent from the network to the daemon process. // Chromoting messages sent from the network to the daemon process.
// Connects the terminal |terminal_id| (i.e. a remote client) to a desktop // Connects the terminal |terminal_id| (i.e. a remote client) to a desktop
// session. // session.
IPC_MESSAGE_CONTROL3(ChromotingNetworkHostMsg_ConnectTerminal, IPC_MESSAGE_CONTROL(ChromotingNetworkHostMsg_ConnectTerminal,
int /* terminal_id */, int /* terminal_id */,
remoting::ScreenResolution /* resolution */, remoting::ScreenResolution /* resolution */,
bool /* virtual_terminal */) bool /* virtual_terminal */)
// Disconnects the terminal |terminal_id| from the desktop session it was // Disconnects the terminal |terminal_id| from the desktop session it was
// connected to. // connected to.
IPC_MESSAGE_CONTROL1(ChromotingNetworkHostMsg_DisconnectTerminal, IPC_MESSAGE_CONTROL(ChromotingNetworkHostMsg_DisconnectTerminal,
int /* terminal_id */) int /* terminal_id */)
// Changes the screen resolution in the given desktop session. // Changes the screen resolution in the given desktop session.
IPC_MESSAGE_CONTROL2(ChromotingNetworkDaemonMsg_SetScreenResolution, IPC_MESSAGE_CONTROL(ChromotingNetworkDaemonMsg_SetScreenResolution,
int /* terminal_id */, int /* terminal_id */,
remoting::ScreenResolution /* resolution */) remoting::ScreenResolution /* resolution */)
// Serialized remoting::protocol::TransportRoute structure. // Serialized remoting::protocol::TransportRoute structure.
IPC_STRUCT_BEGIN(SerializedTransportRoute) IPC_STRUCT_BEGIN(SerializedTransportRoute)
...@@ -100,27 +100,27 @@ IPC_ENUM_TRAITS_MAX_VALUE(remoting::protocol::TransportRoute::RouteType, ...@@ -100,27 +100,27 @@ IPC_ENUM_TRAITS_MAX_VALUE(remoting::protocol::TransportRoute::RouteType,
// Hosts status notifications (see HostStatusObserver interface) sent by // Hosts status notifications (see HostStatusObserver interface) sent by
// IpcHostEventLogger. // IpcHostEventLogger.
IPC_MESSAGE_CONTROL1(ChromotingNetworkDaemonMsg_AccessDenied, IPC_MESSAGE_CONTROL(ChromotingNetworkDaemonMsg_AccessDenied,
std::string /* jid */) std::string /* jid */)
IPC_MESSAGE_CONTROL1(ChromotingNetworkDaemonMsg_ClientAuthenticated, IPC_MESSAGE_CONTROL(ChromotingNetworkDaemonMsg_ClientAuthenticated,
std::string /* jid */) std::string /* jid */)
IPC_MESSAGE_CONTROL1(ChromotingNetworkDaemonMsg_ClientConnected, IPC_MESSAGE_CONTROL(ChromotingNetworkDaemonMsg_ClientConnected,
std::string /* jid */) std::string /* jid */)
IPC_MESSAGE_CONTROL1(ChromotingNetworkDaemonMsg_ClientDisconnected, IPC_MESSAGE_CONTROL(ChromotingNetworkDaemonMsg_ClientDisconnected,
std::string /* jid */) std::string /* jid */)
IPC_MESSAGE_CONTROL3(ChromotingNetworkDaemonMsg_ClientRouteChange, IPC_MESSAGE_CONTROL(ChromotingNetworkDaemonMsg_ClientRouteChange,
std::string /* jid */, std::string /* jid */,
std::string /* channel_name */, std::string /* channel_name */,
SerializedTransportRoute /* route */) SerializedTransportRoute /* route */)
IPC_MESSAGE_CONTROL1(ChromotingNetworkDaemonMsg_HostStarted, IPC_MESSAGE_CONTROL(ChromotingNetworkDaemonMsg_HostStarted,
std::string /* xmpp_login */) std::string /* xmpp_login */)
IPC_MESSAGE_CONTROL0(ChromotingNetworkDaemonMsg_HostShutdown) IPC_MESSAGE_CONTROL(ChromotingNetworkDaemonMsg_HostShutdown)
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Chromoting messages sent from the desktop to the daemon process. // Chromoting messages sent from the desktop to the daemon process.
...@@ -128,25 +128,25 @@ IPC_MESSAGE_CONTROL0(ChromotingNetworkDaemonMsg_HostShutdown) ...@@ -128,25 +128,25 @@ IPC_MESSAGE_CONTROL0(ChromotingNetworkDaemonMsg_HostShutdown)
// Notifies the daemon that a desktop integration process has been initialized. // Notifies the daemon that a desktop integration process has been initialized.
// |desktop_pipe| specifies the client end of the desktop pipe. It is to be // |desktop_pipe| specifies the client end of the desktop pipe. It is to be
// forwarded to the desktop environment stub. // forwarded to the desktop environment stub.
IPC_MESSAGE_CONTROL1(ChromotingDesktopDaemonMsg_DesktopAttached, IPC_MESSAGE_CONTROL(ChromotingDesktopDaemonMsg_DesktopAttached,
IPC::ChannelHandle /* desktop_pipe */) IPC::ChannelHandle /* desktop_pipe */)
// Asks the daemon to inject Secure Attention Sequence (SAS) in the session // Asks the daemon to inject Secure Attention Sequence (SAS) in the session
// where the desktop process is running. // where the desktop process is running.
IPC_MESSAGE_CONTROL0(ChromotingDesktopDaemonMsg_InjectSas) IPC_MESSAGE_CONTROL(ChromotingDesktopDaemonMsg_InjectSas)
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Chromoting messages sent from the desktop to the network process. // Chromoting messages sent from the desktop to the network process.
// Notifies the network process that a shared buffer has been created. // Notifies the network process that a shared buffer has been created.
IPC_MESSAGE_CONTROL3(ChromotingDesktopNetworkMsg_CreateSharedBuffer, IPC_MESSAGE_CONTROL(ChromotingDesktopNetworkMsg_CreateSharedBuffer,
int /* id */, int /* id */,
base::SharedMemoryHandle /* handle */, base::SharedMemoryHandle /* handle */,
uint32_t /* size */) uint32_t /* size */)
// Request the network process to stop using a shared buffer. // Request the network process to stop using a shared buffer.
IPC_MESSAGE_CONTROL1(ChromotingDesktopNetworkMsg_ReleaseSharedBuffer, IPC_MESSAGE_CONTROL(ChromotingDesktopNetworkMsg_ReleaseSharedBuffer,
int /* id */) int /* id */)
// Serialized webrtc::DesktopFrame. // Serialized webrtc::DesktopFrame.
IPC_STRUCT_BEGIN(SerializedDesktopFrame) IPC_STRUCT_BEGIN(SerializedDesktopFrame)
...@@ -179,79 +179,79 @@ IPC_ENUM_TRAITS_MAX_VALUE(webrtc::DesktopCapturer::Result, ...@@ -179,79 +179,79 @@ IPC_ENUM_TRAITS_MAX_VALUE(webrtc::DesktopCapturer::Result,
webrtc::DesktopCapturer::Result::MAX_VALUE) webrtc::DesktopCapturer::Result::MAX_VALUE)
// Notifies the network process that a shared buffer has been created. // Notifies the network process that a shared buffer has been created.
IPC_MESSAGE_CONTROL2(ChromotingDesktopNetworkMsg_CaptureResult, IPC_MESSAGE_CONTROL(ChromotingDesktopNetworkMsg_CaptureResult,
webrtc::DesktopCapturer::Result /* result */, webrtc::DesktopCapturer::Result /* result */,
SerializedDesktopFrame /* frame */) SerializedDesktopFrame /* frame */)
// Notifies the network process that the host display layout has changed. // Notifies the network process that the host display layout has changed.
IPC_MESSAGE_CONTROL1(ChromotingDesktopNetworkMsg_DisplayChanged, IPC_MESSAGE_CONTROL(ChromotingDesktopNetworkMsg_DisplayChanged,
remoting::protocol::VideoLayout /* layout */) remoting::protocol::VideoLayout /* layout */)
// Carries a cursor share update from the desktop session agent to the client. // Carries a cursor share update from the desktop session agent to the client.
IPC_MESSAGE_CONTROL1(ChromotingDesktopNetworkMsg_MouseCursor, IPC_MESSAGE_CONTROL(ChromotingDesktopNetworkMsg_MouseCursor,
webrtc::MouseCursor /* cursor */ ) webrtc::MouseCursor /* cursor */)
// Carries a clipboard event from the desktop session agent to the client. // Carries a clipboard event from the desktop session agent to the client.
// |serialized_event| is a serialized protocol::ClipboardEvent. // |serialized_event| is a serialized protocol::ClipboardEvent.
IPC_MESSAGE_CONTROL1(ChromotingDesktopNetworkMsg_InjectClipboardEvent, IPC_MESSAGE_CONTROL(ChromotingDesktopNetworkMsg_InjectClipboardEvent,
std::string /* serialized_event */ ) std::string /* serialized_event */)
IPC_ENUM_TRAITS_MAX_VALUE(remoting::protocol::ErrorCode, IPC_ENUM_TRAITS_MAX_VALUE(remoting::protocol::ErrorCode,
remoting::protocol::ERROR_CODE_MAX) remoting::protocol::ERROR_CODE_MAX)
// Requests the network process to terminate the client session. // Requests the network process to terminate the client session.
IPC_MESSAGE_CONTROL1(ChromotingDesktopNetworkMsg_DisconnectSession, IPC_MESSAGE_CONTROL(ChromotingDesktopNetworkMsg_DisconnectSession,
remoting::protocol::ErrorCode /* error */) remoting::protocol::ErrorCode /* error */)
// Carries an audio packet from the desktop session agent to the client. // Carries an audio packet from the desktop session agent to the client.
// |serialized_packet| is a serialized AudioPacket. // |serialized_packet| is a serialized AudioPacket.
IPC_MESSAGE_CONTROL1(ChromotingDesktopNetworkMsg_AudioPacket, IPC_MESSAGE_CONTROL(ChromotingDesktopNetworkMsg_AudioPacket,
std::string /* serialized_packet */ ) std::string /* serialized_packet */)
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Chromoting messages sent from the network to the desktop process. // Chromoting messages sent from the network to the desktop process.
// Passes the client session data to the desktop session agent and starts it. // Passes the client session data to the desktop session agent and starts it.
// This must be the first message received from the host. // This must be the first message received from the host.
IPC_MESSAGE_CONTROL3(ChromotingNetworkDesktopMsg_StartSessionAgent, IPC_MESSAGE_CONTROL(ChromotingNetworkDesktopMsg_StartSessionAgent,
std::string /* authenticated_jid */, std::string /* authenticated_jid */,
remoting::ScreenResolution /* resolution */, remoting::ScreenResolution /* resolution */,
remoting::DesktopEnvironmentOptions /* options */) remoting::DesktopEnvironmentOptions /* options */)
IPC_MESSAGE_CONTROL0(ChromotingNetworkDesktopMsg_CaptureFrame) IPC_MESSAGE_CONTROL(ChromotingNetworkDesktopMsg_CaptureFrame)
// Carries a clipboard event from the client to the desktop session agent. // Carries a clipboard event from the client to the desktop session agent.
// |serialized_event| is a serialized protocol::ClipboardEvent. // |serialized_event| is a serialized protocol::ClipboardEvent.
IPC_MESSAGE_CONTROL1(ChromotingNetworkDesktopMsg_InjectClipboardEvent, IPC_MESSAGE_CONTROL(ChromotingNetworkDesktopMsg_InjectClipboardEvent,
std::string /* serialized_event */ ) std::string /* serialized_event */)
// Carries a keyboard event from the client to the desktop session agent. // Carries a keyboard event from the client to the desktop session agent.
// |serialized_event| is a serialized protocol::KeyEvent. // |serialized_event| is a serialized protocol::KeyEvent.
IPC_MESSAGE_CONTROL1(ChromotingNetworkDesktopMsg_InjectKeyEvent, IPC_MESSAGE_CONTROL(ChromotingNetworkDesktopMsg_InjectKeyEvent,
std::string /* serialized_event */ ) std::string /* serialized_event */)
// Carries a keyboard event from the client to the desktop session agent. // Carries a keyboard event from the client to the desktop session agent.
// |serialized_event| is a serialized protocol::TextEvent. // |serialized_event| is a serialized protocol::TextEvent.
IPC_MESSAGE_CONTROL1(ChromotingNetworkDesktopMsg_InjectTextEvent, IPC_MESSAGE_CONTROL(ChromotingNetworkDesktopMsg_InjectTextEvent,
std::string /* serialized_event */ ) std::string /* serialized_event */)
// Carries a mouse event from the client to the desktop session agent. // Carries a mouse event from the client to the desktop session agent.
// |serialized_event| is a serialized protocol::MouseEvent. // |serialized_event| is a serialized protocol::MouseEvent.
IPC_MESSAGE_CONTROL1(ChromotingNetworkDesktopMsg_InjectMouseEvent, IPC_MESSAGE_CONTROL(ChromotingNetworkDesktopMsg_InjectMouseEvent,
std::string /* serialized_event */ ) std::string /* serialized_event */)
// Carries a touch event from the client to the desktop session agent. // Carries a touch event from the client to the desktop session agent.
// |serialized_event| is a serialized protocol::TouchEvent. // |serialized_event| is a serialized protocol::TouchEvent.
IPC_MESSAGE_CONTROL1(ChromotingNetworkDesktopMsg_InjectTouchEvent, IPC_MESSAGE_CONTROL(ChromotingNetworkDesktopMsg_InjectTouchEvent,
std::string /* serialized_event */ ) std::string /* serialized_event */)
// Changes the screen resolution in the desktop session. // Changes the screen resolution in the desktop session.
IPC_MESSAGE_CONTROL1(ChromotingNetworkDesktopMsg_SetScreenResolution, IPC_MESSAGE_CONTROL(ChromotingNetworkDesktopMsg_SetScreenResolution,
remoting::ScreenResolution /* resolution */) remoting::ScreenResolution /* resolution */)
// Carries an action request event from the client to the desktop session agent. // Carries an action request event from the client to the desktop session agent.
IPC_MESSAGE_CONTROL1(ChromotingNetworkDesktopMsg_ExecuteActionRequest, IPC_MESSAGE_CONTROL(ChromotingNetworkDesktopMsg_ExecuteActionRequest,
remoting::protocol::ActionRequest /* request */) remoting::protocol::ActionRequest /* request */)
//--------------------------------------------------------------------- //---------------------------------------------------------------------
// Chromoting messages sent from the remote_security_key process to the // Chromoting messages sent from the remote_security_key process to the
...@@ -259,31 +259,31 @@ IPC_MESSAGE_CONTROL1(ChromotingNetworkDesktopMsg_ExecuteActionRequest, ...@@ -259,31 +259,31 @@ IPC_MESSAGE_CONTROL1(ChromotingNetworkDesktopMsg_ExecuteActionRequest,
// The array of bytes representing a security key request to be sent to the // The array of bytes representing a security key request to be sent to the
// remote client. // remote client.
IPC_MESSAGE_CONTROL1(ChromotingRemoteSecurityKeyToNetworkMsg_Request, IPC_MESSAGE_CONTROL(ChromotingRemoteSecurityKeyToNetworkMsg_Request,
std::string /* request bytes */) std::string /* request bytes */)
//--------------------------------------------------------- //---------------------------------------------------------
// Chromoting messages sent from the network process to the remote_security_key // Chromoting messages sent from the network process to the remote_security_key
// process. // process.
// The array of bytes representing the security key response from the client. // The array of bytes representing the security key response from the client.
IPC_MESSAGE_CONTROL1(ChromotingNetworkToRemoteSecurityKeyMsg_Response, IPC_MESSAGE_CONTROL(ChromotingNetworkToRemoteSecurityKeyMsg_Response,
std::string /* response bytes */) std::string /* response bytes */)
// Indicates the channel used for security key message passing is ready for use. // Indicates the channel used for security key message passing is ready for use.
IPC_MESSAGE_CONTROL0(ChromotingNetworkToRemoteSecurityKeyMsg_ConnectionReady) IPC_MESSAGE_CONTROL(ChromotingNetworkToRemoteSecurityKeyMsg_ConnectionReady)
// Error indicating the request originated from outside the remoted session. // Error indicating the request originated from outside the remoted session.
// The IPC channel will be disconnected after this message has been sent. // The IPC channel will be disconnected after this message has been sent.
IPC_MESSAGE_CONTROL0(ChromotingNetworkToRemoteSecurityKeyMsg_InvalidSession) IPC_MESSAGE_CONTROL(ChromotingNetworkToRemoteSecurityKeyMsg_InvalidSession)
// Starts to report process resource usage. // Starts to report process resource usage.
IPC_MESSAGE_CONTROL1(ChromotingNetworkToAnyMsg_StartProcessStatsReport, IPC_MESSAGE_CONTROL(ChromotingNetworkToAnyMsg_StartProcessStatsReport,
base::TimeDelta /* interval */) base::TimeDelta /* interval */)
// Stops to report process resource usage. // Stops to report process resource usage.
IPC_MESSAGE_CONTROL0(ChromotingNetworkToAnyMsg_StopProcessStatsReport) IPC_MESSAGE_CONTROL(ChromotingNetworkToAnyMsg_StopProcessStatsReport)
// Reports process resource usage to network process. // Reports process resource usage to network process.
IPC_MESSAGE_CONTROL1(ChromotingAnyToNetworkMsg_ReportProcessStats, IPC_MESSAGE_CONTROL(ChromotingAnyToNetworkMsg_ReportProcessStats,
remoting::protocol::AggregatedProcessResourceUsage) remoting::protocol::AggregatedProcessResourceUsage)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment