Debian Codegraph @

src/auth/SecurityDatabase/LegacyManagement.h

raw
1 /*
2 * PROGRAM: Firebird authentication
3 * MODULE: LegacyManagement.h
4 * DESCRIPTION: Performs legacy actions with security database
5 *
6 * The contents of this file are subject to the Initial
7 * Developer's Public License Version 1.0 (the "License");
8 * you may not use this file except in compliance with the
9 * License. You may obtain a copy of the License at
10 * http://www.ibphoenix.com/main.nfs?a=ibphoenix&page=ibp_idpl.
11 *
12 * Software distributed under the License is distributed AS IS,
13 * WITHOUT WARRANTY OF ANY KIND, either express or implied.
14 * See the License for the specific language governing rights
15 * and limitations under the License.
16 *
17 * The Original Code was created by Alex Peshkov
18 * for the Firebird Open Source RDBMS project.
19 *
20 * Copyright (c) 2010 Alex Peshkov <peshkoff at mail.ru>
21 * and all contributors signed below.
22 *
23 * All Rights Reserved.
24 * Contributor(s): ______________________________________.
25 */
26
27 #ifndef AUTH_LEGACY_MANAGEMENT_H
28 #define AUTH_LEGACY_MANAGEMENT_H
29
30 #include "../common/classes/ImplementHelper.h"
31 #include "firebird/Interface.h"
32
33
34 namespace Auth {
35
36 class SecurityDatabaseManagement FB_FINAL :
37 public Firebird::StdPlugin<Firebird::IManagementImpl<SecurityDatabaseManagement, Firebird::CheckStatusWrapper> >
38 {
39 public:
40 explicit SecurityDatabaseManagement(Firebird::IPluginConfig* par);
41
42 // IManagement implementation
43 void start(Firebird::CheckStatusWrapper* status, Firebird::ILogonInfo* logonInfo);
44 int execute(Firebird::CheckStatusWrapper* status, Firebird::IUser* user, Firebird::IListUsers* callback);
45 void commit(Firebird::CheckStatusWrapper* status);
46 void rollback(Firebird::CheckStatusWrapper* status);
47
48 int release();
49
50 private:
51 Firebird::RefPtr<Firebird::IFirebirdConf> config;
52 FB_API_HANDLE database, transaction;
53 };
54
55 } // namespace Auth
56
57 #endif // AUTH_LEGACY_MANAGEMENT_H