1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
9 #include "nsRemoteClient.h"
11 class XRemoteClient
: public nsRemoteClient
17 virtual nsresult
Init();
18 virtual nsresult
SendCommand(const char *aProgram
, const char *aUsername
,
19 const char *aProfile
, const char *aCommand
,
20 const char* aDesktopStartupID
,
21 char **aResponse
, bool *aSucceeded
);
22 virtual nsresult
SendCommandLine(const char *aProgram
, const char *aUsername
,
24 int32_t argc
, char **argv
,
25 const char* aDesktopStartupID
,
26 char **aResponse
, bool *aSucceeded
);
31 Window
CheckWindow (Window aWindow
);
32 Window
CheckChildren (Window aWindow
);
33 nsresult
GetLock (Window aWindow
, bool *aDestroyed
);
34 nsresult
FreeLock (Window aWindow
);
35 Window
FindBestWindow (const char *aProgram
,
36 const char *aUsername
,
38 bool aSupportsCommandLine
);
39 nsresult
SendCommandInternal(const char *aProgram
, const char *aUsername
,
40 const char *aProfile
, const char *aCommand
,
41 int32_t argc
, char **argv
,
42 const char* aDesktopStartupID
,
43 char **aResponse
, bool *aWindowFound
);
44 nsresult
DoSendCommand (Window aWindow
,
46 const char* aDesktopStartupID
,
49 nsresult
DoSendCommandLine(Window aWindow
,
50 int32_t argc
, char **argv
,
51 const char* aDesktopStartupID
,
54 bool WaitForResponse (Window aWindow
, char **aResponse
,
55 bool *aDestroyed
, Atom aCommandAtom
);
62 Atom mMozCommandLineAtom
;
63 Atom mMozResponseAtom
;