Home | History | Annotate | Download | only in common
      1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
      2 // Use of this source code is governed by a BSD-style license that can be
      3 // found in the LICENSE file.
      4 
      5 // Multiply-included message file, no traditional include guard.
      6 #include <string>
      7 
      8 #include "chrome/common/remoting/chromoting_host_info.h"
      9 #include "ipc/ipc_channel_handle.h"
     10 #include "ipc/ipc_message_macros.h"
     11 
     12 #define IPC_MESSAGE_START ServiceMsgStart
     13 
     14 IPC_STRUCT_TRAITS_BEGIN(remoting::ChromotingHostInfo)
     15   IPC_STRUCT_TRAITS_MEMBER(host_id)
     16   IPC_STRUCT_TRAITS_MEMBER(hostname)
     17   IPC_STRUCT_TRAITS_MEMBER(public_key)
     18   IPC_STRUCT_TRAITS_MEMBER(enabled)
     19   IPC_STRUCT_TRAITS_MEMBER(login)
     20 IPC_STRUCT_TRAITS_END()
     21 
     22 //-----------------------------------------------------------------------------
     23 // Service process messages:
     24 // These are messages from the browser to the service process.
     25 // Tell the service process to enable the cloud proxy passing in the lsid
     26 // of the account to be used.
     27 IPC_MESSAGE_CONTROL1(ServiceMsg_EnableCloudPrintProxy,
     28                      std::string /* lsid */)
     29 // Tell the service process to enable the cloud proxy passing in specific
     30 // tokens to be used.
     31 IPC_MESSAGE_CONTROL2(ServiceMsg_EnableCloudPrintProxyWithTokens,
     32                      std::string, /* token for cloudprint service */
     33                      std::string  /* token for Google Talk service */)
     34 // Tell the service process to disable the cloud proxy.
     35 IPC_MESSAGE_CONTROL0(ServiceMsg_DisableCloudPrintProxy)
     36 
     37 // Requests a message back on whether the cloud print proxy is
     38 // enabled.
     39 IPC_MESSAGE_CONTROL0(ServiceMsg_IsCloudPrintProxyEnabled)
     40 
     41 // Set credentials used by the RemotingHost.
     42 IPC_MESSAGE_CONTROL2(ServiceMsg_SetRemotingHostCredentials,
     43                      std::string, /* username */
     44                      std::string  /* token for XMPP */)
     45 
     46 // Enabled remoting host.
     47 IPC_MESSAGE_CONTROL0(ServiceMsg_EnableRemotingHost)
     48 
     49 // Disable remoting host.
     50 IPC_MESSAGE_CONTROL0(ServiceMsg_DisableRemotingHost)
     51 
     52 // Get remoting host status information.
     53 IPC_MESSAGE_CONTROL0(ServiceMsg_GetRemotingHostInfo)
     54 
     55 // Tell the service process to shutdown.
     56 IPC_MESSAGE_CONTROL0(ServiceMsg_Shutdown)
     57 
     58 // Tell the service process that an update is available.
     59 IPC_MESSAGE_CONTROL0(ServiceMsg_UpdateAvailable)
     60 
     61 //-----------------------------------------------------------------------------
     62 // Service process host messages:
     63 // These are messages from the service process to the browser.
     64 // Sent when the cloud print proxy has an authentication error.
     65 IPC_MESSAGE_CONTROL0(ServiceHostMsg_CloudPrintProxy_AuthError)
     66 
     67 // Sent as a response to a request for enablement status.
     68 IPC_MESSAGE_CONTROL2(ServiceHostMsg_CloudPrintProxy_IsEnabled,
     69                      bool,       /* Is the proxy enabled? */
     70                      std::string /* Email address of account */)
     71 
     72 IPC_MESSAGE_CONTROL1(ServiceHostMsg_RemotingHost_HostInfo,
     73                      remoting::ChromotingHostInfo /* host_info */)
     74 
     75