RetroArch
Classes | Macros | Typedefs | Functions
smb.h File Reference
#include <gctypes.h>
#include <sys/statvfs.h>
Include dependency graph for smb.h:

Go to the source code of this file.

Classes

struct  SMBDIRENTRY
 

Macros

#define SMB_MAXPATH   4096
 
#define SMB_SUCCESS   0
 
#define SMB_ERROR   -1
 
#define SMB_BAD_PROTOCOL   -2
 
#define SMB_BAD_COMMAND   -3
 
#define SMB_PROTO_FAIL   -4
 
#define SMB_NOT_USER   -5
 
#define SMB_BAD_KEYLEN   -6
 
#define SMB_BAD_DATALEN   -7
 
#define SMB_BAD_LOGINDATA   -8
 
#define SMB_OF_OPEN   1
 
#define SMB_OF_TRUNCATE   2
 
#define SMB_OF_CREATE   16
 
#define SMB_SRCH_READONLY   1
 
#define SMB_SRCH_HIDDEN   2
 
#define SMB_SRCH_SYSTEM   4
 
#define SMB_SRCH_VOLUME   8
 
#define SMB_SRCH_DIRECTORY   16
 
#define SMB_SRCH_ARCHIVE   32
 
#define SMB_OPEN_READING   0
 
#define SMB_OPEN_WRITING   1
 
#define SMB_OPEN_READWRITE   2
 
#define SMB_OPEN_COMPATIBLE   0
 
#define SMB_DENY_READWRITE   0x10
 
#define SMB_DENY_WRITE   0x20
 
#define SMB_DENY_READ   0x30
 
#define SMB_DENY_NONE   0x40
 

Typedefs

typedef u32 SMBCONN
 
typedef voidSMBFILE
 

Functions

bool smbInitDevice (const char *name, const char *user, const char *password, const char *share, const char *ip)
 
bool smbInit (const char *user, const char *password, const char *share, const char *ip)
 
void smbClose (const char *name)
 
bool smbCheckConnection (const char *name)
 
void smbSetSearchFlags (unsigned short flags)
 
s32 SMB_Connect (SMBCONN *smbhndl, const char *user, const char *password, const char *share, const char *IP)
 
void SMB_Close (SMBCONN smbhndl)
 
s32 SMB_Reconnect (SMBCONN *_smbhndl, bool test_conn)
 
s32 SMB_PathInfo (const char *filename, SMBDIRENTRY *sdir, SMBCONN smbhndl)
 
s32 SMB_FindFirst (const char *filename, unsigned short flags, SMBDIRENTRY *sdir, SMBCONN smbhndl)
 
s32 SMB_FindNext (SMBDIRENTRY *sdir, SMBCONN smbhndl)
 
s32 SMB_FindClose (SMBDIRENTRY *sdir, SMBCONN smbhndl)
 
SMBFILE SMB_OpenFile (const char *filename, unsigned short access, unsigned short creation, SMBCONN smbhndl)
 
void SMB_CloseFile (SMBFILE sfid)
 
s32 SMB_ReadFile (char *buffer, size_t size, off_t offset, SMBFILE sfid)
 
s32 SMB_WriteFile (const char *buffer, size_t size, off_t offset, SMBFILE sfid)
 
s32 SMB_CreateDirectory (const char *dirname, SMBCONN smbhndl)
 
s32 SMB_DeleteDirectory (const char *dirname, SMBCONN smbhndl)
 
s32 SMB_DeleteFile (const char *filename, SMBCONN smbhndl)
 
s32 SMB_Rename (const char *filename, const char *newname, SMBCONN smbhndl)
 
s32 SMB_DiskInformation (struct statvfs *buf, SMBCONN smbhndl)
 

Macro Definition Documentation

◆ SMB_BAD_COMMAND

#define SMB_BAD_COMMAND   -3

◆ SMB_BAD_DATALEN

#define SMB_BAD_DATALEN   -7

◆ SMB_BAD_KEYLEN

#define SMB_BAD_KEYLEN   -6

◆ SMB_BAD_LOGINDATA

#define SMB_BAD_LOGINDATA   -8

◆ SMB_BAD_PROTOCOL

#define SMB_BAD_PROTOCOL   -2

◆ SMB_DENY_NONE

#define SMB_DENY_NONE   0x40

◆ SMB_DENY_READ

#define SMB_DENY_READ   0x30

◆ SMB_DENY_READWRITE

#define SMB_DENY_READWRITE   0x10

◆ SMB_DENY_WRITE

#define SMB_DENY_WRITE   0x20

◆ SMB_ERROR

#define SMB_ERROR   -1

