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#
Copy
public abstract class Consumer : IDisposable
Inheritance
System.Object
Consumer
Implements
System.IDisposable

Constructors

View Source

Consumer(String, String)

Initializes the Consumer class with the providerId and the ataId.

Declaration
C#
Copy
public 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

View Source

BulkInsert(BulkData)

Sends the bulk insert request to the provider application.

Declaration
C#
Copy
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
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
View Source

DataChangeListen()

Listens the DataChange event.

Declaration
C#
Copy
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.

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
View Source

Delete(String)

Sends the delete request to the provider application.

Declaration
C#
Copy
public 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
View Source

Dispose()

Releases all resources used by the Consumer class.

Declaration
C#
Copy
public void Dispose()
API Level: 3
View Source

Dispose(Boolean)

Releases the unmanaged resources used by the Consumer class specifying whether to perform a normal dispose operation.

Declaration
C#
Copy
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 Source

Finalize()

Destructor of the Consumer class.

Declaration
C#
Copy
protected void Finalize()
View Source

Insert(Bundle)

Sends the insert request to the provider application.

Declaration
C#
Copy
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
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
View Source

MapAdd(String, String)

Sends the map add request to the provider application.

Declaration
C#
Copy
public 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
View Source

MapBulkAdd(BulkData)

Sends the map bulk add request to the provider application.

Declaration
C#
Copy
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
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
View Source

MapGet(String, Int32, Int32)

Sends the map get request to the provider application.

Declaration
C#
Copy
public 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.

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
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
View Source

MapRemove(String, String)

Sends the map remove request to the provider application.

Declaration
C#
Copy
public 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
View Source

MapSet(String, String, String)

Sends the map set request to the provider application.

Declaration
C#
Copy
public 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
View Source

OnBulkInsertResult(BulkInsertResult)

Overrides this method if you want to handle the behavior when the BulkInsert response is received.

Declaration
C#
Copy
protected virtual void OnBulkInsertResult(BulkInsertResult result)
Parameters
Type Name Description
BulkInsertResult result
API Level: 3
View Source

OnDataChange(ChangeType, Bundle)

Overrides this method if you want to handle the behavior when the data change event is received.

Declaration
C#
Copy
protected virtual void OnDataChange(ChangeType type, Bundle data)
Parameters
Type Name Description
ChangeType type
Bundle data
API Level: 3
View Source

OnDataChangeListenResult(DataChangeListenResult)

Overrides this method if you want to handle the behavior when the DataChangeListen result is received.

Declaration
C#
Copy
protected virtual void OnDataChangeListenResult(DataChangeListenResult result)
Parameters
Type Name Description
DataChangeListenResult result
API Level: 3
View Source

OnDeleteResult(DeleteResult)

Overrides this method if want to handle the behavior when the delete response is received.

Declaration
C#
Copy
protected abstract void OnDeleteResult(DeleteResult result)
Parameters
Type Name Description
DeleteResult result
API Level: 3
View Source

OnInsertResult(InsertResult)

Overrides this method if you want to handle the behavior when the insert response is received.

Declaration
C#
Copy
protected abstract void OnInsertResult(InsertResult result)
Parameters
Type Name Description
InsertResult result
API Level: 3
View Source

OnMapAddResult(MapAddResult)

Overrides this method if you want to handle the behavior when the map add response is received.

Declaration
C#
Copy
protected virtual void OnMapAddResult(MapAddResult result)
Parameters
Type Name Description
MapAddResult result
API Level: 3
View Source

OnMapBulkAddResult(MapBulkAddResult)

Overrides this method if you want to handle the behavior when the BulkAdd response is received.

Declaration
C#
Copy
protected virtual void OnMapBulkAddResult(MapBulkAddResult result)
Parameters
Type Name Description
MapBulkAddResult result
API Level: 3
View Source

OnMapGetResult(MapGetResult)

Overrides this method if you want to handle the behavior when the map get response is received.

Declaration
C#
Copy
protected virtual void OnMapGetResult(MapGetResult result)
Parameters
Type Name Description
MapGetResult result
API Level: 3
View Source

OnMapRemoveResult(MapRemoveResult)

Overrides this method if you want to handle the behavior when the map remove response is received.

Declaration
C#
Copy
protected virtual void OnMapRemoveResult(MapRemoveResult result)
Parameters
Type Name Description
MapRemoveResult result
API Level: 3
View Source

OnMapSetResult(MapSetResult)

Overrides this method if you want to handle the behavior when the map set response is received.

Declaration
C#
Copy
protected virtual void OnMapSetResult(MapSetResult result)
Parameters
Type Name Description
MapSetResult result
API Level: 3
View Source

OnSelectResult(SelectResult)

Overrides this method if you want to handle the behavior when the select response is received.

Declaration
C#
Copy
protected abstract void OnSelectResult(SelectResult result)
Parameters
Type Name Description
SelectResult result
API Level: 3
View Source

OnUpdateResult(UpdateResult)

Overrides this method if you want to handle the behavior when the update response is received.

Declaration
C#
Copy
protected abstract void OnUpdateResult(UpdateResult result)
Parameters
Type Name Description
UpdateResult result
API Level: 3
View Source

Select(String[], String, String, Int32, Int32)

Sends the select request to the provider application.

Declaration
C#
Copy
public 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.

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
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
View Source

Update(Bundle, String)

Sends the update request to the provider application.

Declaration
C#
Copy
public 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.

API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/datasharinghttp://tizen.org/privilege/appmanager.launch

Implements

System.IDisposable