PageRenderTime 552ms CodeModel.GetById 143ms app.highlight 4ms RepoModel.GetById 211ms app.codeStats 0ms

/indra/newview/llappviewerlinux.h

https://bitbucket.org/lindenlab/viewer-beta/
C++ Header | 90 lines | 46 code | 16 blank | 28 comment | 0 complexity | 031d346610cbe7936ac1738608e1cfb0 MD5 | raw file
 1/**
 2 * @file llappviewerlinux.h
 3 * @brief The LLAppViewerLinux class declaration
 4 *
 5 * $LicenseInfo:firstyear=2007&license=viewerlgpl$
 6 * Second Life Viewer Source Code
 7 * Copyright (C) 2010, Linden Research, Inc.
 8 * 
 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public
11 * License as published by the Free Software Foundation;
12 * version 2.1 of the License only.
13 * 
14 * This library is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17 * Lesser General Public License for more details.
18 * 
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with this library; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
22 * 
23 * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
24 * $/LicenseInfo$
25 */ 
26
27#ifndef LL_LLAPPVIEWERLINUX_H
28#define LL_LLAPPVIEWERLINUX_H
29
30extern "C" {
31# include <glib.h>
32}
33
34#if LL_DBUS_ENABLED
35extern "C" {
36# include <glib-object.h>
37# include <dbus/dbus-glib.h>
38}
39#endif
40
41#ifndef LL_LLAPPVIEWER_H
42#include "llappviewer.h"
43#endif
44
45class LLCommandLineParser;
46
47class LLAppViewerLinux : public LLAppViewer
48{
49public:
50	LLAppViewerLinux();
51	virtual ~LLAppViewerLinux();
52
53	//
54	// Main application logic
55	//
56	virtual bool init();			// Override to do application initialization
57	std::string generateSerialNumber();
58	bool setupSLURLHandler();
59
60protected:
61	virtual bool beingDebugged();
62	
63	virtual bool restoreErrorTrap();
64	virtual void handleCrashReporting(bool reportFreeze);
65
66	virtual bool initLogging();
67	virtual bool initParseCommandLine(LLCommandLineParser& clp);
68
69	virtual bool initSLURLHandler();
70	virtual bool sendURLToOtherInstance(const std::string& url);
71};
72
73#if LL_DBUS_ENABLED
74typedef struct
75{
76        GObject parent;
77        DBusGConnection *connection;
78} ViewerAppAPI;
79
80extern "C" {
81	gboolean viewer_app_api_GoSLURL(ViewerAppAPI *obj, gchar *slurl, gboolean **success_rtn, GError **error);
82}
83
84#define VIEWERAPI_SERVICE "com.secondlife.ViewerAppAPIService"
85#define VIEWERAPI_PATH "/com/secondlife/ViewerAppAPI"
86#define VIEWERAPI_INTERFACE "com.secondlife.ViewerAppAPI"
87
88#endif // LL_DBUS_ENABLED
89
90#endif // LL_LLAPPVIEWERLINUX_H