summaryrefslogtreecommitdiff
path: root/core/opie-login/loginapplication.h
blob: a709c5bd160a9b5577ad9bf200412d8ca5f502c7 (plain)
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
#ifndef __OPIE_LOGINAPPLICATION_H__
#define __OPIE_LOGINAPPLICATION_H__

#include <qstringlist.h>

#include <qpe/qpeapplication.h>

#ifdef USEPAM
struct pam_message;
struct pam_response;
#endif

class LoginApplication : public QPEApplication {
public:
	LoginApplication ( int &argc, char **argv );

	static bool checkPassword ( const char *user, const char *password );

	static const char *loginAs ( );
	static void setLoginAs ( const char *user );

	static bool changeIdentity ( );
	static bool login ( );

	static QStringList allUsers ( );

	void quitToConsole ( );

private:
	static const char *s_username;

#ifdef USEPAM
	static int pam_helper ( int num_msg, const struct pam_message **msg, struct pam_response **resp, void * );
	static const char *s_pam_password;
#endif
};

extern LoginApplication *lApp;

#endif