|
FreeNOS
|
Registration for Channels. More...
#include <ChannelRegistry.h>
Public Types | |
| enum | Result { Success, InvalidArgument, InvalidSize, IOError, NotFound } |
| Result codes. More... | |
Public Member Functions | |
| ChannelRegistry () | |
| Constructor. More... | |
| virtual | ~ChannelRegistry () |
| Destructor. More... | |
| Channel * | getConsumer (const ProcessID pid) |
| Get one consumer. More... | |
| Channel * | getProducer (const ProcessID pid) |
| Get one producer. More... | |
| HashTable< ProcessID, Channel * > & | getConsumers () |
| Get all consumers. More... | |
| HashTable< ProcessID, Channel * > & | getProducers () |
| Get all producers. More... | |
| Result | registerConsumer (const ProcessID pid, Channel *channel) |
| Register consumer channel. More... | |
| Result | registerProducer (const ProcessID pid, Channel *channel) |
| Register producer channel. More... | |
| Result | unregisterConsumer (const ProcessID pid) |
| Unregister consumer channel. More... | |
| Result | unregisterProducer (const ProcessID pid) |
| Unregister producer channel. More... | |
Private Attributes | |
| HashTable< ProcessID, Channel * > | m_consumer |
| Contains registered consumer channels. More... | |
| HashTable< ProcessID, Channel * > | m_producer |
| Contains registered producer channels. More... | |
Registration for Channels.
Definition at line 37 of file ChannelRegistry.h.
Result codes.
| Enumerator | |
|---|---|
| Success | |
| InvalidArgument | |
| InvalidSize | |
| IOError | |
| NotFound | |
Definition at line 44 of file ChannelRegistry.h.
| ChannelRegistry::ChannelRegistry | ( | ) |
Constructor.
Definition at line 22 of file ChannelRegistry.cpp.
|
virtual |
Destructor.
Definition at line 26 of file ChannelRegistry.cpp.
References HashIterator< K, V >::hasCurrent(), m_consumer, and m_producer.
Get one consumer.
| pid | ProcessID of the channel to get |
Definition at line 35 of file ChannelRegistry.cpp.
References HashTable< K, V >::get(), m_consumer, and ZERO.
Referenced by ChannelServer< DatastoreServer, DatastoreMessage >::accept(), ChannelClient::findConsumer(), and unregisterConsumer().
Get all consumers.
Definition at line 53 of file ChannelRegistry.cpp.
References m_consumer.
Referenced by ChannelServer< DatastoreServer, DatastoreMessage >::readChannels(), and ChannelClient::receiveAny().
Get one producer.
| pid | ProcessID of the channel to get |
Definition at line 44 of file ChannelRegistry.cpp.
References HashTable< K, V >::get(), m_producer, and ZERO.
Referenced by ChannelServer< DatastoreServer, DatastoreMessage >::accept(), ChannelClient::findProducer(), ChannelServer< DatastoreServer, DatastoreMessage >::readChannels(), FileSystemServer::sendResponse(), and unregisterProducer().
Get all producers.
Definition at line 58 of file ChannelRegistry.cpp.
References m_producer.
| ChannelRegistry::Result ChannelRegistry::registerConsumer | ( | const ProcessID | pid, |
| Channel * | channel | ||
| ) |
Register consumer channel.
| pid | ProcessID of the attached process |
| channel | Channel object |
Definition at line 63 of file ChannelRegistry.cpp.
References HashTable< K, V >::insert(), m_consumer, and Success.
Referenced by ChannelServer< DatastoreServer, DatastoreMessage >::accept(), and ChannelClient::connect().
| ChannelRegistry::Result ChannelRegistry::registerProducer | ( | const ProcessID | pid, |
| Channel * | channel | ||
| ) |
Register producer channel.
| pid | ProcessID of the attached process |
| channel | Channel object |
Definition at line 71 of file ChannelRegistry.cpp.
References HashTable< K, V >::insert(), m_producer, and Success.
Referenced by ChannelServer< DatastoreServer, DatastoreMessage >::accept(), and ChannelClient::connect().
| ChannelRegistry::Result ChannelRegistry::unregisterConsumer | ( | const ProcessID | pid | ) |
Unregister consumer channel.
| pid | ProcessID of the attached process |
Definition at line 79 of file ChannelRegistry.cpp.
References getConsumer(), m_consumer, NotFound, HashTable< K, V >::remove(), and Success.
Referenced by ChannelServer< DatastoreServer, DatastoreMessage >::readKernelEvents().
| ChannelRegistry::Result ChannelRegistry::unregisterProducer | ( | const ProcessID | pid | ) |
Unregister producer channel.
| pid | ProcessID of the attached process |
Definition at line 91 of file ChannelRegistry.cpp.
References getProducer(), m_producer, NotFound, HashTable< K, V >::remove(), and Success.
Referenced by ChannelServer< DatastoreServer, DatastoreMessage >::readKernelEvents().
Contains registered consumer channels.
Definition at line 138 of file ChannelRegistry.h.
Referenced by getConsumer(), getConsumers(), registerConsumer(), unregisterConsumer(), and ~ChannelRegistry().
Contains registered producer channels.
Definition at line 141 of file ChannelRegistry.h.
Referenced by getProducer(), getProducers(), registerProducer(), unregisterProducer(), and ~ChannelRegistry().
1.8.17