ALBA
albaUser.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: ALBA (Agile Library for Biomedical Applications)
4 Module: albaUser
5 Authors: Paolo Quadrani
6
7 Copyright (c) BIC
8 All rights reserved. See Copyright.txt or
9
10
11 This software is distributed WITHOUT ANY WARRANTY; without even
12 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
13 PURPOSE. See the above copyright notice for more information.
14
15=========================================================================*/
16#ifndef __albaUser_H__
17#define __albaUser_H__
18
19//----------------------------------------------------------------------------
20// Include:
21//----------------------------------------------------------------------------
22#include "albaString.h"
23
24//----------------------------------------------------------------------------
25// forward declarations
26//----------------------------------------------------------------------------
27
32class ALBA_EXPORT albaUser
33{
34public:
36 virtual ~albaUser();
37
40
43 virtual bool CheckUserCredentials();
44
47 virtual bool IsAuthenticated();
48
51 bool SetCredentials(albaString &name, albaString &pwd, int &proxyFlag, albaString &proxyHost, albaString &proxyPort, int &remember_me);
52
55
58
61
64
67
70
71protected:
74
78
81
82 // User credentials
92};
93#endif
albaString - performs common string operations on c-strings.
Definition: albaString.h:43
albaUser - Used to manage username and password; store them and give basic function to check user's c...
Definition: albaUser.h:33
albaString & GetName()
Return the information on user name.
albaString & GetProxyHost()
Return the information on proxy host.
virtual bool IsAuthenticated()
Function to be customized at application level.
albaString m_Password
Definition: albaUser.h:84
int m_RememberCredentials
Definition: albaUser.h:90
void InitializeUserInformations()
Retrieve user information saved into an encrypted file.
albaString & GetPwd()
Return the information on users' password.
albaString m_UserHome
Definition: albaUser.h:88
virtual bool CheckUserCredentials()
Function to be customized at application level.
albaString m_UserInfoFile
Definition: albaUser.h:89
int & GetProxyPort()
Return the information on proxy port.
int m_ProxyPort
Proxy Host.
Definition: albaUser.h:87
int & GetProxyFlag()
Return the information on proxy flag.
albaString m_Username
Definition: albaUser.h:83
albaString m_ProxyHost
Proxy Host.
Definition: albaUser.h:85
virtual ~albaUser()
void InitUserInfoHome()
Set the folder in which store encrypted user credentials.
int m_ProxyFlag
Flag used to for enable proxy.
Definition: albaUser.h:86
bool SetCredentials(albaString &name, albaString &pwd, int &proxyFlag, albaString &proxyHost, albaString &proxyPort, int &remember_me)
Set the user's credentials.
int ShowLoginDialog()
Allows to show login dialog and get credentials from the application's user.
int GetRememberUserCredentials()
Return information to allow saving or not users' information.
void UpdateUserCredentialsFile()
Update user credentials into an encrypted file or remove the file if the user don't want to save its ...
bool m_Initialized
Flag used to verify if users' information has been initialized.
Definition: albaUser.h:91