Coverage Report

Created: 2018-09-25 14:53

/src/mozilla-central/widget/xremoteclient/nsRemoteClient.h
Line
Count
Source (jump to first uncovered line)
1
/* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2
/* vim:expandtab:shiftwidth=4:tabstop=4:
3
 */
4
/* This Source Code Form is subject to the terms of the Mozilla Public
5
 * License, v. 2.0. If a copy of the MPL was not distributed with this
6
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7
8
#ifndef nsRemoteClient_h__
9
#define nsRemoteClient_h__
10
11
#include "nscore.h"
12
13
/**
14
 * Pure-virtual common base class for remoting implementations.
15
 */
16
17
class nsRemoteClient
18
{
19
public:
20
0
  virtual ~nsRemoteClient() {};
21
22
  /**
23
   * Initializes the client
24
   */
25
  virtual nsresult Init() = 0;
26
27
  /**
28
   * Send a complete command line to a running instance.
29
   *
30
   * @param aProgram This is the preferred program that we want to use
31
   * for this particular command.
32
   *
33
   * @param aUsername This allows someone to only talk to an instance
34
   * of the server that's running under a particular username.  If
35
   * this isn't specified here it's pulled from the LOGNAME
36
   * environmental variable if it's set.
37
   *
38
   * @param aProfile This allows you to specify a particular server
39
   * running under a named profile.  If it is not specified the
40
   * profile is not checked.
41
   *
42
   * @param argc The number of command-line arguments.
43
   *
44
   * @param argv The command-line arguments.
45
   *
46
   * @param aDesktopStartupID the contents of the DESKTOP_STARTUP_ID environment
47
   * variable defined by the Startup Notification specification
48
   * http://standards.freedesktop.org/startup-notification-spec/startup-notification-0.1.txt
49
   *
50
   * @param aResponse If there is a response, it will be here.  This
51
   * includes error messages.  The string is allocated using stdlib
52
   * string functions, so free it with free().
53
   *
54
   * @return true if succeeded, false if no running instance was found.
55
   * 
56
   */
57
  virtual nsresult SendCommandLine(const char *aProgram, const char *aUsername,
58
                                   const char *aProfile,
59
                                   int32_t argc, char **argv,
60
                                   const char* aDesktopStartupID,
61
                                   char **aResponse, bool *aSucceeded) = 0;
62
};
63
64
#endif // nsRemoteClient_h__