StormByte-Network 4.0.0
C++26 networking module of the StormByte suite
Loading...
Searching...
No Matches
StormByte::Network::RemoteFileMount Class Referencefinal

Public, validated descriptor for attaching to one remote file channel. More...

#include <StormByte/network/remote_file_mount.hxx>

Public Types

enum class  Status : std::uint8_t {
  Authorized = 1 , NotAuthorized = 2 , Unavailable = 3 , FileBeingRead = 4 ,
  FileBeingWritten = 5 , Failed = 6
}
 Outcome of the application-authorized mount request. More...
enum class  Access : std::uint8_t { None = 0 , Read = 1 , Write = 2 }
 Permitted direction for this mounted channel. More...
using ChannelToken = std::array<std::byte, 32>
 Fixed-width opaque channel capability.

Public Member Functions

 RemoteFileMount (const RemoteFileMount &other)
 Copy a validated mount descriptor.
 RemoteFileMount (RemoteFileMount &&other) noexcept
 Move a validated mount descriptor.
RemoteFileMount & operator= (const RemoteFileMount &other)
 Copy-assign a validated mount descriptor.
RemoteFileMount & operator= (RemoteFileMount &&other) noexcept
 Move-assign a validated mount descriptor.
 ~RemoteFileMount () noexcept
 Out-of-line destructor anchors the non-trivial codec type.
std::uint16_t Port () const noexcept
 Session data-plane port shared by every Authorized mount from one Client.
std::uint16_t MaximumTimeoutSeconds () const noexcept
 Maximum idle interval for the Client's peer data-plane heartbeat.
Status Result () const noexcept
 Mount request result.
Access Mode () const noexcept
 Authorized access mode.
const ChannelToken & Token () const noexcept
 Opaque capability checked by the private channel protocol.

Static Public Member Functions

static RemoteFileMount NotAuthorized () noexcept
 Construct an application-level authorization denial.
static RemoteFileMount Unavailable () noexcept
 Construct a missing-file result without channel credentials.
static RemoteFileMount FileBeingRead () noexcept
 Construct a result for a write blocked by mounted readers.
static RemoteFileMount FileBeingWritten () noexcept
 Construct a result for a mount blocked by an exclusive writer.
static RemoteFileMount Failed () noexcept
 Construct a non-authorization mount failure.

Friends

class Server
 Server may construct authorized mount descriptors.
struct StormByte::Detail::Codec< RemoteFileMount >
 Wire codec may access validated descriptor fields.

Detailed Description

Public, validated descriptor for attaching to one remote file channel.

Decode this value from the application response with StormByte::Serializable. It contains no server filesystem path.

Member Typedef Documentation

◆ ChannelToken

using StormByte::Network::RemoteFileMount::ChannelToken = std::array<std::byte, 32>

Fixed-width opaque channel capability.

Member Enumeration Documentation

◆ Access

enum class StormByte::Network::RemoteFileMount::Access : std::uint8_t
strong

Permitted direction for this mounted channel.

Enumerator
None 

No channel capability is present.

Read 

Client may read from the mounted file.

Write 

Client may write to the mounted file.

◆ Status

enum class StormByte::Network::RemoteFileMount::Status : std::uint8_t
strong

Outcome of the application-authorized mount request.

Enumerator
Authorized 

Channel was authorized and mounted.

NotAuthorized 

Application policy denied the request.

Unavailable 

Requested read file does not exist.

FileBeingRead 

Writer rejected because one or more readers are mounted.

FileBeingWritten 

Reader/writer rejected because an exclusive writer is mounted.

Failed 

Mount failed for a reason other than authorization or path conflict.

Constructor & Destructor Documentation

◆ RemoteFileMount() [1/2]

StormByte::Network::RemoteFileMount::RemoteFileMount ( const RemoteFileMount & other)

Copy a validated mount descriptor.

Parameters
otherDescriptor to copy.

◆ RemoteFileMount() [2/2]

StormByte::Network::RemoteFileMount::RemoteFileMount ( RemoteFileMount && other)
noexcept

Move a validated mount descriptor.

Parameters
otherDescriptor to move; fixed-width fields remain valid.

◆ ~RemoteFileMount()

StormByte::Network::RemoteFileMount::~RemoteFileMount ( )
noexcept

Out-of-line destructor anchors the non-trivial codec type.

Member Function Documentation

◆ Failed()

RemoteFileMount StormByte::Network::RemoteFileMount::Failed ( )
staticnoexcept

Construct a non-authorization mount failure.

Returns
Failed mount descriptor without channel credentials.

◆ FileBeingRead()

RemoteFileMount StormByte::Network::RemoteFileMount::FileBeingRead ( )
staticnoexcept

Construct a result for a write blocked by mounted readers.

Returns
Descriptor reporting a reader conflict.

◆ FileBeingWritten()

RemoteFileMount StormByte::Network::RemoteFileMount::FileBeingWritten ( )
staticnoexcept

Construct a result for a mount blocked by an exclusive writer.

Returns
Descriptor reporting a writer conflict.

◆ MaximumTimeoutSeconds()

std::uint16_t StormByte::Network::RemoteFileMount::MaximumTimeoutSeconds ( ) const
noexcept

Maximum idle interval for the Client's peer data-plane heartbeat.

Returns
Maximum idle interval in seconds.

◆ Mode()

Access StormByte::Network::RemoteFileMount::Mode ( ) const
noexcept

Authorized access mode.

Returns
Permitted channel direction.

◆ NotAuthorized()

RemoteFileMount StormByte::Network::RemoteFileMount::NotAuthorized ( )
staticnoexcept

Construct an application-level authorization denial.

Returns
Descriptor without channel credentials.

◆ operator=() [1/2]

RemoteFileMount & StormByte::Network::RemoteFileMount::operator= ( const RemoteFileMount & other)

Copy-assign a validated mount descriptor.

Parameters
otherDescriptor to copy.
Returns
This descriptor.

◆ operator=() [2/2]

RemoteFileMount & StormByte::Network::RemoteFileMount::operator= ( RemoteFileMount && other)
noexcept

Move-assign a validated mount descriptor.

Parameters
otherDescriptor to move; fixed-width fields remain valid.
Returns
This descriptor.

◆ Port()

std::uint16_t StormByte::Network::RemoteFileMount::Port ( ) const
noexcept

Session data-plane port shared by every Authorized mount from one Client.

Returns
Shared port, or zero when rejected.

◆ Result()

Status StormByte::Network::RemoteFileMount::Result ( ) const
noexcept

Mount request result.

Returns
Result of the mount request.

◆ Token()

const ChannelToken & StormByte::Network::RemoteFileMount::Token ( ) const
noexcept

Opaque capability checked by the private channel protocol.

Returns
Reference to the channel token.

◆ Unavailable()

RemoteFileMount StormByte::Network::RemoteFileMount::Unavailable ( )
staticnoexcept

Construct a missing-file result without channel credentials.

Returns
Unavailable mount descriptor.

◆ Server

friend class Server
friend

Server may construct authorized mount descriptors.

◆ StormByte::Detail::Codec< RemoteFileMount >

friend struct StormByte::Detail::Codec< RemoteFileMount >
friend

Wire codec may access validated descriptor fields.


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