libgui 2.01
libgui is a GUI library for the GameCube, Wii, and Wii U
 
Loading...
Searching...
No Matches
SmbDriver Class Referenceabstract

Network-share driver. More...

#include <SmbDriver.h>

Inheritance diagram for SmbDriver:
[legend]

Public Member Functions

virtual void init ()=0
 One-time setup.
 
virtual void shutdown ()=0
 Disconnects if connected and releases whatever init() set up.
 
virtual bool isNetworkUp () const =0
 True if the network is already up, i.e.
 
virtual bool ensureNetworkUp ()=0
 Brings the network up if it isn't already.
 
virtual SmbConnectResult connect (const SmbShareInfo &info)=0
 Attempts to connect and mount in one call.
 
virtual void disconnect ()=0
 Unmounts and drops the connection.
 
virtual bool isConnected () const =0
 
virtual const char * getMountPath () const =0
 devoptab-style mount path (eg.
 
virtual const char * connectResultMessage (SmbConnectResult result) const =0
 Short, user-displayable reason for a non-Success SmbConnectResult.
 
virtual const char * getLastError () const
 Raw, implementation-specific detail behind the last failure.
 

Detailed Description

Network-share driver.

One instance is owned by each platform's FileSystemDriver and returned from FileSystemDriver::getSmb().

Definition at line 42 of file SmbDriver.h.

Member Function Documentation

◆ connect()

virtual SmbConnectResult SmbDriver::connect ( const SmbShareInfo & info)
pure virtual

Attempts to connect and mount in one call.

No-ops (returns Success) if already connected to the same host+share; reconnects if info describes a different target.

Implemented in OgcSmbDriver, and WutSmbDriver.

◆ connectResultMessage()

virtual const char * SmbDriver::connectResultMessage ( SmbConnectResult result) const
pure virtual

Short, user-displayable reason for a non-Success SmbConnectResult.

Never returns nullptr.

Implemented in OgcSmbDriver, and WutSmbDriver.

◆ disconnect()

virtual void SmbDriver::disconnect ( )
pure virtual

Unmounts and drops the connection.

Safe to call whether or not currently connected.

Implemented in OgcSmbDriver, and WutSmbDriver.

◆ ensureNetworkUp()

virtual bool SmbDriver::ensureNetworkUp ( )
pure virtual

Brings the network up if it isn't already.

Returns
false (with getLastError() set) if it couldn't be brought up.

Implemented in OgcSmbDriver, and WutSmbDriver.

◆ getLastError()

virtual const char * SmbDriver::getLastError ( ) const
inlinevirtual

Raw, implementation-specific detail behind the last failure.

Not something callers should rely on being non-empty.

Reimplemented in OgcSmbDriver, and WutSmbDriver.

Definition at line 83 of file SmbDriver.h.

◆ getMountPath()

virtual const char * SmbDriver::getMountPath ( ) const
pure virtual

devoptab-style mount path (eg.

"smb:/"), or "" if not currently connected.

Implemented in OgcSmbDriver, and WutSmbDriver.

◆ init()

virtual void SmbDriver::init ( )
pure virtual

One-time setup.

Does not connect - just prepares whatever the platform needs before a connect() can succeed.

Implemented in OgcSmbDriver, and WutSmbDriver.

◆ isConnected()

virtual bool SmbDriver::isConnected ( ) const
pure virtual
Returns
true while a share is connected and mounted

Implemented in OgcSmbDriver, and WutSmbDriver.

◆ isNetworkUp()

virtual bool SmbDriver::isNetworkUp ( ) const
pure virtual

True if the network is already up, i.e.

connect() won't first have to bring it up. Cheap and non-blocking - safe to poll.

Implemented in OgcSmbDriver, and WutSmbDriver.

◆ shutdown()

virtual void SmbDriver::shutdown ( )
pure virtual

Disconnects if connected and releases whatever init() set up.

Implemented in OgcSmbDriver, and WutSmbDriver.


The documentation for this class was generated from the following file: