_________ __                 __
        /   _____//  |_____________ _/  |______     ____  __ __  ______
        \_____  \\   __\_  __ \__  \\   __\__  \   / ___\|  |  \/  ___/
        /        \|  |  |  | \// __ \|  |  / __ \_/ /_/  >  |  /\___ \
       /_______  /|__|  |__|  (____  /__| (____  /\___  /|____//____  >
               \/                  \/          \//_____/            \/
    ______________________                           ______________________
                          T H E   W A R   B E G I N S
                   Stratagus - A free fantasy real time strategy game engine

db.h File Reference

Go to the source code of this file.

Functions

db.h - Database routines.
int DBInit (void)
 
void DBQuit (void)
 
int DBFindUser (char *username, char *password)
 
int DBAddUser (char *username, char *password)
 
int DBUpdateLoginDate (char *username)
 

Function Documentation

int DBAddUser ( char *  username,
char *  password 
)

Add a user

Parameters
usernameUser name
passwordPassword
Returns
0 for success, non-zero otherwise
int DBFindUser ( char *  username,
char *  password 
)

Find a user and return the password

Parameters
usernameUser name to find
passwordIf the user is found the password will be returned here
Returns
1 if user is found, 0 otherwise
int DBInit ( void  )

Initialize the database

Returns
0 for success, non-zero for failure
void DBQuit ( void  )

Close the database

int DBUpdateLoginDate ( char *  username)

Log in a user

Parameters
usernameUser name
Returns
0 for success, non-zero otherwise
(C) Copyright 1998-2012 by The Stratagus Project under the GNU General Public License.
All trademarks and copyrights on this page are owned by their respective owners.