A class that represents one content query that was received by the Content Manager.
More...
#include <content_subscription.hpp>
|
| | ContentSubscription (shared_ptr< ContentServiceConcept::Session > session, const string &contentUri, ContentQueryArgumentsSharedPtr args, ContentResultCallback callback, ContentInvalidationCallback invalidationCallback) |
| | Builds a content subscription object.
|
| |
| | 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.
|
| |
| const vector< string > & | getColumns () const |
| | Retrieve Table columns for the database projection.
|
| |
| const string & | getContentUri () const |
| | Retrieve content table in the encapsulated database.
|
| |
| shared_ptr< ContentServiceConcept::Session > | getSession () const |
| | Retrieve the session that initiated the query.
|
| |
| const string & | getUri () const |
| | Retrieve complete content URI for the content query.
|
| |
| virtual void | onChanged (ContentProvider *provider, const string &uri, bool) override |
| | See ContentProvider::Observer::onChanged.
|
| |
| virtual void | onInvalidated (ContentProvider *provider, const string &uri, int reason, int startRow, int endRow) override |
| | Callback to notify invalidation of content provider.
|
| |
| void | update (ContentProvider *provider) |
| | Asks the content subscription to update.
|
| |
| void | useDiagnosticsTrafficDataSink (DiagnosticsTrafficDataSinkSharedPtr dataSink) |
| | Configures diagnostics data sink to be used by the class.
|
| |
| virtual | ~ContentSubscription () |
| | Destructor.
|
| |
| virtual | ~Observer () |
| | Virtual destructor (for SWIG).
|
| |
A class that represents one content query that was received by the Content Manager.
◆ ContentInvalidationCallback
| typedef function<void(const string& uri, int reason, int startRow, int endRow) kanzi::connect::ContentSubscription::ContentInvalidationCallback) |
Callback function for content invalidation.
◆ ContentResultCallback
| typedef function<void(const string& uri, ContentDataSharedPtr data) kanzi::connect::ContentSubscription::ContentResultCallback) |
Callback function for content result.
◆ ContentSubscription() [1/2]
| 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.
- Parameters
-
| 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. |
◆ ContentSubscription() [2/2]
Builds a content subscription object.
- Parameters
-
| session | the session |
| args | query arguments |
| callback | for content result, invoked whenever subscription is updated. |
| invalidationCallback | Callback for content invalidation notification. |
◆ ~ContentSubscription()
| virtual kanzi::connect::ContentSubscription::~ContentSubscription |
( |
| ) |
|
|
virtual |
◆ getColumns()
| const vector< string > & kanzi::connect::ContentSubscription::getColumns |
( |
| ) |
const |
Retrieve Table columns for the database projection.
- Returns
- Table columns for the database projection.
◆ getContentUri()
| const string & kanzi::connect::ContentSubscription::getContentUri |
( |
| ) |
const |
Retrieve content table in the encapsulated database.
- Returns
- Content table in the encapsulated database.
◆ getSession()
| shared_ptr< ContentServiceConcept::Session > kanzi::connect::ContentSubscription::getSession |
( |
| ) |
const |
Retrieve the session that initiated the query.
- Returns
- Session that initiated the query.
◆ getUri()
| const string & kanzi::connect::ContentSubscription::getUri |
( |
| ) |
const |
Retrieve complete content URI for the content query.
- Returns
- Content URI for the query.
◆ onChanged()
| virtual void kanzi::connect::ContentSubscription::onChanged |
( |
ContentProvider * | provider, |
|
|
const string & | uri, |
|
|
bool | ) |
|
overridevirtual |
◆ onInvalidated()
| virtual void kanzi::connect::ContentSubscription::onInvalidated |
( |
ContentProvider * | provider, |
|
|
const string & | uri, |
|
|
int | reason, |
|
|
int | beginRow, |
|
|
int | endRow ) |
|
overridevirtual |
Callback to notify invalidation of content provider.
- Parameters
-
| 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.
◆ update()
| void kanzi::connect::ContentSubscription::update |
( |
ContentProvider * | provider | ) |
|
Asks the content subscription to update.
Causes it to re-perform the content query.
- Parameters
-
| provider | Content provider that manages data for this subscription. |
◆ useDiagnosticsTrafficDataSink()
Configures diagnostics data sink to be used by the class.
The documentation for this class was generated from the following file:
- content_service/content_subscription.hpp