◆ SMB_MAXPATH

#define SMB_MAXPATH   4096

◆ SMB_NOT_USER

#define SMB_NOT_USER   -5

◆ SMB_OF_CREATE

#define SMB_OF_CREATE   16

◆ SMB_OF_OPEN

#define SMB_OF_OPEN   1

SMB File Open Function

◆ SMB_OF_TRUNCATE

#define SMB_OF_TRUNCATE   2

◆ SMB_OPEN_COMPATIBLE

#define SMB_OPEN_COMPATIBLE   0

◆ SMB_OPEN_READING

#define SMB_OPEN_READING   0

SMB File Access Modes

◆ SMB_OPEN_READWRITE

#define SMB_OPEN_READWRITE   2

◆ SMB_OPEN_WRITING

#define SMB_OPEN_WRITING   1

◆ SMB_PROTO_FAIL

#define SMB_PROTO_FAIL   -4

◆ SMB_SRCH_ARCHIVE

#define SMB_SRCH_ARCHIVE   32

◆ SMB_SRCH_DIRECTORY

#define SMB_SRCH_DIRECTORY   16

◆ SMB_SRCH_HIDDEN

#define SMB_SRCH_HIDDEN   2

◆ SMB_SRCH_READONLY

#define SMB_SRCH_READONLY   1

FileSearch

◆ SMB_SRCH_SYSTEM

#define SMB_SRCH_SYSTEM   4

◆ SMB_SRCH_VOLUME

#define SMB_SRCH_VOLUME   8

◆ SMB_SUCCESS

#define SMB_SUCCESS   0

SMB Error codes

Typedef Documentation

◆ SMBCONN

typedef u32 SMBCONN

◆ SMBFILE

typedef void* SMBFILE

Function Documentation

◆ SMB_Close()

void SMB_Close ( SMBCONN  smbhndl)

◆ SMB_CloseFile()

void SMB_CloseFile ( SMBFILE  sfid)

◆ SMB_Connect()

s32 SMB_Connect ( SMBCONN smbhndl,
const char *  user,
const char *  password,
const char *  share,
const char *  IP 
)

◆ SMB_CreateDirectory()

s32 SMB_CreateDirectory ( const char *  dirname,
SMBCONN  smbhndl 
)

◆ SMB_DeleteDirectory()

s32 SMB_DeleteDirectory ( const char *  dirname,
SMBCONN  smbhndl 
)

◆ SMB_DeleteFile()

s32 SMB_DeleteFile ( const char *  filename,
SMBCONN  smbhndl 
)

◆ SMB_DiskInformation()

s32 SMB_DiskInformation ( struct statvfs *  buf,
SMBCONN  smbhndl 
)

◆ SMB_FindClose()

s32 SMB_FindClose ( SMBDIRENTRY sdir,
SMBCONN  smbhndl 
)

◆ SMB_FindFirst()

s32 SMB_FindFirst ( const char *  filename,
unsigned short  flags,
SMBDIRENTRY sdir,
SMBCONN  smbhndl 
)

◆ SMB_FindNext()

s32 SMB_FindNext ( SMBDIRENTRY sdir,
SMBCONN  smbhndl 
)

◆ SMB_OpenFile()

SMBFILE SMB_OpenFile ( const char *  filename,
unsigned short  access,
unsigned short  creation,
SMBCONN  smbhndl 
)

◆ SMB_PathInfo()

s32 SMB_PathInfo ( const char *  filename,
SMBDIRENTRY sdir,
SMBCONN  smbhndl 
)

◆ SMB_ReadFile()

s32 SMB_ReadFile ( char *  buffer,
size_t  size,
off_t  offset,
SMBFILE  sfid 
)

◆ SMB_Reconnect()

s32 SMB_Reconnect ( SMBCONN _smbhndl,
bool  test_conn 
)

◆ SMB_Rename()

s32 SMB_Rename ( const char *  filename,
const char *  newname,
SMBCONN  smbhndl 
)

◆ SMB_WriteFile()

s32 SMB_WriteFile ( const char *  buffer,
size_t  size,
off_t  offset,
SMBFILE  sfid 
)

◆ smbCheckConnection()

bool smbCheckConnection ( const char *  name)

◆ smbClose()

void smbClose ( const char *  name)

◆ smbInit()

bool smbInit ( const char *  user,
const char *  password,
const char *  share,
const char *  ip 
)

◆ smbInitDevice()

bool smbInitDevice ( const char *  name,
const char *  user,
const char *  password,
const char *  share,
const char *  ip 
)

Prototypes

◆ smbSetSearchFlags()

void smbSetSearchFlags ( unsigned short  flags)