widget/xremoteclient/XRemoteClient.h

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     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/. */
     6 #include <X11/X.h>
     7 #include <X11/Xlib.h>
     9 #include "nsRemoteClient.h"
    11 class XRemoteClient : public nsRemoteClient
    12 {
    13 public:
    14   XRemoteClient();
    15   ~XRemoteClient();
    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,
    23                                    const char *aProfile,
    24                                    int32_t argc, char **argv,
    25                                    const char* aDesktopStartupID,
    26                                    char **aResponse, bool *aSucceeded);
    27   void Shutdown();
    29 private:
    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,
    37                                    const char *aProfile,
    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,
    45                                    const char *aCommand,
    46                                    const char* aDesktopStartupID,
    47                                    char **aResponse,
    48                                    bool *aDestroyed);
    49   nsresult       DoSendCommandLine(Window aWindow,
    50                                    int32_t argc, char **argv,
    51                                    const char* aDesktopStartupID,
    52                                    char **aResponse,
    53                                    bool *aDestroyed);
    54   bool           WaitForResponse  (Window aWindow, char **aResponse,
    55                                    bool *aDestroyed, Atom aCommandAtom);
    57   Display       *mDisplay;
    59   Atom           mMozVersionAtom;
    60   Atom           mMozLockAtom;
    61   Atom           mMozCommandAtom;
    62   Atom           mMozCommandLineAtom;
    63   Atom           mMozResponseAtom;
    64   Atom           mMozWMStateAtom;
    65   Atom           mMozUserAtom;
    66   Atom           mMozProfileAtom;
    67   Atom           mMozProgramAtom;
    69   char          *mLockData;
    71   bool           mInitialized;
    72 };

mercurial