Microsoft Azure Storage Client Library for C++  7.5.0
The Microsoft Azure Storage Client Library for C++ is a library for working with the Azure Storage Services in C++.
Public Types | Public Member Functions | List of all members
azure::storage::block_list_item Class Reference

Represents a block in a block list. More...

Public Types

enum  block_mode { committed, uncommitted, latest }
 Indicates which block lists should be searched to find a specified block. More...
 

Public Member Functions

 block_list_item (utility::string_t id)
 Initializes a new instance of the azure::storage::block_list_item class. More...
 
 block_list_item (utility::string_t id, block_mode mode)
 Initializes a new instance of the azure::storage::block_list_item class. More...
 
const utility::string_t & id () const
 Gets the name of the block. More...
 
size_t size () const
 Gets the size of block in bytes. More...
 
block_mode mode () const
 Gets a value indicating whether the block has been committed. More...
 

Detailed Description

Represents a block in a block list.

Member Enumeration Documentation

◆ block_mode

Indicates which block lists should be searched to find a specified block.

Enumerator
committed 

Search the committed block list only.

uncommitted 

Search the uncommitted block list only.

latest 

Search the uncommitted block list first, and if the block is not found there, search the committed block list.

Constructor & Destructor Documentation

◆ block_list_item() [1/2]

azure::storage::block_list_item::block_list_item ( utility::string_t  id)
inline

Initializes a new instance of the azure::storage::block_list_item class.

Parameters
idThe block name.

◆ block_list_item() [2/2]

azure::storage::block_list_item::block_list_item ( utility::string_t  id,
block_mode  mode 
)
inline

Initializes a new instance of the azure::storage::block_list_item class.

Parameters
idThe block name.
modeAn azure::storage::block_list_item::block_mode value that indicates which block lists to search for the block.

Member Function Documentation

◆ id()

const utility::string_t& azure::storage::block_list_item::id ( ) const
inline

Gets the name of the block.

Returns
The block name.

◆ mode()

block_mode azure::storage::block_list_item::mode ( ) const
inline

Gets a value indicating whether the block has been committed.

Returns
An azure::storage::block_list_item::block_mode value that indicates whether the block has been committed.

◆ size()

size_t azure::storage::block_list_item::size ( ) const
inline

Gets the size of block in bytes.

Returns
The block size.