A class that represents one content query that was received by the Content Manager. More...
#include <content_subscription.hpp>
Public Types | |
| typedef function< void(const string &uri, int reason, int startRow, int endRow)> | ContentInvalidationCallback |
| Callback function for content invalidation. More... | |
| typedef function< void(const string &uri, ContentDataSharedPtr data)> | ContentResultCallback |
| Callback function for content result. More... | |
Public Member Functions | |
| ContentSubscription (shared_ptr< ContentServiceConcept::Session > session, const string &uri, const string &contentUri, const vector< string > &columns, const string &filter, const string &limit, const string &sort, ContentResultCallback callback, ContentInvalidationCallback invalidationCallback) | |
| Constructor. More... | |
| ContentSubscription (shared_ptr< ContentServiceConcept::Session > session, const string &contentUri, ContentQueryArgumentsSharedPtr args, ContentResultCallback callback, ContentInvalidationCallback invalidationCallback) | |
| Builds a content subscription object. More... | |
| const vector< string > & | getColumns () const |
| Retrieve Table columns for the database projection. More... | |
| const string & | getContentUri () const |
| Retrieve content table in the encapsulated database. More... | |
| shared_ptr< ContentServiceConcept::Session > | getSession () const |
| Retrieve the session that initiated the query. More... | |
| const string & | getUri () const |
| Retrieve complete content URI for the content query. More... | |
| virtual void | onChanged (ContentProvider *provider, const string &uri, bool) KZ_OVERRIDE |
| See ContentProvider::Observer::onChanged. More... | |
| virtual void | onInvalidated (ContentProvider *provider, const string &uri, int reason, int startRow, int endRow) KZ_OVERRIDE |
| Callback to notify invalidation of content provider. More... | |
| void | update (ContentProvider *provider) |
| Asks the content subscription to update. More... | |
| void | useDiagnosticsTrafficDataSink (DiagnosticsTrafficDataSinkSharedPtr dataSink) |
| Configures diagnostics data sink to be used by the class. More... | |
| virtual | ~ContentSubscription () |
| Destructor. More... | |
Public Member Functions inherited from kanzi::connect::ContentProvider::Observer | |
| virtual | ~Observer () |
| Virtual destructor (for SWIG). More... | |
A class that represents one content query that was received by the Content Manager.
| typedef function<void(const string& uri, int reason, int startRow, int endRow)> kanzi::connect::ContentSubscription::ContentInvalidationCallback |
Callback function for content invalidation.
| typedef function<void(const string& uri, ContentDataSharedPtr data)> kanzi::connect::ContentSubscription::ContentResultCallback |
Callback function for content result.
| kanzi::connect::ContentSubscription::ContentSubscription | ( | shared_ptr< ContentServiceConcept::Session > | session, |
| const string & | uri, | ||
| const string & | contentUri, | ||
| const vector< string > & | columns, | ||
| const string & | filter, | ||
| const string & | limit, | ||
| const string & | sort, | ||
| ContentResultCallback | callback, | ||
| ContentInvalidationCallback | invalidationCallback | ||
| ) |
Constructor.
| session | Session that initiated the content query. |
| uri | Complete content URI for the query. |
| contentUri | Content table in the encapsulated database. |
| columns | Table columns for the database projection. |
| filter | 'Where' clause for filtering output rows. |
| limit | 'Limit' clause for selecting output rows. |
| sort | 'Order by' clause for sorting output rows. |
| callback | Callback for content result, invoked whenever content subscription is updated. |
| invalidationCallback | Callback for content invalidation notification. |
| kanzi::connect::ContentSubscription::ContentSubscription | ( | shared_ptr< ContentServiceConcept::Session > | session, |
| const string & | contentUri, | ||
| ContentQueryArgumentsSharedPtr | args, | ||
| ContentResultCallback | callback, | ||
| ContentInvalidationCallback | invalidationCallback | ||
| ) |
Builds a content subscription object.
| session | the session |
| args | query arguments |
| callback | for content result, invoked whenever subscription is updated. |
| invalidationCallback | Callback for content invalidation notification. |
|
virtual |
Destructor.
| const vector<string>& kanzi::connect::ContentSubscription::getColumns | ( | ) | const |
Retrieve Table columns for the database projection.
| const string& kanzi::connect::ContentSubscription::getContentUri | ( | ) | const |
Retrieve content table in the encapsulated database.
| shared_ptr<ContentServiceConcept::Session> kanzi::connect::ContentSubscription::getSession | ( | ) | const |
Retrieve the session that initiated the query.
| const string& kanzi::connect::ContentSubscription::getUri | ( | ) | const |
Retrieve complete content URI for the content query.
|
virtual |
See ContentProvider::Observer::onChanged.
Reimplemented from kanzi::connect::ContentProvider::Observer.
|
virtual |
Callback to notify invalidation of content provider.
| provider | Content provider that changed. |
| reason | the reason for invalidation. Not currently used. |
| beginRow | inclusive start row of the change. Not currently used. |
| endRow | inclusive end row of the change. Not currently used. |
Reimplemented from kanzi::connect::ContentProvider::Observer.
| void kanzi::connect::ContentSubscription::update | ( | ContentProvider * | provider | ) |
Asks the content subscription to update.
Causes it to re-perform the content query.
| provider | Content provider that manages data for this subscription. |
| void kanzi::connect::ContentSubscription::useDiagnosticsTrafficDataSink | ( | DiagnosticsTrafficDataSinkSharedPtr | dataSink | ) |
Configures diagnostics data sink to be used by the class.