summaryrefslogtreecommitdiff
path: root/src/lib/efl/interfaces/efl_config.eo
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2017-10-18 18:12:13 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-10-18 19:32:00 +0900
commit24c0eced7724f435cec0e5b81e45f1485d08c64e (patch)
tree76cd4c69a6b4cb30c6367c6a3b998e939504334b /src/lib/efl/interfaces/efl_config.eo
parent315e865f18efbab4b3e68171e631912fbd5705fd (diff)
config: Simplify EO API
This is: - using a property (but terribly ugly due to the ownership on the returned value) - removing an unused function Note: This interface Efl.Config covers only elm_config for now. But it's very generic and could be used in the future for application specific configuration.
Diffstat (limited to 'src/lib/efl/interfaces/efl_config.eo')
-rw-r--r--src/lib/efl/interfaces/efl_config.eo43
1 files changed, 21 insertions, 22 deletions
diff --git a/src/lib/efl/interfaces/efl_config.eo b/src/lib/efl/interfaces/efl_config.eo
index 7dec728..aa19dfa 100644
--- a/src/lib/efl/interfaces/efl_config.eo
+++ b/src/lib/efl/interfaces/efl_config.eo
@@ -2,30 +2,29 @@ interface Efl.Config ()
2{ 2{
3 [[A generic configuration interface, that holds key-value pairs.]] 3 [[A generic configuration interface, that holds key-value pairs.]]
4 methods { 4 methods {
5 /* FIXME: make this a property -- @own is a problem */ 5 @property config {
6 config_set { 6 [[A generic configuration value, refered to by name.]]
7 [[Set configuration]] 7 get {
8 params { 8 keys {
9 name: string; [[Configuration option name]] 9 name: string; [[Configuration option name.]]
10 val: const(any_value_ptr); [[Configuration option value]] 10 }
11 values {
12 value: any_value_ptr @owned;
13 [[The value. It will be empty if it doesn't exist. The caller
14 must free it after use (using $eina_value_free() in C).]]
15 }
11 } 16 }
12 return: bool; [[$false in case of error: value type was invalid, the 17 set {
13 config can't be changed, config does not exist...]] 18 keys {
14 } 19 name: string; [[Configuration option name.]]
15 config_get @const { 20 }
16 [[Get configuration]] 21 values {
17 params { 22 value: const(any_value_ptr);
18 name: string; [[Configuration option name]] 23 [[Configuration option value. May be $null if not found.]]
19 } 24 }
20 return: any_value_ptr @owned; [[Configuration option value]] 25 return: bool; [[$false in case of error: value type was invalid, the
21 } 26 config can't be changed, config does not exist...]]
22 config_list_get @const {
23 [[Returns a list of generic values under a given key.]]
24 params {
25 @in name: string; [[Configuration option name]]
26 } 27 }
27 return: iterator<any_value_ptr> @owned; [[
28 List of configuration option values]]
29 } 28 }
30 } 29 }
31} 30}