C# Class mybox.OwnCloudDB

Server side database to store user accounts
Inheritance: IServerDB
Afficher le fichier Open project: jonocodes/mybox

Méthodes publiques

Méthode Description
CheckPassword ( String pwordOrig, String pwordHashed ) : bool
Connect ( String connectionString, String baseDataDir ) : void
GetDataDir ( ServerUser user ) : String
GetFileListSerializable ( ServerUser user ) : List>

Gets the file list in a manner that is easy to serialize and send.

GetUserByName ( String userName ) : ServerUser

Get an account from the database via a known ID

OwnCloudDB ( ) : System

Initializes a new instance of the mybox.OwnCloudDB class.

RemoveFile ( ServerUser user, String filePath ) : bool

Removes the file entry from the database.

ShowUsers ( ) : void

Print a list of the accounts in the database

UpdateFile ( ServerUser user, MyFile thisFile ) : bool

Update or insert a new entry for the file into the database

UsersCount ( ) : int

Get the number of entries in the accounts table

Method Details

CheckPassword() public méthode

public CheckPassword ( String pwordOrig, String pwordHashed ) : bool
pwordOrig String
pwordHashed String
Résultat bool

Connect() public méthode

public Connect ( String connectionString, String baseDataDir ) : void
connectionString String
baseDataDir String
Résultat void

GetDataDir() public méthode

public GetDataDir ( ServerUser user ) : String
user ServerUser
Résultat String

GetFileListSerializable() public méthode

Gets the file list in a manner that is easy to serialize and send.
public GetFileListSerializable ( ServerUser user ) : List>
user ServerUser /// This account. ///
Résultat List>

GetUserByName() public méthode

Get an account from the database via a known ID
public GetUserByName ( String userName ) : ServerUser
userName String
Résultat ServerUser

OwnCloudDB() public méthode

Initializes a new instance of the mybox.OwnCloudDB class.
public OwnCloudDB ( ) : System
Résultat System

RemoveFile() public méthode

Removes the file entry from the database.
public RemoveFile ( ServerUser user, String filePath ) : bool
user ServerUser
filePath String
Résultat bool

ShowUsers() public méthode

Print a list of the accounts in the database
public ShowUsers ( ) : void
Résultat void

UpdateFile() public méthode

Update or insert a new entry for the file into the database
public UpdateFile ( ServerUser user, MyFile thisFile ) : bool
user ServerUser
thisFile MyFile
Résultat bool

UsersCount() public méthode

Get the number of entries in the accounts table
public UsersCount ( ) : int
Résultat int