Wraps libsmb2 behind a "smb:/" devoptab. More...
#include <OgcSmbDriver.h>
Public Member Functions | |
| void | init () override |
| One-time setup. | |
| void | shutdown () override |
| Disconnects if connected and releases whatever init() set up. | |
| SmbConnectResult | connect (const SmbShareInfo &info) override |
| Attempts to connect and mount in one call. | |
| void | disconnect () override |
| Unmounts and drops the connection. | |
| bool | isConnected () const override |
| const char * | getMountPath () const override |
| devoptab-style mount path (eg. | |
| const char * | connectResultMessage (SmbConnectResult result) const override |
| Short, user-displayable reason for a non-Success SmbConnectResult. | |
| const char * | getLastError () const override |
| Raw, implementation-specific detail behind the last failure. | |
| bool | isNetworkUp () const override |
| True if the network is already up, i.e. | |
| bool | ensureNetworkUp () override |
| Ensures the network is up via the platform's network helper (WiiNetwork or GameCubeNetwork). | |
Static Public Member Functions | |
| static smb2_context * | getContext () |
| The active context, used by the free-function devoptab callbacks in OgcSmbDriver.cpp. | |
Wraps libsmb2 behind a "smb:/" devoptab.
Both GameCube (via BBA) and Wii bring the network up, then share the identical libsmb2 connect/devoptab
Definition at line 22 of file OgcSmbDriver.h.
|
overridevirtual |
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.
Implements SmbDriver.
Definition at line 347 of file OgcSmbDriver.cpp.
|
overridevirtual |
Short, user-displayable reason for a non-Success SmbConnectResult.
Never returns nullptr.
Implements SmbDriver.
Definition at line 426 of file OgcSmbDriver.cpp.
|
overridevirtual |
Unmounts and drops the connection.
Safe to call whether or not currently connected.
Implements SmbDriver.
Definition at line 408 of file OgcSmbDriver.cpp.
|
overridevirtual |
Ensures the network is up via the platform's network helper (WiiNetwork or GameCubeNetwork).
Blocking. Returns false (with getLastError() set) if it couldn't be brought up.
Implements SmbDriver.
Definition at line 336 of file OgcSmbDriver.cpp.
|
inlinestatic |
The active context, used by the free-function devoptab callbacks in OgcSmbDriver.cpp.
Only one OgcSmbDriver/mount exists at a time.
Definition at line 38 of file OgcSmbDriver.h.
|
overridevirtual |
Raw, implementation-specific detail behind the last failure.
Not something callers should rely on being non-empty.
Reimplemented from SmbDriver.
Definition at line 438 of file OgcSmbDriver.cpp.
|
inlineoverridevirtual |
devoptab-style mount path (eg.
"smb:/"), or "" if not currently connected.
Implements SmbDriver.
Definition at line 32 of file OgcSmbDriver.h.
|
overridevirtual |
One-time setup.
Does not connect - just prepares whatever the platform needs before a connect() can succeed.
Implements SmbDriver.
Definition at line 311 of file OgcSmbDriver.cpp.
|
inlineoverridevirtual |
Implements SmbDriver.
Definition at line 30 of file OgcSmbDriver.h.
|
overridevirtual |
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.
Implements SmbDriver.
Definition at line 327 of file OgcSmbDriver.cpp.
|
overridevirtual |
Disconnects if connected and releases whatever init() set up.
Implements SmbDriver.
Definition at line 316 of file OgcSmbDriver.cpp.