~ubuntu-branches/ubuntu/vivid/kdesudo/vivid

« back to all changes in this revision

Viewing changes to kdesudo/kcookie.h

  • Committer: Bazaar Package Importer
  • Author(s): Anthony Mercatante
  • Date: 2008-07-16 17:08:30 UTC
  • mfrom: (1.1.11 upstream)
  • Revision ID: james.westby@ubuntu.com-20080716170830-bem298ajm207fua9
Tags: 3.2-0ubuntu1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* vi: ts=8 sts=4 sw=4
 
2
 *
 
3
 * This file is part of the KDE project, module kdesu
 
4
 * Copyright (C) 1999,2000 Geert Jansen <jansen@kde.org>
 
5
 *
 
6
 * This is free software; you can use this library under the GNU Library
 
7
 * General Public License, version 2. See the file "COPYING.LIB" for the
 
8
 * exact licensing terms.
 
9
 */
 
10
 
 
11
#ifndef __KCookie_h_Included__
 
12
#define __KCookie_h_Included__
 
13
 
 
14
#include <QtCore/QByteRef>
 
15
 
 
16
 
 
17
namespace KDESu {
 
18
 
 
19
namespace KDESuPrivate {
 
20
 
 
21
/**
 
22
 * Utility class to access the authentication tokens needed to run a KDE
 
23
 * program (X11 cookies on X11, for instance).
 
24
 * @internal
 
25
 */
 
26
 
 
27
class KCookie
 
28
{
 
29
public:
 
30
    KCookie();
 
31
    ~KCookie();
 
32
 
 
33
    /**
 
34
     * Returns the X11 display.
 
35
     */
 
36
    QByteArray display() const;
 
37
 
 
38
#ifdef Q_WS_X11
 
39
    /**
 
40
     * Returns the X11 magic cookie, if available.
 
41
     */
 
42
    QByteArray displayAuth() const;
 
43
#endif
 
44
 
 
45
private:
 
46
    void getXCookie();
 
47
 
 
48
    class KCookiePrivate;
 
49
    KCookiePrivate * const d;
 
50
};
 
51
 
 
52
}}
 
53
 
 
54
#endif // __KCookie_h_Included__