Fork Vasum on GitHub Official Vasum Wiki on Tizen.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
cargo::FDStore Class Reference

#include <fdstore.hpp>

Public Member Functions

 FDStore (int fd=-1)
 Constructor. More...
 
 FDStore (const FDStore &store)
 
 ~FDStore ()
 
void write (const void *bufferPtr, const size_t size, const unsigned int timeoutMS=maxTimeout)
 Write data using the file descriptor. More...
 
void read (void *bufferPtr, const size_t size, const unsigned int timeoutMS=maxTimeout)
 Reads a value of the given type. More...
 
void sendFD (int fd, const unsigned int timeoutMS=maxTimeout)
 
int receiveFD (const unsigned int timeoutMS=maxTimeout)
 

Private Attributes

int mFD
 

Constructor & Destructor Documentation

cargo::FDStore::FDStore ( int  fd = -1)

Constructor.

One can pass any kind of file descriptor. Serialization is NOT written for network purposes, rather local communication.

Parameters
fdfile descriptor
cargo::FDStore::FDStore ( const FDStore store)
cargo::FDStore::~FDStore ( )

Member Function Documentation

void cargo::FDStore::read ( void *  bufferPtr,
const size_t  size,
const unsigned int  timeoutMS = maxTimeout 
)

Reads a value of the given type.

Parameters
bufferPtrbuffer with the data
sizesize of the buffer
timeoutMStimeout in milliseconds
int cargo::FDStore::receiveFD ( const unsigned int  timeoutMS = maxTimeout)
void cargo::FDStore::sendFD ( int  fd,
const unsigned int  timeoutMS = maxTimeout 
)
void cargo::FDStore::write ( const void *  bufferPtr,
const size_t  size,
const unsigned int  timeoutMS = maxTimeout 
)

Write data using the file descriptor.

Parameters
bufferPtrbuffer with the data
sizesize of the buffer
timeoutMStimeout in milliseconds

Member Data Documentation

int cargo::FDStore::mFD
private

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