Tizen Native API  3.0
Service Plugin (Deprecated)

The Service Plugin (Deprecated) API provides functions to manage the plugin set's property and state.

Required Header

#include <service_adaptor_client.h>

Overview

The service_plugin_h can gets using Service Adaptor (Deprecated) API.
It means kind of plugin set, the APIs can set property for using service and handling service plugin.

API Description
Storage (Deprecated) Provide functions for access and manage storage service


Functions

int service_plugin_destroy (service_plugin_h plugin) TIZEN_DEPRECATED_API
 Destroy Service Adaptor.
int service_plugin_add_property (service_plugin_h plugin, const char *key, const char *value) TIZEN_DEPRECATED_API
 Add Plugin Property.
int service_plugin_remove_property (service_plugin_h plugin, const char *key) TIZEN_DEPRECATED_API
 Remove Plugin Property.
int service_plugin_get_property (service_plugin_h plugin, const char *key, char **value) TIZEN_DEPRECATED_API
 Gets Plugin Property.
int service_plugin_start (service_plugin_h plugin, int service_mask) TIZEN_DEPRECATED_API
 Requests start initalization for service plugin.
int service_plugin_stop (service_plugin_h plugin) TIZEN_DEPRECATED_API
 Requests stop manually for service plugin.

Typedefs

typedef struct _service_plugin_s * service_plugin_h
 The Plugn handle for Service Adaptor.

Defines

#define SERVICE_PLUGIN_PROPERTY_APP_KEY   "http://tizen.org/service-adaptor/plugin/property/app_key"
 Definition for the service_plugin property: The application id be issued from service provider for 3rd party developer.
#define SERVICE_PLUGIN_PROPERTY_APP_SECRET   "http://tizen.org/service-adaptor/plugin/property/app_secret"
 Definition for the service_plugin property: The application password be issued from service provider for 3rd party developer.
#define SERVICE_PLUGIN_PROPERTY_USER_ID   "http://tizen.org/service-adaptor/plugin/property/user_id"
 Definition for the service_plugin property: The user id for using specific service.

Define Documentation

#define SERVICE_PLUGIN_PROPERTY_APP_KEY   "http://tizen.org/service-adaptor/plugin/property/app_key"

Definition for the service_plugin property: The application id be issued from service provider for 3rd party developer.

Deprecated:
Deprecated since 3.0
Since :
2.4
See also:
service_plugin_add_property()
service_plugin_remove_property()
service_plugin_get_property()
#define SERVICE_PLUGIN_PROPERTY_APP_SECRET   "http://tizen.org/service-adaptor/plugin/property/app_secret"

Definition for the service_plugin property: The application password be issued from service provider for 3rd party developer.

Deprecated:
Deprecated since 3.0
Since :
2.4
See also:
service_plugin_add_property()
service_plugin_remove_property()
service_plugin_get_property()
#define SERVICE_PLUGIN_PROPERTY_USER_ID   "http://tizen.org/service-adaptor/plugin/property/user_id"

Definition for the service_plugin property: The user id for using specific service.

Deprecated:
Deprecated since 3.0
Since :
2.4
See also:
service_plugin_add_property()
service_plugin_remove_property()
service_plugin_get_property()

Typedef Documentation

typedef struct _service_plugin_s* service_plugin_h

The Plugn handle for Service Adaptor.

Deprecated:
Deprecated since 3.0

The handle can be created by service_adaptor_create_plugin()
When a handle is no longer needed, use service_plugin_destroy()

See also:
service_adaptor_create_plugin()
service_plugin_destroy()

Enumeration Type Documentation

Type of service in plugin.

Deprecated:
Deprecated since 3.0
Enumerator:
SERVICE_PLUGIN_SERVICE_AUTH 

Auth service type flag

SERVICE_PLUGIN_SERVICE_STORAGE 

Storage service type flag


Function Documentation

int service_plugin_add_property ( service_plugin_h  plugin,
const char *  key,
const char *  value 
)

Add Plugin Property.

Deprecated:
Deprecated since 3.0

The plguin property is used for plugin's basic or optional requirement.
This value is not used in Adaptor layer, but it can be uesd to important Key for plugin with service provider.

Since :
2.4
Parameters:
[in]pluginThe handle for use Plugin APIs
[in]keyThe key of plugin property
[in]valueThe value of plugin property that matched key
Remarks:
Some kind of property key(Not mandatory) is defined in this API (That is named to SERVICE_PLUGIN_PROPERTY_XXX)
If the key already exists in the property its current value is replaced with the new value.
plugin must be released memory using service_plugin_destroy() when you no longer needs plugin's API
Returns:
0 on success, otherwise a negative error value
Return values:
SERVICE_ADAPTOR_ERROR_NONESuccessful
SERVICE_ADAPTOR_ERROR_INVALID_PARAMETERInvalid parameter
SERVICE_ADAPTOR_ERROR_UNKNOWNUnknown error
See also:
SERVICE_PLUGIN_PROPERTY_APP_KEY
SERVICE_PLUGIN_PROPERTY_APP_SECRET
SERVICE_PLUGIN_PROPERTY_USER_ID
Precondition:
plugin must be issued by service_adaptor_create_plugin()

