Luanti 5.11.0-dev
 
Loading...
Searching...
No Matches
l_auth.h
Go to the documentation of this file.
1// Luanti
2// SPDX-License-Identifier: LGPL-2.1-or-later
3// Copyright (C) 2018 bendeutsch, Ben Deutsch <ben@bendeutsch.de>
4
5#pragma once
6
7#include "lua_api/l_base.h"
8
9class AuthDatabase;
10struct AuthEntry;
11
12class ModApiAuth : public ModApiBase
13{
14private:
15 // auth_read(name)
16 static int l_auth_read(lua_State *L);
17
18 // auth_save(table)
19 static int l_auth_save(lua_State *L);
20
21 // auth_create(table)
22 static int l_auth_create(lua_State *L);
23
24 // auth_delete(name)
25 static int l_auth_delete(lua_State *L);
26
27 // auth_list_names()
28 static int l_auth_list_names(lua_State *L);
29
30 // auth_reload()
31 static int l_auth_reload(lua_State *L);
32
33 // helper for auth* methods
34 static AuthDatabase *getAuthDb(lua_State *L);
35 static void pushAuthEntry(lua_State *L, const AuthEntry &authEntry);
36
37public:
38 static void Initialize(lua_State *L, int top);
39};
Definition database.h:61
Definition l_auth.h:13
static void pushAuthEntry(lua_State *L, const AuthEntry &authEntry)
Definition l_auth.cpp:28
static int l_auth_delete(lua_State *L)
Definition l_auth.cpp:150
static int l_auth_create(lua_State *L)
Definition l_auth.cpp:111
static int l_auth_reload(lua_State *L)
Definition l_auth.cpp:181
static int l_auth_list_names(lua_State *L)
Definition l_auth.cpp:162
static int l_auth_save(lua_State *L)
Definition l_auth.cpp:74
static void Initialize(lua_State *L, int top)
Definition l_auth.cpp:190
static AuthDatabase * getAuthDb(lua_State *L)
Definition l_auth.cpp:16
static int l_auth_read(lua_State *L)
Definition l_auth.cpp:57
Definition l_base.h:28
Definition database.h:52