chromoting_messages.h revision 5821806d5e7f356e8fa4b058a389a808ea183019
15821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Copyright (c) 2012 The Chromium Authors. All rights reserved. 25821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Use of this source code is governed by a BSD-style license that can be 35821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// found in the LICENSE file. 45821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 55821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Defines IPC messages used by Chromoting components. 65821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 75821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Multiply-included message file, no traditional include guard. 85821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#include "ipc/ipc_message_macros.h" 95821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#include "ipc/ipc_platform_file.h" 105821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 115821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#define IPC_MESSAGE_START ChromotingMsgStart 125821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 135821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)//----------------------------------------------------------------------------- 145821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Chromoting messages sent from the daemon to the network process. 155821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 165821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Requests the network process to crash producing a crash dump. The daemon 175821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// sends this message when a fatal error has been detected indicating that 185821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// the network process misbehaves. The daemon passes the location of the code 195821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// that detected the error. 205821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)IPC_MESSAGE_CONTROL3(ChromotingDaemonNetworkMsg_Crash, 215821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) std::string /* function_name */, 225821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) std::string /* file_name */, 235821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) int /* line_number */) 245821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 255821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Delivers the host configuration (and updates) to the network process. 265821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)IPC_MESSAGE_CONTROL1(ChromotingDaemonNetworkMsg_Configuration, std::string) 275821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 285821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Notifies the network process that the terminal |terminal_id| has been 295821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// disconnected from the desktop session. 305821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)IPC_MESSAGE_CONTROL1(ChromotingDaemonNetworkMsg_TerminalDisconnected, 315821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) int /* terminal_id */) 325821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 335821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Notifies the network process that |terminal_id| is now attached to 345821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// a desktop integration process. |desktop_process| is the handle of the desktop 355821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// process |desktop_pipe| is the client end of the desktop-to-network pipe 365821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// opened. 375821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// 385821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Windows only: |desktop_pipe| has to be duplicated from the desktop process 395821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// by the receiver of the message. |desktop_process| is already duplicated by 405821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// the sender. 415821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)IPC_MESSAGE_CONTROL3(ChromotingDaemonNetworkMsg_DesktopAttached, 425821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) int /* terminal_id */, 435821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) IPC::PlatformFileForTransit /* desktop_process */, 445821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) IPC::PlatformFileForTransit /* desktop_pipe */) 455821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 465821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)//----------------------------------------------------------------------------- 475821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Chromoting messages sent from the network to the daemon process. 485821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 495821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Asks the daemon to send Secure Attention Sequence (SAS) to the current 505821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// console session. 515821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)IPC_MESSAGE_CONTROL0(ChromotingNetworkDaemonMsg_SendSasToConsole) 525821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 535821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Connects the terminal |terminal_id| (i.e. the remote client) to a desktop 545821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// session. 555821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)IPC_MESSAGE_CONTROL1(ChromotingNetworkHostMsg_ConnectTerminal, 565821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) int /* terminal_id */) 575821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 585821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Disconnects the terminal |terminal_id| from the desktop session it was 595821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// connected to. 605821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)IPC_MESSAGE_CONTROL1(ChromotingNetworkHostMsg_DisconnectTerminal, 615821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) int /* terminal_id */) 625821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 635821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)//----------------------------------------------------------------------------- 645821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Chromoting messages sent from the daemon to the desktop process. 655821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 665821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Requests the desktop process to crash producing a crash dump. The daemon 675821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// sends this message when a fatal error has been detected indicating that 685821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// the desktop process misbehaves. The daemon passes the location of the code 695821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// that detected the error. 705821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)IPC_MESSAGE_CONTROL3(ChromotingDaemonDesktopMsg_Crash, 715821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) std::string /* function_name */, 725821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) std::string /* file_name */, 735821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) int /* line_number */) 745821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 755821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)//----------------------------------------------------------------------------- 765821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Chromoting messages sent from the desktop to the daemon process. 775821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 785821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Notifies the daemon that a desktop integration process has been initialized. 795821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// |desktop_pipe| specifies the client end of the desktop pipe. It is to be 805821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// forwarded to the desktop environment stub. 815821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// 825821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Windows only: |desktop_pipe| has to be duplicated from the desktop process by 835821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// the receiver of the message. 845821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)IPC_MESSAGE_CONTROL1(ChromotingDesktopDaemonMsg_DesktopAttached, 855821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) IPC::PlatformFileForTransit /* desktop_pipe */) 86