~ubuntu-branches/ubuntu/precise/lightdm/precise-proposed

« back to all changes in this revision

Viewing changes to src/pam-session.h

  • Committer: Package Import Robot
  • Author(s): Michael Terry
  • Date: 2012-03-02 15:03:26 UTC
  • mfrom: (1.1.22)
  • Revision ID: package-import@ubuntu.com-20120302150326-4ac7hlxzjxywf27a
Tags: 1.1.4.is.1.1.3-0ubuntu1
Revert to 1.1.3 until we can figure out proper solution to bug 944736

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright (C) 2010-2011 Robert Ancell.
 
3
 * Author: Robert Ancell <robert.ancell@canonical.com>
 
4
 * 
 
5
 * This program is free software: you can redistribute it and/or modify it under
 
6
 * the terms of the GNU General Public License as published by the Free Software
 
7
 * Foundation, either version 3 of the License, or (at your option) any later
 
8
 * version. See http://www.gnu.org/copyleft/gpl.html the full text of the
 
9
 * license.
 
10
 */
 
11
 
 
12
#ifndef _PAM_SESSION_H_
 
13
#define _PAM_SESSION_H_
 
14
 
 
15
#include <glib-object.h>
 
16
#include <security/pam_appl.h>
 
17
 
 
18
#include "accounts.h"
 
19
 
 
20
G_BEGIN_DECLS
 
21
 
 
22
#define PAM_SESSION_TYPE (pam_session_get_type())
 
23
#define PAM_SESSION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PAM_SESSION_TYPE, PAMSession));
 
24
 
 
25
typedef struct PAMSessionPrivate PAMSessionPrivate;
 
26
 
 
27
typedef struct
 
28
{
 
29
    GObject         parent_instance;
 
30
    PAMSessionPrivate *priv;
 
31
} PAMSession;
 
32
 
 
33
typedef struct
 
34
{
 
35
    GObjectClass parent_class;
 
36
 
 
37
    void (*authentication_started)(PAMSession *pam_session);  
 
38
    void (*got_messages)(PAMSession *pam_session, int num_msg, const struct pam_message **msg);
 
39
    void (*authentication_result)(PAMSession *pam_session, int result);
 
40
} PAMSessionClass;
 
41
 
 
42
GType pam_session_get_type (void);
 
43
 
 
44
void pam_session_set_use_pam (void);
 
45
 
 
46
void pam_session_set_use_passwd_file (gchar *passwd_file);
 
47
 
 
48
PAMSession *pam_session_new (const gchar *service, const gchar *username);
 
49
 
 
50
void pam_session_set_interactive (PAMSession *session, gboolean interactive);
 
51
 
 
52
gboolean pam_session_get_interactive (PAMSession *session);
 
53
 
 
54
gboolean pam_session_authenticate (PAMSession *session, GError **error);
 
55
 
 
56
gboolean pam_session_get_is_authenticated (PAMSession *session);
 
57
 
 
58
gboolean pam_session_set_item (PAMSession *session, int item_type, const gchar *value);
 
59
 
 
60
gboolean pam_session_open (PAMSession *session);
 
61
 
 
62
gboolean pam_session_setup (PAMSession *session);
 
63
 
 
64
gboolean pam_session_get_in_session (PAMSession *session);
 
65
 
 
66
const gchar *pam_session_strerror (PAMSession *session, int error);
 
67
 
 
68
const gchar *pam_session_get_username (PAMSession *session);
 
69
 
 
70
User *pam_session_get_user (PAMSession *session);
 
71
 
 
72
const struct pam_message **pam_session_get_messages (PAMSession *session);
 
73
 
 
74
gint pam_session_get_num_messages (PAMSession *session);
 
75
 
 
76
void pam_session_respond (PAMSession *session, struct pam_response *response);
 
77
 
 
78
void pam_session_cancel (PAMSession *session);
 
79
 
 
80
const gchar *pam_session_getenv (PAMSession *session, const gchar *name);
 
81
 
 
82
gchar **pam_session_get_envlist (PAMSession *session);
 
83
 
 
84
void pam_session_close (PAMSession *session);
 
85
 
 
86
G_END_DECLS
 
87
 
 
88
#endif /* _PAM_SESSION_H_ */