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.
-
~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.
- Return
The beginning of the container.
-
ContentProviderContainer::const_iterator
endProviders
() const¶ Allows to iterate all contained providers.
- Return
The end of the container.
-
size_t
getSubProviderCount
() override¶ - See
ContentProvider::getSubProviderCount
-
ContentProviderDescriptionSharedPtr
getSubProviderDescription
(size_t index) override¶ - See
ContentProvider::getSubProviderDescription
- 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>