ContentProviderCollection¶
-
class
kanzi::connect
::
ContentProviderCollection
: public ContentProvider, private ContentProvider::Observer¶ A content provider type, that hosts other Content Providers.
Makes it possible to attach / detach content providers in to content database. Whenever this class receives a query, it automatically propagates it to all contained Content Providers and merges their results as one.
Public Types
-
typedef vector<ContentProviderSharedPtr>
ContentProviderContainer
¶ Container for content providers. Used to store child providers.
Public Functions
Constructor.
-
virtual
~ContentProviderCollection
()¶
Adds content provider to collection.
- Parameters
provider – Content provider to add.
invalidate – If true, invalidates the whole collection. If false, does nothing.
-
ContentProviderContainer::const_iterator
beginProviders
() const¶ Allows to iterate all contained providers.
- Returns
The beginning of the container.
-
ContentProviderContainer::const_iterator
endProviders
() const¶ Allows to iterate all contained providers.
- Returns
The end of the container.
-
virtual size_t getSubProviderCount () KZ_OVERRIDE
- See
ContentProvider::getSubProviderCount
-
virtual ContentProviderDescriptionSharedPtr getSubProviderDescription (size_t index) KZ_OVERRIDE
- See
ContentProvider::getSubProviderDescription
-
virtual void query (ContentQueryArgumentsSharedPtr args, ContentQuerySharedPtr contentQuery) KZ_OVERRIDE
- See
ContentProvider::query
Removes content provider from this collection.
- Parameters
provider – Content provider to remove.
invalidate – If true, invalidates the whole collection. If false, does nothing.
-
typedef vector<ContentProviderSharedPtr>