~ken-vandine/+junk/xdg-desktop-portal-gtk_0.10

« back to all changes in this revision

Viewing changes to src/session.h

  • Committer: Ken VanDine
  • Date: 2018-02-14 16:27:00 UTC
  • Revision ID: ken.vandine@canonical.com-20180214162700-e61q0115hwx2bb3z
init

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright © 2017 Red Hat, Inc
 
3
 *
 
4
 * This program is free software; you can redistribute it and/or
 
5
 * modify it under the terms of the GNU Lesser General Public
 
6
 * License as published by the Free Software Foundation; either
 
7
 * version 2 of the License, or (at your option) any later version.
 
8
 *
 
9
 * This library is distributed in the hope that it will be useful,
 
10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
12
 * Lesser General Public License for more details.
 
13
 *
 
14
 * You should have received a copy of the GNU Lesser General Public
 
15
 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
 
16
 *
 
17
 */
 
18
 
 
19
#pragma once
 
20
 
 
21
#include "xdg-desktop-portal-dbus.h"
 
22
 
 
23
typedef struct _Session Session;
 
24
typedef struct _SessionClass SessionClass;
 
25
 
 
26
struct _Session
 
27
{
 
28
  XdpImplSessionSkeleton parent;
 
29
 
 
30
  gboolean exported;
 
31
  gboolean closed;
 
32
  char *id;
 
33
};
 
34
 
 
35
struct _SessionClass
 
36
{
 
37
  XdpImplSessionSkeletonClass parent_class;
 
38
 
 
39
  void (*close) (Session *session);
 
40
};
 
41
 
 
42
GType session_get_type (void);
 
43
 
 
44
G_DEFINE_AUTOPTR_CLEANUP_FUNC (Session, g_object_unref)
 
45
 
 
46
Session *lookup_session (const char *id);
 
47
 
 
48
Session *session_new (const char *id);
 
49
 
 
50
void session_close (Session *session);
 
51
 
 
52
gboolean session_export (Session *session,
 
53
                         GDBusConnection *connection,
 
54
                         GError **error);
 
55
 
 
56
void session_unexport (Session *session);