Wii U SmbDriver built on libsmb2, registering its own smb:/ newlib devoptab. More...
#include <WutSmbDriver.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 |
| Brings the Wii U network connection up if it isn't already, via nn::ac (ACConnect()). | |
Static Public Member Functions | |
| static smb2_context * | getContext () |
| The active context, used by the free-function devoptab callbacks in WutSmbDriver.cpp. | |
Wii U SmbDriver built on libsmb2, registering its own smb:/ newlib devoptab.
Definition at line 17 of file WutSmbDriver.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 370 of file WutSmbDriver.cpp.
|
overridevirtual |
Short, user-displayable reason for a non-Success SmbConnectResult.
Never returns nullptr.
Implements SmbDriver.
Definition at line 440 of file WutSmbDriver.cpp.
|
overridevirtual |
Unmounts and drops the connection.
Safe to call whether or not currently connected.
Implements SmbDriver.
Definition at line 422 of file WutSmbDriver.cpp.
|
overridevirtual |
Brings the Wii U network connection up if it isn't already, via nn::ac (ACConnect()).
Blocking. Returns false (with getLastError() set) if AC wasn't initialized or the connect attempt failed.
Implements SmbDriver.
Definition at line 343 of file WutSmbDriver.cpp.
|
inlinestatic |
The active context, used by the free-function devoptab callbacks in WutSmbDriver.cpp.
Only one WutSmbDriver/mount exists at a time.
Definition at line 33 of file WutSmbDriver.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 452 of file WutSmbDriver.cpp.
|
inlineoverridevirtual |
devoptab-style mount path (eg.
"smb:/"), or "" if not currently connected.
Implements SmbDriver.
Definition at line 27 of file WutSmbDriver.h.
|
overridevirtual |
One-time setup.
Does not connect - just prepares whatever the platform needs before a connect() can succeed.
Implements SmbDriver.
Definition at line 307 of file WutSmbDriver.cpp.
|
inlineoverridevirtual |
Implements SmbDriver.
Definition at line 25 of file WutSmbDriver.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 333 of file WutSmbDriver.cpp.
|
overridevirtual |
Disconnects if connected and releases whatever init() set up.
Implements SmbDriver.
Definition at line 315 of file WutSmbDriver.cpp.