Appearance
class flake::IPCConnection
#include </Users/ios_developer/workspace/coldwave-os/build/_deps/flake-src/routing/IPCConnection.h>
Inherits from flake::ConnectionImpl, flake::Connection, flake::ObjectImpl, flake::WireConnectionSink, ClientObjectRegistry, flake::TransportImpl, flake::ConnectedObject, flake::IndicationSink, flake::ConfirmationSink, flake::ConnectedObjectImpl, flake::Object, flake::PropArray, flake::Serializable, flake::Transport
Public Functions
Name | |
---|---|
IPCConnection(ConnectionSink * s) | |
virtual | ~IPCConnection() override |
virtual Message * | pollQueue(bool nonblocking) override |
virtual void | pushQueue(Message * dgram) override |
virtual int | connect() override |
virtual int | connect(PropArray & props) override |
virtual void | shutdown() override |
IPCServerConnection * | serverConnection(Router * r) |
virtual uint32_t | wireId() const override |
Friends
Name | |
---|---|
class | IPCServerConnection |
Additional inherited members
Public Functions inherited from flake::ConnectionImpl
Name | |
---|---|
ConnectionImpl(Wire * w, ConnectionSink * s, AuthenticationSink * a =nullptr) | |
void | reset() |
virtual void | disconnect() override Disconnect from the router. |
virtual void | queryObjects(uniqueId_t type, int * numObjects, Object ** objects[]) override |
virtual int8_t | registerService(Service * srv, uniqueId_t & uuid, bool requires_auth =false) override |
virtual int8_t | createObject(uniqueId_t & objectType, PropArray & properties, Object ** object) override |
int | subscribeObject(ObjectImpl * s, std::function< void(Indication &)> f) |
void | unsubscribeObject(ObjectImpl * s) |
int | openStream(ObjectImpl * s, string name, Stream ** str) |
int | sendRequest(Message ** dgram, ConfirmationSink * sink =nullptr, bool synchronous =false, uint32_t timeout_ms =FLAKE_DEFAULT_TIMEOUT_MS) |
int | validateMessageParameters(const addr_t src, const addr_t dst, const uint32_t messageType) |
virtual void | ref() override |
virtual void | unref() override |
bool | softConnect() |
Protected Functions inherited from flake::ConnectionImpl
Name | |
---|---|
void | pollFunc(void * arg) |
~ConnectionImpl() | |
virtual bool | connected() override |
virtual void | onWireConnect() override |
virtual void | onWireDisconnect() override |
virtual void | onConfirmation(Confirmation & confirmation) override |
virtual void | onIndication(Indication & indication) override |
Protected Attributes inherited from flake::ConnectionImpl
Name | |
---|---|
ThreadQueue< Message * > | m_dgramInQueue |
Public Functions inherited from flake::Connection
Name | |
---|---|
virtual void | disconnect() =0 Disconnect from the router. |
virtual bool | connected() =0 |
virtual int8_t | registerService(Service * srv, uniqueId_t & uuid, bool requires_auth =false) =0 |
virtual int8_t | createObject(uniqueId_t & objectType, PropArray & properties, Object ** object) =0 |
virtual void | queryObjects(uniqueId_t type, int * numObjects, Object ** objects[]) =0 |
Protected Functions inherited from flake::Connection
Name | |
---|---|
~Connection() =default |
Public Functions inherited from flake::ObjectImpl
Name | |
---|---|
ObjectImpl() | |
ObjectImpl(Service * srv) | |
Connection * | connection() |
const char * | getObjectType() |
bool | isInitialized() |
virtual TagArray | defaultPropset() |
virtual int | subscribe(std::function< void(Indication &)> f) override |
virtual void | unsubscribe() override Unsubscribes from the object, effectively removing ALL subscriptions if there are multiple ones. |
virtual int | invoke(string command, PropArray & params, bool blocking, Confirmation ** conf) override |
virtual int | broadcast(const string message, PropArray & params) override |
virtual int | setProperty(const Property & property) override |
virtual void | getProperty(Property & property) override |
virtual int | getProperties(PropArray & properties) override |
virtual int | setProperties(PropArray & properties, int timeout_ms =FLAKE_DEFAULT_TIMEOUT_MS) override |
int | setPropertiesEx(PropArray & properties, bool dontBlock =false, int timeout_ms =FLAKE_DEFAULT_TIMEOUT_MS) |
virtual void | beginUpdate() override |
virtual int8_t | commitUpdate(int timeout_ms =0) override |
virtual int8_t | commitUpdate(PropArray * result, int timeout_ms =0) override |
virtual void | getPendingProperty(Property & property) override |
virtual int | getPendingProperties(PropArray & properties) override |
virtual void | ref() override |
virtual void | unref() override |
Protected Functions inherited from flake::ObjectImpl
Name | |
---|---|
ObjectImpl(ConnectionImpl * conn) | |
virtual | ~ObjectImpl() |
virtual void | onInitialized() |
virtual void | onIndication(Indication & indication) override |
virtual void | onConfirmation(Confirmation & confirmation) override |
int | registerProperties(PropArray & properties) |
virtual int8_t | handleCustomMessage(string name, PropArray & data, PropArray & outProps) |
virtual int8_t | handleStreamData(Stream * s, byte * cb, uint32_t len) |
virtual int | setPropertyRequested(uint32_t tag, Property & value, const PropArray & transaction, bool internal) |
virtual int | getPropertyRequested(uint32_t tag, Property & value) |
Public Attributes inherited from flake::ObjectImpl
Name | |
---|---|
const addr_t | EMPTY_ADDR |
Friends inherited from flake::ObjectImpl
Name | |
---|---|
class | ConnectionImpl |
class | Service |
Public Functions inherited from flake::WireConnectionSink
Name | |
---|---|
virtual void | onWireConnect() =0 |
virtual void | onWireDisconnect() =0 |
Public Functions inherited from flake::TransportImpl
Name | |
---|---|
TransportImpl(Wire * w, ThreadQueue< Message * > & inQueue, ThreadQueue< Message * > * outQueue, WireConnectionSink * wiresink) | |
virtual | ~TransportImpl() |
bool | tryPushQueue(Message * dgram) |
ConnectionState | connectionState() |
virtual Wire * | wire() const override |
virtual int | latency_us() override |
virtual bool | isConnected() override |
virtual bool | isShutdown() override |
virtual bool | isShuttingDown() override |
int8_t | sendDatagram(Message * d) |
int | processBuffer(unsigned char * receiveBuffer, unsigned int buflen, Message ** d) |
virtual void | onWireDisconnect(void ) override |
Protected Functions inherited from flake::TransportImpl
Name | |
---|---|
void | start() |
Public Attributes inherited from flake::TransportImpl
Name | |
---|---|
flakeMutexId_t | m_wireMutex |
Protected Attributes inherited from flake::TransportImpl
Name | |
---|---|
volatile ConnectionState | m_connectionState |
ThreadQueue< Message * > * | m_dgramOutQueue |
ThreadQueue< Message * > & | m_dgramInQueue |
WireConnectionSink * | m_wireConnectionSink |
int | m_pingCount |
uint32_t | m_lastDgramTimestamp |
Friends inherited from flake::TransportImpl
Name | |
---|---|
class | Router |
Public Functions inherited from flake::ConnectedObject
Name | |
---|---|
virtual addr_t | addr() const =0 |
virtual addr_t | broadcastAddr() const =0 |
virtual void | ref() =0 |
virtual void | unref() =0 |
Protected Functions inherited from flake::ConnectedObject
Name | |
---|---|
~ConnectedObject() =default |
Public Attributes inherited from flake::ConnectedObject
Name | |
---|---|
const addr_t | EMPTY_ADDR |
Public Functions inherited from flake::IndicationSink
Name | |
---|---|
virtual void | onIndication(Indication & indication) =0 |
Protected Functions inherited from flake::IndicationSink
Name | |
---|---|
~IndicationSink() =default |
Public Functions inherited from flake::ConfirmationSink
Name | |
---|---|
virtual void | onConfirmation(Confirmation & confirmation) =0 |
Protected Functions inherited from flake::ConfirmationSink
Name | |
---|---|
~ConfirmationSink() =default |
Public Functions inherited from flake::ConnectedObjectImpl
Name | |
---|---|
ConnectedObjectImpl(ConnectionImpl * conn) | |
~ConnectedObjectImpl() override | |
virtual addr_t | addr() const override |
virtual addr_t | broadcastAddr() const override |
virtual void | onIndication(Indication & indication) override |
virtual void | onConfirmation(Confirmation & confirmation) override |
Protected Attributes inherited from flake::ConnectedObjectImpl
Name | |
---|---|
addr_t | m_addr |
addr_t | m_parentAddr |
addr_t | m_broadcastAddr |
ConnectionImpl * | m_connection |
Public Functions inherited from flake::Object
Name | |
---|---|
virtual int | invoke(string command, PropArray & params, bool blocking, Confirmation ** conf) =0 |
virtual int | broadcast(string message, PropArray & params) =0 |
virtual int | getProperties(PropArray & properties) =0 |
virtual int | setProperties(PropArray & properties, int timeout_ms) =0 |
virtual int | setProperty(const Property & property) =0 |
virtual void | getProperty(Property & property) =0 |
virtual int | subscribe(std::function< void(Indication &)> f) =0 |
virtual void | unsubscribe() =0 Unsubscribes from the object, effectively removing ALL subscriptions if there are multiple ones. |
virtual void | beginUpdate() =0 |
virtual int8_t | commitUpdate(int timeout_ms =0) =0 |
virtual int8_t | commitUpdate(PropArray * result, int timeout_ms =0) =0 |
virtual void | getPendingProperty(Property & property) =0 |
virtual int | getPendingProperties(PropArray & properties) =0 |
Protected Functions inherited from flake::Object
Name | |
---|---|
~Object() =default |
Public Functions inherited from flake::PropArray
Name | |
---|---|
virtual | ~PropArray() |
PropArray() | |
PropArray(const PropArray & va) | |
const Property & | operator[](size_type __n) const |
PropArray & | operator=(const PropArray & other) |
void | copyFrom(const PropArray & other) |
void | clear() |
const Property & | get(uint32_t tag) const |
bool | has(uint32_t tag) const |
void | set(const Property & val) |
char * | toString() |
size_type | count() const |
virtual bool | serialize(uint16_t * len, flake::byte ** buf) override |
virtual bool | unserialize(uint16_t len, flake::byte * buf) override |
Public Attributes inherited from flake::PropArray
Name | |
---|---|
Property | VAL_ERR_NOT_FOUND |
Public Functions inherited from flake::Serializable
Name | |
---|---|
virtual bool | serialize(uint16_t * len, flake::byte ** buf) =0 |
virtual bool | unserialize(uint16_t len, flake::byte * buf) =0 |
Protected Functions inherited from flake::Serializable
Name | |
---|---|
~Serializable() =default |
Public Functions inherited from flake::Transport
Name | |
---|---|
virtual void | onWireConnect() =0 |
virtual void | onWireDisconnect() =0 |
virtual Wire * | wire() const =0 |
virtual Message * | pollOutQueue(bool nonblocking) =0 |
virtual int | latency_us() =0 |
virtual bool | isConnected() =0 |
virtual bool | isShutdown() =0 |
virtual bool | isShuttingDown() =0 |
virtual void | ref() =0 |
virtual void | unref() =0 |
Public Functions Documentation
function IPCConnection
cpp
explicit IPCConnection(
ConnectionSink * s
)
function ~IPCConnection
cpp
inline virtual ~IPCConnection() override
function pollQueue
cpp
virtual Message * pollQueue(
bool nonblocking
) override
Reimplements: flake::Transport::pollQueue
function pushQueue
cpp
virtual void pushQueue(
Message * dgram
) override
Reimplements: flake::Transport::pushQueue
function connect
cpp
virtual int connect() override
Reimplements: flake::Transport::connect
function connect
cpp
virtual int connect(
PropArray & props
) override
Reimplements: flake::ConnectionImpl::connect
function shutdown
cpp
virtual void shutdown() override
Reimplements: flake::Transport::shutdown
function serverConnection
cpp
IPCServerConnection * serverConnection(
Router * r
)
function wireId
cpp
virtual uint32_t wireId() const override
Reimplements: flake::Transport::wireId
Friends
friend IPCServerConnection
cpp
friend class IPCServerConnection(
IPCServerConnection
);