2
* Copyright 2013 Canonical Ltd.
5
* Charles Kerr <charles.kerr@canonical.com>
7
* This program is free software: you can redistribute it and/or modify it
8
* under the terms of the GNU General Public License version 3, as published
9
* by the Free Software Foundation.
11
* This program is distributed in the hope that it will be useful, but
12
* WITHOUT ANY WARRANTY; without even the implied warranties of
13
* MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
14
* PURPOSE. See the GNU General Public License for more details.
16
* You should have received a copy of the GNU General Public License along
17
* with this program. If not, see <http://www.gnu.org/licenses/>.
20
#ifndef MOCK_CONSOLEKIT_SESSION_H
21
#define MOCK_CONSOLEKIT_SESSION_H
24
#include "mock-object.h"
25
#include "backend-dbus/dbus-consolekit-session.h"
29
class MockConsoleKitSession: public MockObject
33
MockConsoleKitSession (GMainLoop * loop,
34
GDBusConnection * bus_connection);
35
virtual ~MockConsoleKitSession ();
37
MockUser * user () { return my_user; }
38
void set_user (MockUser * user);
39
const char * ssid () { return path(); }
40
void set_sid (const std::string& sid) { my_sid = sid; }
41
const char * x11_display() { return my_x11_display.c_str(); }
42
void set_x11_display (const std::string& x) { my_x11_display = x; }
46
static gboolean on_get_seat_id_static (ConsoleKitSession *,
47
GDBusMethodInvocation *,
49
static gboolean on_get_unix_user_static (ConsoleKitSession *,
50
GDBusMethodInvocation *,
52
static gboolean on_get_x11_display (ConsoleKitSession *,
53
GDBusMethodInvocation *,
59
ConsoleKitSession * my_skeleton;
61
std::string my_x11_display;
65
#endif // #ifndef MOCK_CONSOLEKIT_SESSION_H