KanziConnectDataSource¶
-
class
kanzi::connect
::
KanziConnectDataSource
: public AbstractConnectDataSource¶ A class that implements data source that is able to load content from Kanzi Connect server.
The class can be configured with XML file, that describes the data tree and source tables and columns in the database.
See example of data.xml file below.
<root> <source uri="service://com.rightware.service_name/content_path" name="data_object_name"> <field column="column_name" type="int" name="data_object_name"/> </source> <source uri="service://com.rightware.service_name" name="data_object_name"> <field column="column_name" type="int" name="data_object_name"/> </source> <source uri="content://com.rightware.content/contacts" name="contacts"> <field column="contact_id" type="int" name="id"/> <field column="contact_firstname" type="string" name="firstname"/> <field column="contact_lastname" type="string" name="lastname"/> <field column="contact_phone" type="string" name="phone"/> </source> <source uri="service://com.rightware.media" name="media_state"> <field column="current_track_id" type="int" name="current_track"/> </source> </root>
Public Static Functions
-
static KanziConnectDataSourceSharedPtr
create
(Domain *domain, string_view name)¶ Creates new instance of Kanzi Connect DataSource.
- Parameters
domain – UI domain.
name – Name of the new data source.
- Returns
New data source instance.
-
static void
takeDataSnapshot
(Domain *domain, const string &uri, string &schema, string &data)¶ Takes data snapshot as XML document.
- Parameters
domain – UI domain where to operate
uri – the URI for the datasource object to snapshot. E.g. kzb://ivi/Data Sources/ConnectServices
schema – on return holds the data configuration file
data – on return holds a snapshot of current data.
-
static KanziConnectDataSourceSharedPtr