Class Consumer
Definition
- Namespace:
- Tizen.Applications.DataControl
- Assembly:
- Tizen.Applications.DataControl.dll
- API Level:
- 3
Represents the Consumer class for the DataControl consumer application.
public abstract class Consumer : IDisposable
- Inheritance
-
Consumer
- Implements
Constructors
View SourceConsumer(String, String)
Initializes the Consumer class with the providerId and the ataId.
Declaration
public Consumer(string providerId, string dataId)
Parameters
Type | Name | Description |
---|---|---|
String | providerId | The DataControl Provider ID. |
String | dataId | The DataControl Data ID. |
Exceptions
Type | Condition |
---|---|
ArgumentException | Thrown in case of an invalid parmaeter. |
InvalidOperationException | Thrown in case of any internal error. |
API Level: 3
Methods
View SourceBulkInsert(BulkData)
Sends the bulk insert request to the provider application.
Declaration
public void BulkInsert(BulkData insertData)
Parameters
Type | Name | Description |
---|---|---|
BulkData | insertData | The bulk insert data. |
Remarks
The OnBulkInsertResult will recieve the result of this API.
Exceptions
Type | Condition |
---|---|
ArgumentException | Thrown in case of an invalid parmaeter. |
UnauthorizedAccessException | Thrown in case oif a permission is denied. |
ArgumentOutOfRangeException | Thrown when the message has exceeded the maximum limit (1MB). |
InvalidOperationException | Thrown in case of any internal error. |
API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/datasharinghttp://tizen.org/privilege/appmanager.launch
View SourceDataChangeListen()
Listens the DataChange event.
Declaration
public void DataChangeListen()
Remarks
The OnDataChangeListenResult will recieve the result of this API.
Exceptions
Type | Condition |
---|---|
UnauthorizedAccessException | Thrown in case if a permission is denied. |
InvalidOperationException | Thrown in case of any internal error. |
API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/datasharinghttp://tizen.org/privilege/appmanager.launch
View SourceDelete(String)
Sends the delete request to the provider application.
Declaration
public void Delete(string where)
Parameters
Type | Name | Description |
---|---|---|
String | where | The Where statement for the delete query. |
Remarks
The OnDeleteResult will recieve the result of this API
Exceptions
Type | Condition |
---|---|
UnauthorizedAccessException | Thrown in case if a permission is denied. |
InvalidOperationException | Thrown in case of any internal error. |
API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/datasharinghttp://tizen.org/privilege/appmanager.launch
View SourceDispose()
Releases all resources used by the Consumer class.
Declaration
public void Dispose()
API Level: 3
View SourceDispose(Boolean)
Releases the unmanaged resources used by the Consumer class specifying whether to perform a normal dispose operation.
Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
Boolean | disposing | true for a normal dispose operation; false to finalize the handle. |
API Level: 3
View SourceFinalize()
Destructor of the Consumer class.
Declaration
protected void Finalize()
Insert(Bundle)
Sends the insert request to the provider application.
Declaration
public void Insert(Bundle insertData)
Parameters
Type | Name | Description |
---|---|---|
Bundle | insertData | The insert data. |
Remarks
The OnInsertResult will recieve the result of this API.
Exceptions
Type | Condition |
---|---|
ArgumentException | Thrown in case of an invalid parmaeter. |
UnauthorizedAccessException | Thrown in case if a permission is denied. |
ArgumentOutOfRangeException | Thrown when the message has exceeded the maximum limit (1MB). |
InvalidOperationException | Thrown in case of any internal error. |
API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/datasharinghttp://tizen.org/privilege/appmanager.launch
View SourceMapAdd(String, String)
Sends the map add request to the provider application.
Declaration
public void MapAdd(string key, string value)
Parameters
Type | Name | Description |
---|---|---|
String | key | The key of the value to add. |
String | value | The value to add. |
Remarks
The OnMapAddResult will recieve the result of this API.
Exceptions
Type | Condition |
---|---|
ArgumentException | Thrown in case of an invalid parmaeter. |
UnauthorizedAccessException | Thrown in case of if a permission is denied. |
ArgumentOutOfRangeException | Thrown when the message has exceeded the maximum limit (1MB). |
InvalidOperationException | Thrown in case of any internal error. |
API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/datasharinghttp://tizen.org/privilege/appmanager.launch
View SourceMapBulkAdd(BulkData)
Sends the map bulk add request to the provider application.
Declaration
public void MapBulkAdd(BulkData addData)
Parameters
Type | Name | Description |
---|---|---|
BulkData | addData | The map bulk add data. |
Remarks
The OnMapBulkAddResult will recieve the result of this API.
Exceptions
Type | Condition |
---|---|
ArgumentException | Thrown in case of an invalid parmaeter. |
UnauthorizedAccessException | Thrown in case if a permission is denied. |
ArgumentOutOfRangeException | Thrown when the message has exceeded the maximum limit (1MB). |
InvalidOperationException | Thrown in case of any internal error. |
API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/datasharinghttp://tizen.org/privilege/appmanager.launch
View SourceMapGet(String, Int32, Int32)
Sends the map get request to the provider application.
Declaration
public void MapGet(string key, int pageNumber = 1, int countPerPage = 20)
Parameters
Type | Name | Description |
---|---|---|
String | key | The key of the value list to obtain. |
Int32 | pageNumber | The page number of the value set. |
Int32 | countPerPage | The desired maximum count of the data items per page. |
Remarks
The OnMapGetResult will recieve the result of this API.
Exceptions
Type | Condition |
---|---|
ArgumentException | Thrown in case of an invalid parmaeter. |
UnauthorizedAccessException | Thrown in case if a permission is denied. |
InvalidOperationException | Thrown in case of any internal error. |
API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/datasharinghttp://tizen.org/privilege/appmanager.launch
View SourceMapRemove(String, String)
Sends the map remove request to the provider application.
Declaration
public void MapRemove(string key, string value)
Parameters
Type | Name | Description |
---|---|---|
String | key | The key of the value to remove. |
String | value | The value to remove. |
Remarks
The OnMapRemoveResult will recieve the result of this API.
Exceptions
Type | Condition |
---|---|
ArgumentException | Thrown in case of an invalid parmaeter. |
UnauthorizedAccessException | Thrown in case if a permission is denied. |
InvalidOperationException | Thrown in case of any internal error. |
API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/datasharinghttp://tizen.org/privilege/appmanager.launch
View SourceMapSet(String, String, String)
Sends the map set request to the provider application.
Declaration
public void MapSet(string key, string oldValue, string newValue)
Parameters
Type | Name | Description |
---|---|---|
String | key | The key of the value to replace. |
String | oldValue | The value to be replaced. |
String | newValue | The new value that replaces the existing value. |
Remarks
The OnMapSetResult will recieve the result of this API.
Exceptions
Type | Condition |
---|---|
ArgumentException | Thrown in case of an invalid parmaeter. |
UnauthorizedAccessException | Thrown in case if a permission is denied. |
ArgumentOutOfRangeException | Thrown when message has exceeded the maximum limit (1MB). |
InvalidOperationException | Thrown in case of any internal error. |
API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/datasharinghttp://tizen.org/privilege/appmanager.launch
View SourceOnBulkInsertResult(BulkInsertResult)
Overrides this method if you want to handle the behavior when the BulkInsert response is received.
Declaration
protected virtual void OnBulkInsertResult(BulkInsertResult result)
Parameters
Type | Name | Description |
---|---|---|
BulkInsertResult | result |
API Level: 3
View SourceOnDataChange(ChangeType, Bundle)
Overrides this method if you want to handle the behavior when the data change event is received.
Declaration
protected virtual void OnDataChange(ChangeType type, Bundle data)
Parameters
Type | Name | Description |
---|---|---|
ChangeType | type | |
Bundle | data |
API Level: 3
View SourceOnDataChangeListenResult(DataChangeListenResult)
Overrides this method if you want to handle the behavior when the DataChangeListen result is received.
Declaration
protected virtual void OnDataChangeListenResult(DataChangeListenResult result)
Parameters
Type | Name | Description |
---|---|---|
DataChangeListenResult | result |
API Level: 3
View SourceOnDeleteResult(DeleteResult)
Overrides this method if want to handle the behavior when the delete response is received.
Declaration
protected abstract void OnDeleteResult(DeleteResult result)
Parameters
Type | Name | Description |
---|---|---|
DeleteResult | result |
API Level: 3
View SourceOnInsertResult(InsertResult)
Overrides this method if you want to handle the behavior when the insert response is received.
Declaration
protected abstract void OnInsertResult(InsertResult result)
Parameters
Type | Name | Description |
---|---|---|
InsertResult | result |
API Level: 3
View SourceOnMapAddResult(MapAddResult)
Overrides this method if you want to handle the behavior when the map add response is received.
Declaration
protected virtual void OnMapAddResult(MapAddResult result)
Parameters
Type | Name | Description |
---|---|---|
MapAddResult | result |
API Level: 3
View SourceOnMapBulkAddResult(MapBulkAddResult)
Overrides this method if you want to handle the behavior when the BulkAdd response is received.
Declaration
protected virtual void OnMapBulkAddResult(MapBulkAddResult result)
Parameters
Type | Name | Description |
---|---|---|
MapBulkAddResult | result |
API Level: 3
View SourceOnMapGetResult(MapGetResult)
Overrides this method if you want to handle the behavior when the map get response is received.
Declaration
protected virtual void OnMapGetResult(MapGetResult result)
Parameters
Type | Name | Description |
---|---|---|
MapGetResult | result |
API Level: 3
View SourceOnMapRemoveResult(MapRemoveResult)
Overrides this method if you want to handle the behavior when the map remove response is received.
Declaration
protected virtual void OnMapRemoveResult(MapRemoveResult result)
Parameters
Type | Name | Description |
---|---|---|
MapRemoveResult | result |
API Level: 3
View SourceOnMapSetResult(MapSetResult)
Overrides this method if you want to handle the behavior when the map set response is received.
Declaration
protected virtual void OnMapSetResult(MapSetResult result)
Parameters
Type | Name | Description |
---|---|---|
MapSetResult | result |
API Level: 3
View SourceOnSelectResult(SelectResult)
Overrides this method if you want to handle the behavior when the select response is received.
Declaration
protected abstract void OnSelectResult(SelectResult result)
Parameters
Type | Name | Description |
---|---|---|
SelectResult | result |
API Level: 3
View SourceOnUpdateResult(UpdateResult)
Overrides this method if you want to handle the behavior when the update response is received.
Declaration
protected abstract void OnUpdateResult(UpdateResult result)
Parameters
Type | Name | Description |
---|---|---|
UpdateResult | result |
API Level: 3
View SourceSelect(String[], String, String, Int32, Int32)
Sends the select request to the provider application.
Declaration
public void Select(string[] columnList, string where, string order, int pageNumber = 1, int countPerPage = 20)
Parameters
Type | Name | Description |
---|---|---|
String[] | columnList | Select the target column list. |
String | where | The Where statement for the select query. |
String | order | The Order statement for the select query. |
Int32 | pageNumber | Select the target page number. |
Int32 | countPerPage | Select the row count per page. |
Remarks
The OnSelectResult will recieve the result of this API.
Exceptions
Type | Condition |
---|---|
ArgumentException | Thrown in case of an invalid parmaeter. |
UnauthorizedAccessException | Thrown in case if a permission is denied.. |
InvalidOperationException | Thrown in case of any internal error. |
API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/datasharinghttp://tizen.org/privilege/appmanager.launch
View SourceUpdate(Bundle, String)
Sends the update request to the provider application.
Declaration
public void Update(Bundle updateData, string where)
Parameters
Type | Name | Description |
---|---|---|
Bundle | updateData | The update data. |
String | where | The Where statement for the query. |
Remarks
The OnUpdateResult will recieve result of this API.
Exceptions
Type | Condition |
---|---|
ArgumentException | Thrown in case of an invalid parmaeter. |
UnauthorizedAccessException | Thrown in case if a permission is denied. |
ArgumentOutOfRangeException | Thrown when the message has exceeded the maximum limit (1MB). |
InvalidOperationException | Thrown in case of any internal error. |