Class Provider

Definition

Namespace:
Tizen.Applications.DataControl
Assembly:
Tizen.Applications.DataControl.dll
API Level:
3

Represents the Provider class for the DataControl provider application.

C#
Copy
public abstract class Provider : IDisposable
Inheritance
Provider
Implements
System.IDisposable

Constructors

View Source

Provider(String)

Initializes the Provider class with the dataID.

Declaration
C#
Copy
public Provider(string dataID)
Parameters
Type Name Description
System.String dataID

The DataControl Data ID.

Exceptions
Type Condition
System.ArgumentException

Thrown in case of an invalid parameter.

API Level: 3

Properties

View Source

DataID

Gets the data ID.

Declaration
C#
Copy
public string DataID { get; }
Property Value
Type Description
System.String
API Level: 3

Methods

View Source

Dispose()

Releases all the resources used by the Provider class.

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

Dispose(Boolean)

Releases unmanaged resources used by the Provider 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 Provider class.

Declaration
C#
Copy
protected void Finalize()
View Source

OnBulkInsert(IEnumerable<String>, BulkData)

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

Declaration
C#
Copy
protected virtual BulkInsertResult OnBulkInsert(IEnumerable<string> query, BulkData bulkInsertData)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<System.String> query
BulkData bulkInsertData
Returns
Type Description
BulkInsertResult
API Level: 3
View Source

OnDataChangeListenRequest(String)

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

Declaration
C#
Copy
protected virtual DataChangeListenResult OnDataChangeListenRequest(string requestAppID)
Parameters
Type Name Description
System.String requestAppID
Returns
Type Description
DataChangeListenResult
API Level: 3
View Source

OnDelete(String, String)

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

Declaration
C#
Copy
protected abstract DeleteResult OnDelete(string query, string where)
Parameters
Type Name Description
System.String query
System.String where
Returns
Type Description
DeleteResult
API Level: 3
View Source

OnInsert(String, Bundle)

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

Declaration
C#
Copy
protected abstract InsertResult OnInsert(string query, Bundle insertData)
Parameters
Type Name Description
System.String query
Bundle insertData
Returns
Type Description
InsertResult
API Level: 3
View Source

OnMapAdd(String, String)

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

Declaration
C#
Copy
protected virtual MapAddResult OnMapAdd(string key, string value)
Parameters
Type Name Description
System.String key
System.String value
Returns
Type Description
MapAddResult
API Level: 3
View Source

OnMapBulkAdd(BulkData)

Overrides this method if you want to handle the behavior when the bulk add request is received.

Declaration
C#
Copy
protected virtual MapBulkAddResult OnMapBulkAdd(BulkData bulkAddData)
Parameters
Type Name Description
BulkData bulkAddData
Returns
Type Description
MapBulkAddResult
API Level: 3
View Source

OnMapGet(String)

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

Declaration
C#
Copy
protected virtual MapGetResult OnMapGet(string key)
Parameters
Type Name Description
System.String key
Returns
Type Description
MapGetResult
API Level: 3
View Source

OnMapRemove(String, String)

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

Declaration
C#
Copy
protected virtual MapRemoveResult OnMapRemove(string key, string value)
Parameters
Type Name Description
System.String key
System.String value
Returns
Type Description
MapRemoveResult
API Level: 3
View Source

OnMapSet(String, String, String)

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

Declaration
C#
Copy
protected virtual MapSetResult OnMapSet(string key, string oldValue, string newValue)
Parameters
Type Name Description
System.String key
System.String oldValue
System.String newValue
Returns
Type Description
MapSetResult
API Level: 3
View Source

OnSelect(String, String, String[], Int32, String, Int32, Int32)

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

Declaration
C#
Copy
protected abstract SelectResult OnSelect(string query, string where, string[] columList, int columnCount, string order, int pageNum, int countPerPage)
Parameters
Type Name Description
System.String query
System.String where
System.String[] columList
System.Int32 columnCount
System.String order
System.Int32 pageNum
System.Int32 countPerPage
Returns
Type Description
SelectResult
API Level: 3
View Source

OnUpdate(String, String, Bundle)

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

Declaration
C#
Copy
protected abstract UpdateResult OnUpdate(string query, string where, Bundle updateData)
Parameters
Type Name Description
System.String query
System.String where
Bundle updateData
Returns
Type Description
UpdateResult
API Level: 3
View Source

Run()

Starts the Provider service.

Declaration
C#
Copy
public void Run()
Remarks

Only one Provider service can be run for each process.

Exceptions
Type Condition
UnauthorizedAccessException

Thrown in case a permission is denied.

InvalidOperationException

Thrown in case of any internal error.

API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/datasharing
View Source

SendDataChange(ChangeType, Bundle)

Sends a data change notification to consumer applications which have successfully added a data change listen.

Declaration
C#
Copy
public void SendDataChange(ChangeType type, Bundle changedData)
Parameters
Type Name Description
ChangeType type

The changed data type.

Bundle changedData

Customized information about the changed data.

Exceptions
Type Condition
System.ArgumentException

Thrown in case of an invalid parameter.

UnauthorizedAccessException

Thrown in case a permission is denied.

InvalidOperationException

Thrown in case of any internal error.

API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/datasharing
View Source

Stop()

Stops the Provider service.

Declaration
C#
Copy
public void Stop()
API Level: 3

Implements

System.IDisposable