forked from iwamatsu/slim
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Ck.h
46 lines (37 loc) · 1.03 KB
/
Ck.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/* SLiM - Simple Login Manager
* Copyright (C) 2007 Martin Parm
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
*(at your option) any later version.
*/
#ifndef _CK_H_
#define _CK_H_
#include <string>
#include <ck-connector.h>
#include <dbus/dbus.h>
namespace Ck {
class Exception {
public:
std::string func;
std::string errstr;
Exception(const std::string &func, const std::string &errstr);
};
class Session {
private:
CkConnector *ckc;
DBusError error;
const char *get_x11_device(const std::string &display);
dbus_bool_t ck_connector_open_graphic_session(const std::string &display,
uid_t uid);
public:
const char *get_xdg_session_cookie();
void open_session(const std::string &display, uid_t uid);
void close_session();
Session();
~Session();
};
}
std::ostream &operator<<(std::ostream &os, const Ck::Exception &e);
#endif /* _CK_H_ */