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#Copypublic abstract class Provider : IDisposable
- Inheritance
-
System.ObjectProvider
- Implements
-
System.IDisposable
Constructors
Declaration
C#Copypublic 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
Declaration
C#Copypublic string CurrentClientAppId { get; }
Property Value
Type | Description |
---|---|
System.String |
API Level: 6
Declaration
C#Copypublic string CurrentProviderId { get; }
Property Value
Type | Description |
---|---|
System.String |
API Level: 6
Declaration
C#Copypublic string DataID { get; }
Property Value
Type | Description |
---|---|
System.String |
API Level: 3
Methods
Declaration
C#Copypublic void Dispose()
API Level: 3
Dispose(Boolean)
Releases unmanaged resources used by the Provider class specifying whether to perform a normal dispose operation.
Declaration
C#Copyprotected 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
Declaration
C#Copyprotected void Finalize()
OnBulkInsert(IEnumerable<String>, BulkData)
Overrides this method if you want to handle the behavior when the bulk insert request is received.
Declaration
C#Copyprotected virtual BulkInsertResult OnBulkInsert(IEnumerable<string> query, BulkData bulkInsertData)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.String> | query | The insert query list. |
BulkData | bulkInsertData | The bulk insert data. |
Returns
Type | Description |
---|---|
BulkInsertResult | The result of bulk insert operation. |
API Level: 3
OnDataChangeListenRequest(String)
Overrides this method if you want to handle the behavior when the data change listen request is received.
Declaration
C#Copyprotected virtual DataChangeListenResult OnDataChangeListenRequest(string requestAppID)
Parameters
Type | Name | Description |
---|---|---|
System.String | requestAppID | The app ID sent data change listen request. |
Returns
Type | Description |
---|---|
DataChangeListenResult | The result of data change listen operation. |
API Level: 3
OnDelete(String, String)
Overrides this method if you want to handle the behavior when the delete request is received.
Declaration
C#Copyprotected abstract DeleteResult OnDelete(string query, string where)
Parameters
Type | Name | Description |
---|---|---|
System.String | query | The delete query. |
System.String | where | The where statement. |
Returns
Type | Description |
---|---|
DeleteResult | The result of delete operation. |
API Level: 3
OnInsert(String, Bundle)
Overrides this method if you want to handle the behavior when the insert request is received.
Declaration
C#Copyprotected abstract InsertResult OnInsert(string query, Bundle insertData)
Parameters
Type | Name | Description |
---|---|---|
System.String | query | The select query. |
Bundle | insertData | The insert data. |
Returns
Type | Description |
---|---|
InsertResult | The result of insert operation. |
API Level: 3
OnMapAdd(String, String)
Overrides this method if you want to handle the behavior when the map add request is received.
Declaration
C#Copyprotected virtual MapAddResult OnMapAdd(string key, string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The key of added data. |
System.String | value | The value of added data. |
Returns
Type | Description |
---|---|
MapAddResult | The result of add operation. |
API Level: 3
OnMapBulkAdd(BulkData)
Overrides this method if you want to handle the behavior when the bulk add request is received.
Declaration
C#Copyprotected virtual MapBulkAddResult OnMapBulkAdd(BulkData bulkAddData)
Parameters
Type | Name | Description |
---|---|---|
BulkData | bulkAddData | The bulk add data. |
Returns
Type | Description |
---|---|
MapBulkAddResult | The result of bulk add operation. |
API Level: 3
OnMapGet(String)
Overrides this method if you want to handle the behavior when the map get request is received.
Declaration
C#Copyprotected virtual MapGetResult OnMapGet(string key)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The key of requested data. |
Returns
Type | Description |
---|---|
MapGetResult | The result of get operation. |
API Level: 3
OnMapRemove(String, String)
Overrides this method if you want to handle the behavior when the delete request is received.
Declaration
C#Copyprotected virtual MapRemoveResult OnMapRemove(string key, string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The key of removed data. |
System.String | value | The value of removed data. |
Returns
Type | Description |
---|---|
MapRemoveResult | The result of remove operation. |
API Level: 3
OnMapSet(String, String, String)
Overrides this method if you want to handle the behavior when the update request is received.
Declaration
C#Copyprotected virtual MapSetResult OnMapSet(string key, string oldValue, string newValue)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The key of set data. |
System.String | oldValue | The old value of set data. |
System.String | newValue | The new value. |
Returns
Type | Description |
---|---|
MapSetResult | The result of set operation. |
API Level: 3
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#Copyprotected abstract SelectResult OnSelect(string query, string where, string[] columList, int columnCount, string order, int pageNum, int countPerPage)
Parameters
Type | Name | Description |
---|---|---|
System.String | query | The select query. |
System.String | where | The where statement. |
System.String[] | columList | The requested column list. |
Int32 | columnCount | The requested column count. |
System.String | order | The select order. |
Int32 | pageNum | The page number. |
Int32 | countPerPage | The count per page. |
Returns
Type | Description |
---|---|
SelectResult | The result of select operation. |
API Level: 3
OnUpdate(String, String, Bundle)
Overrides this method if you want to handle the behavior when the update request is received.
Declaration
C#Copyprotected abstract UpdateResult OnUpdate(string query, string where, Bundle updateData)
Parameters
Type | Name | Description |
---|---|---|
System.String | query | The update query. |
System.String | where | The where statement. |
Bundle | updateData | The update data. |
Returns
Type | Description |
---|---|
UpdateResult | The result of update operation. |
API Level: 3
Declaration
C#Copypublic void Run()
Remarks
Only one Provider service can be run for each process.
Exceptions
Type | Condition |
---|---|
UnauthorizedAccessException | Thrown in case a permission is denied. |
System.InvalidOperationException | Thrown in case of any internal error. |
API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/datasharing
SendDataChange(ChangeType, Bundle)
Sends a data change notification to consumer applications which have successfully added a data change listen.
Declaration
C#Copypublic 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. |
System.InvalidOperationException | Thrown in case of any internal error. |
API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/datasharing
Declaration
C#Copypublic void Stop()