#include <boardcache.h>
Inheritance diagram for TPProto::BoardCache:

Public Member Functions | |
| BoardCache () | |
| Default Constructor. | |
| virtual | ~BoardCache () |
| Destructor. | |
| void | update () |
| Updates the cache. In BoardCache, we also see what our board's Id is, so we can direct people to it. | |
| void | requestBoard (uint32_t bid, const BoardCallback &cb) |
| Gets an Board from the cache. | |
| boost::signals::connection | watchBoard (uint32_t bid, const BoardCallback &cb) |
| Watch for changes to a Board in the cache. | |
| void | invalidateBoard (uint32_t bid) |
| Set an Board Id as invalid and mark to be refetched. | |
| void | requestBoardIds (const IdSetCallback &cb) |
| Gets a set of all Board Ids. Returned via IdSetCallback. | |
| boost::signals::connection | watchBoardIds (const IdSetCallback &cb) |
| virtual GetIdSequence * | createGetIdSequenceFrame () |
| Create a GetIdsSequence subclass frame for the CacheMethod to use. Must return the correct type of frame for this Cache. | |
| virtual GetById * | createGetByIdFrame () |
| Create a GetById subclass frame for the CacheMethod to use. Must return the correct type of frame for this Cache. | |
| virtual uint32_t | getIdFromFrame (Frame *frame) |
| Get the Id from the Frame provided. The Frame is of the correct type. For example, for the Object cache, the Frame will be an Object. | |
| virtual uint64_t | getModTimeFromFrame (Frame *frame) |
| Get the Modification time from the Frame provided. The Frame is of the correct type. For example, for the Object cache, the Frame will be an Object. | |
| virtual void | newItem (boost::shared_ptr< Frame > item) |
| Receive a new or updated version of an item from the CacheMethod. | |
| virtual void | existingItem (boost::shared_ptr< Frame > item) |
| Receive an existing item from the CacheMethod. | |
| void TPProto::BoardCache::requestBoard | ( | uint32_t | bid, | |
| const BoardCallback & | cb | |||
| ) |
| boost::signals::connection TPProto::BoardCache::watchBoard | ( | uint32_t | bid, | |
| const BoardCallback & | cb | |||
| ) |
Watch for changes to a Board in the cache.
The first time the board is change (or arrives for the first time) it is possible that two copies of the same board are delievered.
Also, do not watch the personal board using id 0, as this will fail (badly).
| void TPProto::BoardCache::invalidateBoard | ( | uint32_t | bid | ) |
| uint32_t TPProto::BoardCache::getIdFromFrame | ( | Frame * | frame | ) | [virtual] |
| uint64_t TPProto::BoardCache::getModTimeFromFrame | ( | Frame * | frame | ) | [virtual] |
| void TPProto::BoardCache::newItem | ( | boost::shared_ptr< Frame > | item | ) | [virtual] |
Receive a new or updated version of an item from the CacheMethod.
| item | The existing item in a Frame |
Implements TPProto::Cache.
| void TPProto::BoardCache::existingItem | ( | boost::shared_ptr< Frame > | item | ) | [virtual] |
Receive an existing item from the CacheMethod.
| item | The existing item in a Frame |
Implements TPProto::Cache.
1.5.1