Destroy Service Adaptor.

Deprecated:
Deprecated since 3.0

It must called after a program no longer needs APIs of specfic plugin

Since :
2.4
Parameters:
[in]pluginThe handle for use Plugin APIs
See also:
service_adaptor_create_plugin()
Returns:
0 on success, otherwise a negative error value
Return values:
SERVICE_ADAPTOR_ERROR_NONESuccessful
SERVICE_ADAPTOR_ERROR_INVALID_PARAMETERInvalid parameter
SERVICE_ADAPTOR_ERROR_UNKNOWNUnknown error
Precondition:
plugin must be issued by service_adaptor_create_plugin()
int service_plugin_get_property ( service_plugin_h  plugin,
const char *  key,
char **  value 
)

Gets Plugin Property.

Deprecated:
Deprecated since 3.0
Since :
2.4
Parameters:
[in]pluginThe handle for use Plugin APIs
[in]keyThe key of plugin property
[out]valueThe value of plugin property that matched key
Remarks:
Some kind of property key(Not mandatory) is defined in this API (That is named to SERVICE_PLUGIN_PROPERTY_XXX)
value must be released using free()
Returns:
0 on success, otherwise a negative error value
Return values:
SERVICE_ADAPTOR_ERROR_NONESuccessful
SERVICE_ADAPTOR_ERROR_NO_DATAThere is no property
SERVICE_ADAPTOR_ERROR_INVALID_PARAMETERInvalid parameter
SERVICE_ADAPTOR_ERROR_UNKNOWNUnknown error
See also:
SERVICE_PLUGIN_PROPERTY_APP_KEY
SERVICE_PLUGIN_PROPERTY_APP_SECRET
SERVICE_PLUGIN_PROPERTY_USER_ID
Precondition:
The function get property already set by service_adaptor_set_plugin_property()
int service_plugin_remove_property ( service_plugin_h  plugin,
const char *  key 
)

Remove Plugin Property.

Deprecated:
Deprecated since 3.0
Since :
2.4
Parameters:
[in]pluginThe handle for use Plugin APIs
[in]keyThe key of plugin property
Remarks:
Some kind of property key(Not mandatory) is defined in this API (That is named to SERVICE_PLUGIN_PROPERTY_XXX)
Returns:
0 on success, otherwise a negative error value
Return values:
SERVICE_ADAPTOR_ERROR_NONESuccessful
SERVICE_ADAPTOR_ERROR_INVALID_PARAMETERInvalid parameter
SERVICE_ADAPTOR_ERROR_UNKNOWNUnknown error
See also:
SERVICE_PLUGIN_PROPERTY_APP_KEY
SERVICE_PLUGIN_PROPERTY_APP_SECRET
SERVICE_PLUGIN_PROPERTY_USER_ID
int service_plugin_start ( service_plugin_h  plugin,
int  service_mask 
)

Requests start initalization for service plugin.

Deprecated:
Deprecated since 3.0
Since :
2.4
Parameters:
[in]pluginThe handle for use Plugin APIs
[in]service_maskThe flag for use service plugins, this flag can be masked multiple enum (service_plugin_service_type_e)
Remarks:
service_mask must be input using 'bit or' operation with service_plugin_service_type_e
- for example,
     int service_mask |= SERVIE_PLUGIN_SERVICE_AUTH;
     service_mask |= SERVICE_PLUGIN_SERVICE_STORAGE;
     int ret = service_plugin_start(m_plugin, service_mask);
If a program needs to stop plugin manually, use service_plugin_stop().
But in service_plugin_destroy(), automatically stop service plugin
See also:
service_plugin_service_type_e
service_plugin_stop()
Returns:
0 on success, otherwise a negative error value
If return value is SERVICE_ADAPTOR_ERROR_NOT_AUTHORIZED, request authorization to signup application
Return values:
SERVICE_ADAPTOR_ERROR_NONESuccessful
SERVICE_ADAPTOR_ERROR_INVALID_PARAMETERInvalid parameter
SERVICE_ADAPTOR_ERROR_NOT_AUTHORIZEDNeed authorization
SERVICE_ADAPTOR_ERROR_TIMED_OUTTimed out
SERVICE_ADAPTOR_ERROR_IPC_UNSTABLEIPC failed with Service Adaptor Daemon
SERVICE_ADAPTOR_ERROR_UNKNOWNUnknown error

Requests stop manually for service plugin.

Deprecated:
Deprecated since 3.0
Since :
2.4
Parameters:
[in]pluginThe handle for use Plugin APIs
Remarks:
If a program needs to stop plugin manually, use this function.
But in service_plugin_destroy(), automatically stop service plugin
plugin must be released memory using service_plugin_destroy() when you no longer needs plugin's API
See also:
service_plugin_start()
service_plugin_destroy()
Returns:
0 on success, otherwise a negative error value
Return values:
SERVICE_ADAPTOR_ERROR_NONESuccessful
SERVICE_ADAPTOR_ERROR_TIMED_OUTTimed out
SERVICE_ADAPTOR_ERROR_IPC_UNSTABLEIPC failed with Service Adaptor Daemon
SERVICE_ADAPTOR_ERROR_UNKNOWNUnknown error
Precondition:
service_plugin_start()