Class Consumer
Definition
- Namespace:
- Tizen.Applications.DataControl
- Assembly:
- Tizen.Applications.DataControl.dll
- API Level:
- 3
Represents the Consumer class for the DataControl consumer application.
C#Copypublic abstract class Consumer : IDisposable
- Inheritance
-
System.ObjectConsumer
- Implements
-
System.IDisposable
Constructors
Consumer(String, String)
Initializes the Consumer class with the providerId and the ataId.
Declaration
C#Copypublic Consumer(string providerId, string dataId)
Parameters
Type | Name | Description |
---|---|---|
System.String | providerId | The DataControl Provider ID. |
System.String | dataId | The DataControl Data ID. |
Exceptions
Type | Condition |
---|---|
System.ArgumentException | Thrown in case of an invalid parmaeter. |
System.InvalidOperationException | Thrown in case of any internal error. |
API Level: 3
Methods
Declaration
C#Copypublic 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 |
---|---|
System.ArgumentException | Thrown in case of an invalid parmaeter. |
UnauthorizedAccessException | Thrown in case oif a permission is denied. |
System.ArgumentOutOfRangeException | Thrown when the message has exceeded the maximum limit (1MB). |
System.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
Declaration
C#Copypublic void DataChangeListen()
Remarks
The OnDataChangeListenResult will recieve the result of this API.
Exceptions
Type | Condition |
---|---|
UnauthorizedAccessException | Thrown in case if a permission is denied. |
System.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
Declaration
C#Copypublic void Delete(string where)
Parameters
Type | Name | Description |
---|---|---|
System.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. |
System.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
Declaration
C#Copypublic void Dispose()
API Level: 3
Dispose(Boolean)
Releases the unmanaged resources used by the Consumer class specifying whether to perform a normal dispose operation.
Declaration
C#Copyprotected virtual void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing | true for a normal dispose operation; false to finalize the handle. |
API Level: 3
Declaration
C#Copyprotected void Finalize()
Declaration
C#Copypublic 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 |
---|---|
System.ArgumentException | Thrown in case of an invalid parmaeter. |
UnauthorizedAccessException | Thrown in case if a permission is denied. |
System.ArgumentOutOfRangeException | Thrown when the message has exceeded the maximum limit (1MB). |
System.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
Declaration
C#Copypublic void MapAdd(string key, string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The key of the value to add. |
System.String | value | The value to add. |
Remarks
The OnMapAddResult will recieve the result of this API.
Exceptions
Type | Condition |
---|---|
System.ArgumentException | Thrown in case of an invalid parmaeter. |
UnauthorizedAccessException | Thrown in case of if a permission is denied. |
System.ArgumentOutOfRangeException | Thrown when the message has exceeded the maximum limit (1MB). |
System.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
Declaration
C#Copypublic 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 |
---|---|
System.ArgumentException | Thrown in case of an invalid parmaeter. |
UnauthorizedAccessException | Thrown in case if a permission is denied. |
System.ArgumentOutOfRangeException | Thrown when the message has exceeded the maximum limit (1MB). |
System.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
Declaration
C#Copypublic void MapGet(string key, int pageNumber = 1, int countPerPage = 20)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The key of the value list to obtain. |
System.Int32 | pageNumber | The page number of the value set. |
System.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 |
---|---|
System.ArgumentException | Thrown in case of an invalid parmaeter. |
UnauthorizedAccessException | Thrown in case if a permission is denied. |
System.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
Declaration
C#Copypublic void MapRemove(string key, string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The key of the value to remove. |
System.String | value | The value to remove. |
Remarks
The OnMapRemoveResult will recieve the result of this API.
Exceptions
Type | Condition |
---|---|
System.ArgumentException | Thrown in case of an invalid parmaeter. |
UnauthorizedAccessException | Thrown in case if a permission is denied. |
System.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
Declaration
C#Copypublic void MapSet(string key, string oldValue, string newValue)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The key of the value to replace. |
System.String | oldValue | The value to be replaced. |
System.String | newValue | The new value that replaces the existing value. |
Remarks
The OnMapSetResult will recieve the result of this API.
Exceptions
Type | Condition |
---|---|
System.ArgumentException | Thrown in case of an invalid parmaeter. |
UnauthorizedAccessException | Thrown in case if a permission is denied. |
System.ArgumentOutOfRangeException | Thrown when message has exceeded the maximum limit (1MB). |
System.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
OnBulkInsertResult(BulkInsertResult)
Overrides this method if you want to handle the behavior when the BulkInsert response is received.
Declaration
C#Copyprotected virtual void OnBulkInsertResult(BulkInsertResult result)
Parameters
Type | Name | Description |
---|---|---|
BulkInsertResult | result |
API Level: 3
OnDataChange(ChangeType, Bundle)
Overrides this method if you want to handle the behavior when the data change event is received.
Declaration
C#Copyprotected virtual void OnDataChange(ChangeType type, Bundle data)
Parameters
Type | Name | Description |
---|---|---|
ChangeType | type | |
Bundle | data |
API Level: 3
OnDataChangeListenResult(DataChangeListenResult)
Overrides this method if you want to handle the behavior when the DataChangeListen result is received.
Declaration
C#Copyprotected virtual void OnDataChangeListenResult(DataChangeListenResult result)
Parameters
Type | Name | Description |
---|---|---|
DataChangeListenResult | result |
API Level: 3
OnDeleteResult(DeleteResult)
Overrides this method if want to handle the behavior when the delete response is received.
Declaration
C#Copyprotected abstract void OnDeleteResult(DeleteResult result)
Parameters
Type | Name | Description |
---|---|---|
DeleteResult | result |
API Level: 3
OnInsertResult(InsertResult)
Overrides this method if you want to handle the behavior when the insert response is received.
Declaration
C#Copyprotected abstract void OnInsertResult(InsertResult result)
Parameters
Type | Name | Description |
---|---|---|
InsertResult | result |
API Level: 3
OnMapAddResult(MapAddResult)
Overrides this method if you want to handle the behavior when the map add response is received.
Declaration
C#Copyprotected virtual void OnMapAddResult(MapAddResult result)
Parameters
Type | Name | Description |
---|---|---|
MapAddResult | result |
API Level: 3
OnMapBulkAddResult(MapBulkAddResult)
Overrides this method if you want to handle the behavior when the BulkAdd response is received.
Declaration
C#Copyprotected virtual void OnMapBulkAddResult(MapBulkAddResult result)
Parameters
Type | Name | Description |
---|---|---|
MapBulkAddResult | result |
API Level: 3
OnMapGetResult(MapGetResult)
Overrides this method if you want to handle the behavior when the map get response is received.
Declaration
C#Copyprotected virtual void OnMapGetResult(MapGetResult result)
Parameters
Type | Name | Description |
---|---|---|
MapGetResult | result |
API Level: 3
OnMapRemoveResult(MapRemoveResult)
Overrides this method if you want to handle the behavior when the map remove response is received.
Declaration
C#Copyprotected virtual void OnMapRemoveResult(MapRemoveResult result)
Parameters
Type | Name | Description |
---|---|---|
MapRemoveResult | result |
API Level: 3
OnMapSetResult(MapSetResult)
Overrides this method if you want to handle the behavior when the map set response is received.
Declaration
C#Copyprotected virtual void OnMapSetResult(MapSetResult result)
Parameters
Type | Name | Description |
---|---|---|
MapSetResult | result |
API Level: 3
OnSelectResult(SelectResult)
Overrides this method if you want to handle the behavior when the select response is received.
Declaration
C#Copyprotected abstract void OnSelectResult(SelectResult result)
Parameters
Type | Name | Description |
---|---|---|
SelectResult | result |
API Level: 3
OnUpdateResult(UpdateResult)
Overrides this method if you want to handle the behavior when the update response is received.
Declaration
C#Copyprotected abstract void OnUpdateResult(UpdateResult result)
Parameters
Type | Name | Description |
---|---|---|
UpdateResult | result |
API Level: 3
Select(String[], String, String, Int32, Int32)
Sends the select request to the provider application.
Declaration
C#Copypublic void Select(string[] columnList, string where, string order, int pageNumber = 1, int countPerPage = 20)
Parameters
Type | Name | Description |
---|---|---|
System.String[] | columnList | Select the target column list. |
System.String | where | The Where statement for the select query. |
System.String | order | The Order statement for the select query. |
System.Int32 | pageNumber | Select the target page number. |
System.Int32 | countPerPage | Select the row count per page. |
Remarks
The OnSelectResult will recieve the result of this API.
Exceptions
Type | Condition |
---|---|
System.ArgumentException | Thrown in case of an invalid parmaeter. |
UnauthorizedAccessException | Thrown in case if a permission is denied.. |
System.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
Declaration
C#Copypublic void Update(Bundle updateData, string where)
Parameters
Type | Name | Description |
---|---|---|
Bundle | updateData | The update data. |
System.String | where | The Where statement for the query. |
Remarks
The OnUpdateResult will recieve result of this API.
Exceptions
Type | Condition |
---|---|
System.ArgumentException | Thrown in case of an invalid parmaeter. |
UnauthorizedAccessException | Thrown in case if a permission is denied. |
System.ArgumentOutOfRangeException | Thrown when the message has exceeded the maximum limit (1MB). |
System.InvalidOperationException | Thrown in case of any internal error. |