platform/core/system/libsyscommon.git
20 months agoresource-manager: Fix license Apache to MIT 85/288785/1 accepted/tizen/unified/20230306.172221
TaeminYeom [Thu, 23 Feb 2023 04:48:29 +0000 (13:48 +0900)]
resource-manager: Fix license Apache to MIT

libsyscommon project is under the MIT license,
but newly added files were marked with Apache licenses.

[Changed file]
src/resource-manager/resource-device.c
src/resource-manager/resource-device.h
src/resource-manager/resource-listener-epoll.c
src/resource-manager/resource-listener.h
src/resource-manager/resource-manager.c
src/resource-manager/resource-manager.h
src/resource-manager/resource-type.h

Change-Id: I922df053003b2d1924543fd26690f7dd58069c42
Signed-off-by: TaeminYeom <taemin.yeom@samsung.com>
20 months agoresource-manager: Rename existing ops to monitor_ops 96/288496/2
Dongwoo Lee [Fri, 17 Feb 2023 05:43:08 +0000 (14:43 +0900)]
resource-manager: Rename existing ops to monitor_ops

Change-Id: I2d5e1228052a24c52831a1ac64b6e8c9a6394617
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
20 months agoRevert "resource-manager: introduce sync getter" 95/288495/2
Dongwoo Lee [Fri, 17 Feb 2023 02:59:48 +0000 (11:59 +0900)]
Revert "resource-manager: introduce sync getter"

Since non-sync getter for monitoring is moved into monitor_ops, sync
suffix for normal getter/setter is no more needed. Thus, this reverts
commit ad9493c0b5ae ("resource-manager: introduce sync getter").

Change-Id: I667899fc5254fa3777ffa5d784f062a3fa9e28c5
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
20 months agoresource-manager: reduce repetitive code 01/288301/2
Youngjae Cho [Wed, 15 Feb 2023 02:03:12 +0000 (11:03 +0900)]
resource-manager: reduce repetitive code

Change-Id: I374f930323e3f85550251d015e4f9c320b554d1f
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
20 months agoresource-manager: Add epoll type listener support 79/287479/6 accepted/tizen/unified/20230221.031433
Dongwoo Lee [Thu, 12 Jan 2023 01:01:22 +0000 (10:01 +0900)]
resource-manager: Add epoll type listener support

To support ease of use for epoll type listener, this introduces
following APIs:
 - syscommon_resman_register_epoll_listener: register fd to epoll
   listener worker thread and returns listener handle id.
 - syscommon_resman_unregister_epoll_listener: unregister fd from
   worker for the correspongding handle id. (fd is not closed by this
   function, so caller resource driver should be close fd by its own
   responsibility.

Change-Id: Ide38a3816742939c9101e5a92944f8dc2480ff8f
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
20 months agoresource-manager: Introduce attribute listener operations 78/287478/4
Dongwoo Lee [Thu, 12 Jan 2023 01:01:22 +0000 (10:01 +0900)]
resource-manager: Introduce attribute listener operations

Now each attribute can have 'listener_ops' which consists 'init',
'exit', and 'action', to watch changes for underlying state. Each
operation has a role as below:

 - init: allocate resources and register listeners
 - exit: deallocate resources and unregister listeners
 - action: change attribute values as following listener parameters

'init'/'exit' is called automatically when each attribute interest is
set/unset each, on the other hand, 'action' should be called by each
listener.

Change-Id: I076f41f751b18f4c39d7548e4d78ddc02e8e26a2
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
20 months agoresource-manager: revamp init/exit of resource driver 10/288010/1
Youngjae Cho [Thu, 9 Feb 2023 04:39:57 +0000 (13:39 +0900)]
resource-manager: revamp init/exit of resource driver

Change-Id: I24bf3bd1b93bbe53c170522bc039b082191989de
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
20 months agolibgdbus: add dbus signal for power lock state change 81/287781/2 accepted/tizen/unified/20230209.111304
Yunhee Seo [Mon, 6 Feb 2023 05:42:42 +0000 (14:42 +0900)]
libgdbus: add dbus signal for power lock state change

In this context, power lock state is meaning of "locked or unlocked".
Thus, If the power lock state of specific pmlock is changed,
this signal will be used.

Change-Id: I9db5527bf9668fe54ee9c0c19a2be23b42f91517
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
20 months agoresource-manager: allocate resource id correctly 95/287795/2
Youngjae Cho [Mon, 6 Feb 2023 10:05:08 +0000 (19:05 +0900)]
resource-manager: allocate resource id correctly

It hasn't cleared sign bit on allocating resource id. Fix it to clear
sign bit correctly.

Change-Id: Ic429dd26bcd6082ed434aecf98b8a48eb0b52b47
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
21 months agoresource-manager: fix wrong indentation in unset_resource_attr_interest 71/286771/2
Chanwoo Choi [Thu, 12 Jan 2023 13:48:30 +0000 (22:48 +0900)]
resource-manager: fix wrong indentation in unset_resource_attr_interest

Fix the wrong indentation in unset_resource_attr_interest internal
function in order to improve the readability.

Change-Id: I07f3d84060d14c0d5cc141d74949900dd9fe11f0
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
21 months agoresource-manager: fix free_resource() 49/286649/3
Youngjae Cho [Wed, 11 Jan 2023 01:56:27 +0000 (10:56 +0900)]
resource-manager: fix free_resource()

Change-Id: I15855cc6ce7eef4859a94fbc0d959d91abdd0c06
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
21 months agoresource-manager: introduce sync getter 35/286435/1
Youngjae Cho [Fri, 6 Jan 2023 03:04:34 +0000 (12:04 +0900)]
resource-manager: introduce sync getter

Sync getter fetches data after update.

Change-Id: I4610f99f1b4039b985890f77abb827a1174bf5dd
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
22 months agolibgdbus: add dbus signal for power state change 84/285084/2 accepted/tizen/unified/20221220.180317
Youngjae Cho [Tue, 6 Dec 2022 02:15:52 +0000 (11:15 +0900)]
libgdbus: add dbus signal for power state change

Change-Id: I8b4b22f7bfb5e4d662ee531d5b170ada2f09acdf
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
22 months agoresource-manager: add missing header 77/285077/1
Youngjae Cho [Tue, 6 Dec 2022 02:33:07 +0000 (11:33 +0900)]
resource-manager: add missing header

Change-Id: I3c1d4fb91d0ebbf784075c5b7bb5f6e49a0cc51a
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
23 months agopackaging: couple .spec version with .pc version 52/284852/1 accepted/tizen/unified/20221206.170548
Youngjae Cho [Tue, 29 Nov 2022 02:30:19 +0000 (11:30 +0900)]
packaging: couple .spec version with .pc version

Change-Id: I2ccfce3f0afbfe66b2807858e7b081d7cbf022e5
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
23 months agolibsyscommon v5.0.0 21/283221/3
Dongwoo Lee [Thu, 20 Oct 2022 10:14:12 +0000 (19:14 +0900)]
libsyscommon v5.0.0

Changes from v4.1
- Add libsyscommon-resource-manager feature to handle the resource and
  resource attribute based on ID.
- Newly added header files for resource-manager
  1. usr/include/libsyscommon/resource-type.h
  : Contain the supported resource data type and resource flag to
    indicate the specific characteristic.
  2. usr/include/libsyscommon/resource-manager.h
  : Contain the resource handelr functions such as create/delete
    resource, update the resource attributes and get value of resource attributes.
  : Contain the structures for resource driver and attribute
  3. usr/include/libsyscommon/resource-device.h
  : Contain the resource_device structure and function to handle the
    resource device data.

Change-Id: Id43eb66dc1797cf8838497ff0aaa37625ca6fe30
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
23 months agoresource-manager: operate based on resource id 56/283856/4
Youngjae Cho [Fri, 4 Nov 2022 05:45:16 +0000 (14:45 +0900)]
resource-manager: operate based on resource id

All operations provided by resource-manager now work based on resource
"id" instead of resource "instance" itself. All resource "instances" are
managed within libsyscommon and it only exposes their id.

The resource-manager source code has been implemented based on the
coding rule below.
 - An actual operating function has no prefix syscommon_resman_. It has
   internal linkage and takes actual resource instance as a parameter.
   e.g., get_resource_attr(struct syscommon_resman_resource *resource, ...)

 - A function exposed through header is prefixed with syscommon_resman_
   and it takes resource id as a parameter. It locates resource instance
   using resource id and invokes matching function.
   e.g., syscommon_resman_get_resource_attr(int resource_id, ...)

Change-Id: If82c58593b363433188bf01809dc57a242ede24f
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
23 months agoresource-manager: add system resource manager library 06/283206/3
Dongwoo Lee [Thu, 20 Oct 2022 07:27:30 +0000 (16:27 +0900)]
resource-manager: add system resource manager library

To provide system-wide unified resource framework, resource utilities in
resource monitor is extracted into this library.

Change-Id: I7ba90e3b1fda1b525a015bb46addd4d860045d6d
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
2 years agoAdd extern "C" keyword in header files 47/280147/1 accepted/tizen_7.0_unified_hotfix tizen_7.0_hotfix accepted/tizen/7.0/unified/20221110.060712 accepted/tizen/7.0/unified/hotfix/20221116.105738 accepted/tizen/unified/20220919.021606 tizen_7.0_m2_release
TaeminYeom [Wed, 24 Aug 2022 09:15:03 +0000 (18:15 +0900)]
Add extern "C" keyword in header files

Change-Id: Ie16f5ec1d1c18f5e20cd94d46ad63a3ad7ac58fc
Signed-off-by: TaeminYeom <taemin.yeom@samsung.com>
2 years agoRelicense libsyscommon package as MIT to prevent license conflict issues 33/279833/1 accepted/tizen/unified/20220824.135652 submit/tizen/20220822.111221
Hyotaek Shim [Thu, 18 Aug 2022 07:40:18 +0000 (16:40 +0900)]
Relicense libsyscommon package as MIT to prevent license conflict issues

For example, Apache-2.0 is in conflict with GPL-2.0.

Change-Id: I52aff6d3d7083fa20939f1fd356c299ddc69e0cf
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
2 years agoini-parser: check closing bracket when parsing section name 79/276079/1
Youngjae Cho [Thu, 9 Jun 2022 08:12:42 +0000 (17:12 +0900)]
ini-parser: check closing bracket when parsing section name

Change-Id: Ic939bfd6f57c9ee20e41fe7adf34f0debe3539e6
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
2 years agoFix build errors - different header path 58/275658/1 accepted/tizen/unified/20220530.140622 submit/tizen/20220528.014654
Hyotaek Shim [Sat, 28 May 2022 01:43:38 +0000 (10:43 +0900)]
Fix build errors - different header path

Public) /include/system/system_info.h
VD TV)  /include/capi-system-info/system_info.h

Change-Id: Ibae5b76527051ecda6b7e24d546846886e8cb213
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
2 years agoAdd missing Requires to pkgconfig(capi-system-info) 49/274349/2 accepted/tizen/unified/20220526.144244 submit/tizen/20220525.001052
Hyotaek Shim [Wed, 27 Apr 2022 02:44:15 +0000 (11:44 +0900)]
Add missing Requires to pkgconfig(capi-system-info)

Change-Id: I677a0b3995caaf937e54a318ea655b8822539cd6
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
2 years agoFix build warnings 96/269496/2
Youngjae Cho [Mon, 17 Jan 2022 05:17:58 +0000 (14:17 +0900)]
Fix build warnings

Change-Id: Ib5784f64fb176d2916f376ca4c0ca05d6e363c36
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
2 years agoAdd libsys_is_emulator() and refactor libsys_is_container() 29/273729/2
Hyotaek Shim [Wed, 13 Apr 2022 02:26:17 +0000 (11:26 +0900)]
Add libsys_is_emulator() and refactor libsys_is_container()

Change-Id: Ic2cce60d76704803cd1c54aa70a9c795b92c9906
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
2 years agoAdd description for the declaration of the file utils 77/273477/2
SangYoun Kwak [Wed, 6 Apr 2022 06:58:55 +0000 (15:58 +0900)]
Add description for the declaration of the file utils

Change-Id: Ia8367863a59fd3f31738fa62db1d0618c4e8ba5a
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
2 years agoCheck tmp buffer overflow 06/269706/5
SangYoun Kwak [Thu, 20 Jan 2022 05:14:21 +0000 (14:14 +0900)]
Check tmp buffer overflow

Change-Id: I5de5195293f72444d91d7b8f89f72bfe3ac5301e
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
2 years agoini-parser: add libsys_config_parse_by_section() 72/268472/4 accepted/tizen/unified/20220117.135033 submit/tizen/20220112.015321 submit/tizen/20220113.004629
Youngjae Cho [Thu, 23 Dec 2021 07:33:30 +0000 (16:33 +0900)]
ini-parser: add libsys_config_parse_by_section()

The original function, config_parse(), parses configuration file line by
line. Due to this, a parser, which is registered by the config_parse(),
can hardly handle out-of-ordered section/property or multiple sections
with same name.

The libsys_config_parse_by_section() now parses configuration file
by section. Therefore a parser can now find whole properties of a
section when the section is conveyed to the parser.

Change-Id: I08f09e2f6aefabea497393edb3c1f88dbe2d8850
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
2 years agofile: add libsys_parse_cmdline_scanf() 14/268314/3
Youngjae Cho [Mon, 20 Dec 2021 07:46:29 +0000 (16:46 +0900)]
file: add libsys_parse_cmdline_scanf()

libsys_parse_cmdline_scanf() scans tokens of file /proc/cmdline.
The parameters and return value have same semantics to those of
scanf() family.

Change-Id: Iac5838fe36b0ed2de36eb0412a13691ba0a50c3b
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
2 years agoChange interface DEVICED_INTERFACE_POWER 28/267728/1 accepted/tizen/unified/20211213.133502 submit/tizen/20211210.062426
Youngjae Cho [Thu, 9 Dec 2021 08:14:37 +0000 (17:14 +0900)]
Change interface DEVICED_INTERFACE_POWER

Change-Id: I3c605793fb70e4948c8a95dbb2d4c1bf4b75b39f
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
2 years agoModify dbus object path 33/265433/4 submit/tizen/20211111.113430
Unsung Lee [Tue, 19 Oct 2021 05:26:02 +0000 (14:26 +0900)]
Modify dbus object path

Change-Id: I6377613b93197d45e7873004767a22ddbedb68a1
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
2 years agoFix svace issue 72/266172/1
Youngjae Cho [Tue, 9 Nov 2021 01:18:17 +0000 (17:18 -0800)]
Fix svace issue

Change-Id: I920fbb2f16b8af7cf164c58a18a1eb6ff2f1db9a
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
3 years agotests: add test running automatically on building 63/264863/6 accepted/tizen/unified/20211105.130505 submit/tizen/20211103.072537 submit/tizen/20211104.031932 submit/tizen/20211104.080231
Youngjae Cho [Fri, 1 Oct 2021 09:10:18 +0000 (18:10 +0900)]
tests: add test running automatically on building

If the test fails, the whole build will fail.

Change-Id: Ibb88e60d13bcec09567630d051372fbcfbbb79da
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
3 years agolibcommon: add is_container function 42/260842/2 accepted/tizen/6.5/unified/20211028.115050 accepted/tizen/unified/20210707.070905 submit/tizen/20210706.074949 submit/tizen_6.5/20211028.162501 tizen_6.5.m2_release
Yunmi Ha [Mon, 5 Jul 2021 11:47:06 +0000 (20:47 +0900)]
libcommon: add is_container function

Change-Id: I5ba0109e996b3f4e8ff939859499a3de8b623c90
Signed-off-by: Yunmi Ha <yunmi.ha@samsung.com>
3 years agolibcommon: bring file IO from deviced 91/259691/2 accepted/tizen/unified/20210615.120427 submit/tizen/20210611.122922 submit/tizen/20210614.021455
Youngjae Cho [Fri, 11 Jun 2021 06:12:50 +0000 (15:12 +0900)]
libcommon: bring file IO from deviced

Change-Id: I0068a42487b31881ff2c8f91de785ae8362984d4
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
3 years agolibcommon: fix indentation 89/259689/1
Youngjae Cho [Fri, 11 Jun 2021 06:09:02 +0000 (15:09 +0900)]
libcommon: fix indentation

Change-Id: Ib0af8672bfa8843050db917540c3ddfe91efbcff
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
3 years agoRemove with_tizen build macro 56/257256/1
Hyotaek Shim [Thu, 22 Apr 2021 01:01:48 +0000 (10:01 +0900)]
Remove with_tizen build macro

Change-Id: I565075d4b1dbc99f73fd3bcc7afe5eb944bce854
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
3 years agoFix including libgdbus header libsystemd 74/255574/1 accepted/tizen/unified/20210321.225805 submit/tizen/20210319.090004
Hyotaek Shim [Fri, 19 Mar 2021 08:40:06 +0000 (17:40 +0900)]
Fix including libgdbus header libsystemd

Change-Id: I427757673726c8829a777d8667dcd096eb481a49
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
3 years agoChange dbus function name 31/255531/2
taemin.yeom [Fri, 19 Mar 2021 05:14:10 +0000 (14:14 +0900)]
Change dbus function name

Change-Id: I67b2b5d555db01ecbd32078380662e90f1dc3b6f
Signed-off-by: taemin.yeom <taemin.yeom@samsung.com>
3 years agoImprove variable naming style 31/255031/5
taemin.yeom [Thu, 11 Mar 2021 09:17:04 +0000 (18:17 +0900)]
Improve variable naming style

Change-Id: I5236467f2efbc7768f49028b09e0a758967fd979
Signed-off-by: taemin.yeom <taemin.yeom@samsung.com>
3 years agoAdd GVariant NULL check 78/255078/3
taemin.yeom [Fri, 12 Mar 2021 02:02:08 +0000 (11:02 +0900)]
Add GVariant NULL check

Change-Id: I7278251402d76f4785b15b8fdc6724d80e59f642
Signed-off-by: taemin.yeom <taemin.yeom@samsung.com>
3 years agoRearrange header and source files 28/254728/1
Hyotaek Shim [Tue, 9 Mar 2021 04:24:11 +0000 (13:24 +0900)]
Rearrange header and source files

Change-Id: I7cb9725a5be1ac4ead7cac73d50203f413f669cf
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
3 years agoRestore gdbus APIs based on va_list 82/254682/1 accepted/tizen/unified/20210310.145057 submit/tizen/20210309.090957 submit/tizen/20210310.040440
taemin.yeom [Mon, 8 Mar 2021 08:23:27 +0000 (17:23 +0900)]
Restore gdbus APIs based on va_list

Change-Id: I9c275d6c652ac4253d3058fa3c022340ca55c6cd
Signed-off-by: taemin.yeom <taemin.yeom@samsung.com>
3 years agoImprove error handling 01/254601/3
taemin.yeom [Fri, 5 Mar 2021 05:38:18 +0000 (14:38 +0900)]
Improve error handling

Change-Id: I2db312e210c37a457eb874d41f1adcfb5700885a
Signed-off-by: taemin.yeom <taemin.yeom@samsung.com>
3 years agoChange dbus handle method functions 21/254521/5
taemin.yeom [Thu, 4 Mar 2021 06:20:57 +0000 (15:20 +0900)]
Change dbus handle method functions

change "dbus_handle_method_sync_var" and
"dbus_handle_method_with_unix_fd_list_sync_with_reply_var"
to add a return value indicating error results

Change-Id: Ib9063dc6811bb28e885f71e85b0253dfd6d303bc
Signed-off-by: taemin.yeom <taemin.yeom@samsung.com>
3 years agoChange dbus_handle_method_sync_with_reply_var 58/254458/14
taemin.yeom [Wed, 3 Mar 2021 07:54:50 +0000 (16:54 +0900)]
Change dbus_handle_method_sync_with_reply_var

to add a return value indicating error results.

Change-Id: I557c3fe79168076aaa9516f0c36eafd471e19c56
Signed-off-by: taemin.yeom <taemin.yeom@samsung.com>
3 years agoRemove unused gdbus APIs based on char string 06/254506/1
Hyotaek Shim [Thu, 4 Mar 2021 02:17:58 +0000 (11:17 +0900)]
Remove unused gdbus APIs based on char string

Change-Id: I6ddb7dd5948c5268f7da0b3977d25059b7898110
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
3 years agoRemove unused gdbus APIs based on va_list 05/254505/1
Hyotaek Shim [Thu, 4 Mar 2021 02:08:12 +0000 (11:08 +0900)]
Remove unused gdbus APIs based on va_list

Change-Id: I0d858522fda0f49e0bda8f4b4b7178b9ca770429
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
3 years agoFix svace 87/253187/3 accepted/tizen/unified/20210223.065526 submit/tizen/20210222.042310
lokilee73 [Fri, 5 Feb 2021 08:35:15 +0000 (17:35 +0900)]
Fix svace

Change-Id: I5397a386b95ed5fbaccda82a02a2b70026766044
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
3 years agoChange dbus method name for pass SetScenario 43/253143/4 accepted/tizen/unified/20210208.061715 submit/tizen/20210205.011235
lokilee73 [Fri, 5 Feb 2021 00:50:02 +0000 (09:50 +0900)]
Change dbus method name for pass SetScenario

Change-Id: I963a064da7d8f7a4cef14c2b4df30139d742c963
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
3 years agolibgdbus: Return null when dbus connection fails 12/252212/2 accepted/tizen/unified/20210129.002321 submit/tizen/20210127.032903
Karol Lewandowski [Mon, 25 Jan 2021 16:57:49 +0000 (17:57 +0100)]
libgdbus: Return null when dbus connection fails

When libgdbus fails to get bus for one of global busses (system, session)
it still returns vaild pointer.  It's because global busses are cached in
g_dh[2] which always exist.

This commit changes the get_connection function to return null for all the
checks like following to detect and fail in the case where getting bus was
unsuccessfull (ie. dbus-daemon isn't running in early boot/special targets)

    dh = _dbus_handle_get_default_connection();
    if (!dh) {
        _E("failed to get default connection, bustype:%d", (int)dbus_handle_get_default_bus_type());
        ...

Change-Id: If85fe8e6cb7a5f95618df8f7f3fefa923e3e271a

3 years agolibsyscommon: add "Requires:pkgconfig(dlog)" to libsyscommon-devel 56/252156/1 accepted/tizen/unified/20210126.141628 submit/tizen/20210125.045032 submit/tizen/20210126.055732 submit/tizen/20210126.064541 submit/tizen/20210126.081759
INSUN PYO [Mon, 25 Jan 2021 04:12:12 +0000 (13:12 +0900)]
libsyscommon: add "Requires:pkgconfig(dlog)" to libsyscommon-devel

Change-Id: I7ab05dfddbf864490c191775a380cf639bfe4a54

3 years agolibgdbus: fix destroy_func param of g_dbus_connection_signal_unsubscribe 52/251952/1 accepted/tizen/unified/20210122.123002 submit/tizen/20210121.074344
Yunmi Ha [Thu, 21 Jan 2021 06:42:32 +0000 (15:42 +0900)]
libgdbus: fix destroy_func param of g_dbus_connection_signal_unsubscribe

Change-Id: Iecac374f5b0439f184afb3a5715f3d786c2ba931
Signed-off-by: Yunmi Ha <yunmi.ha@samsung.com>
3 years agolibcommon: add file-io library 38/251638/3
Yunmi Ha [Mon, 18 Jan 2021 05:44:38 +0000 (14:44 +0900)]
libcommon: add file-io library

Change-Id: Ifa68bfc79bb96ab11d3f69338abf4c80e80608ea
Signed-off-by: Yunmi Ha <yunmi.ha@samsung.com>
3 years agolibcommon: Change prefix of list definition 70/250970/6 accepted/tizen/unified/20210111.125514 submit/tizen/20210108.041937
Yunmi Ha [Wed, 6 Jan 2021 07:41:57 +0000 (16:41 +0900)]
libcommon: Change prefix of list definition

- LIST to SYS_G_LIST

Change-Id: Id160371e0f692010e1f602e5398206274c4cfbcf
Signed-off-by: Yunmi Ha <yunmi.ha@samsung.com>
3 years agolibcommon: Add common library 32/250832/3
Yunmi Ha [Tue, 5 Jan 2021 04:45:21 +0000 (13:45 +0900)]
libcommon: Add common library

- list (glib)
- ini-parser

Change-Id: Ic13b47d5a1f26ed8b40007684da620a804775623
Signed-off-by: Yunmi Ha <yunmi.ha@samsung.com>
3 years agoRemove unused path and interface for low power 71/248971/1 accepted/tizen/unified/20201207.123252 submit/tizen/20201204.013436
lokilee73 [Fri, 4 Dec 2020 01:06:33 +0000 (10:06 +0900)]
Remove unused path and interface for low power

Change-Id: I02dcb7b82c30c3c78a5af0c2ce204cff0c30b8ed
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
3 years agoReturn -EPERM when get acces denied dbus error 18/247818/1 accepted/tizen/unified/20201118.123917 submit/tizen/20201118.023711
Yunmi Ha [Tue, 17 Nov 2020 07:26:25 +0000 (16:26 +0900)]
Return -EPERM when get acces denied dbus error

Change-Id: Ib604ef0d837a93cf0d47f3de0ed4f2a207768987
Signed-off-by: Yunmi Ha <yunmi.ha@samsung.com>
4 years agoChange function name 84/243784/3 accepted/tizen_6.0_unified_hotfix tizen_6.0_hotfix accepted/tizen/6.0/unified/20201030.115630 accepted/tizen/6.0/unified/20201110.230820 accepted/tizen/6.0/unified/hotfix/20201103.004229 accepted/tizen/unified/20200914.131505 accepted/tizen/unified/20201106.130154 submit/tizen/20200911.012117 submit/tizen/20201103.015640 submit/tizen/20201104.011652 submit/tizen_6.0/20201029.205104 submit/tizen_6.0/20201109.030411 submit/tizen_6.0_hotfix/20201102.192504 submit/tizen_6.0_hotfix/20201103.114804 tizen_6.0.m2_release
lokilee73 [Thu, 10 Sep 2020 05:30:14 +0000 (14:30 +0900)]
Change function name
ex) dh_get_param_from_var to g_variant_get_safe

Change-Id: I85c9946996885fde44443c09c491c829903bc378
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
4 years agoAdd dbus path and interface for pass daemon 42/240142/3 accepted/tizen/unified/20200810.123014 accepted/tizen/unified/20200817.134626 accepted/tizen/unified/20200819.100452 submit/tizen/20200810.073747 submit/tizen/20200814.095001 submit/tizen/20200818.110444
lokilee73 [Tue, 4 Aug 2020 02:14:22 +0000 (11:14 +0900)]
Add dbus path and interface for pass daemon

CPU pmqos request is done via dbus, when device sleeps or wakes up

Change-Id: Icf69f71f3b1a8046194040827b57de090a3582d4
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
4 years agoAdd dbus interface to broadcast key input values 06/237306/1 accepted/tizen/unified/20200701.032301 submit/tizen/20200629.052809
lokilee73 [Mon, 29 Jun 2020 04:43:32 +0000 (13:43 +0900)]
Add dbus interface to broadcast key input values

Change-Id: I7b56e3dc794361d0ff3d60660b7fd7c91541c5b2
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
4 years agoAdd api dbus_handle_emit_dbus_signal_sync() 19/232619/1 sandbox/signal_delay accepted/tizen/unified/20200529.124141 submit/tizen/20200528.103513
sanghyeok.oh [Thu, 7 May 2020 03:24:36 +0000 (12:24 +0900)]
Add api dbus_handle_emit_dbus_signal_sync()

* dbus_handle_emit_dbus_signal_sync()
Emit signal immediately.

* dbus_handle_flush_sync()
g_dbus_connection_flush_sync() wrapper

Change-Id: I67a79426c78be5f524e85b1786f777028d336ee9

4 years agoMerge "Fix build error with ENABLE_LIBDEVICED_DLOG option on Tizen 6.0" into tizen submit/tizen/20200429.062821
Hyotaek Shim [Fri, 17 Apr 2020 06:36:15 +0000 (06:36 +0000)]
Merge "Fix build error with ENABLE_LIBDEVICED_DLOG option on Tizen 6.0" into tizen

4 years agoFix build error with ENABLE_LIBDEVICED_DLOG option on Tizen 6.0 60/230260/1
INSUN PYO [Thu, 9 Apr 2020 00:19:43 +0000 (09:19 +0900)]
Fix build error with ENABLE_LIBDEVICED_DLOG option on Tizen 6.0

If NULL is passed as the %s argument of dlog, gcc reports an error.

Change-Id: Id70287787362f152efbbf5935c76646500321188

4 years agoFix build warning on Tizen 6.0 30/230230/1
INSUN PYO [Thu, 9 Apr 2020 00:15:37 +0000 (09:15 +0900)]
Fix build warning on Tizen 6.0

[    8s] In file included from /usr/include/string.h:494,
[    8s]                  from /home/abuild/rpmbuild/BUILD/libsyscommon-4.1/src/libgdbus/dbus-systemd.c:21:
[    8s] In function 'strncpy',
[    8s]     inlined from 'systemd_get_unit_dbus_path' at /home/abuild/rpmbuild/BUILD/libsyscommon-4.1/src/libgdbus/dbus-systemd.c:386:2:
[    8s] /usr/include/bits/string_fortified.h:106:10: warning: '__builtin_strncpy' output truncated before terminating nul copying 31 bytes from a string of the same length [-Wstringop-truncation]
[    8s]   106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));

Change-Id: Iaf5f71d7c364db91b495f50e63005778765ba359

4 years agolibgdbus: fix leak 82/222282/1 accepted/tizen/unified/20200114.130725 submit/tizen/20200113.072921
sanghyeok.oh [Mon, 13 Jan 2020 07:52:46 +0000 (16:52 +0900)]
libgdbus: fix leak

Change-Id: Ib15167a5be404e8ca6f690efe269f7a407fefce0
Signed-off-by: sanghyeok.oh <sanghyeok.oh@samsung.com>
5 years agolibgdbus: modify code style 70/212970/1 accepted/tizen/unified/20191113.123522 submit/tizen/20191113.004655
sanghyeok.oh [Wed, 28 Aug 2019 06:11:04 +0000 (15:11 +0900)]
libgdbus: modify code style

Change-Id: Iea0fa1803e7d59bbdfdea54124cebd9d17c26858
Signed-off-by: sanghyeok.oh <sanghyeok.oh@samsung.com>
5 years agofix build warning 69/212969/1
sanghyeok.oh [Wed, 28 Aug 2019 02:31:07 +0000 (11:31 +0900)]
fix build warning

Change-Id: I5b3dab83dcf2ef1f4c4c61a6f27367595c8ef385
Signed-off-by: sanghyeok.oh <sanghyeok.oh@samsung.com>
5 years agore-arrange code 84/212184/2 accepted/tizen_5.5_unified_mobile_hotfix tizen_5.5_mobile_hotfix accepted/tizen/5.5/unified/20191031.023410 accepted/tizen/5.5/unified/mobile/hotfix/20201027.090248 accepted/tizen/unified/20190827.043454 accepted/tizen/unified/20190827.110619 submit/tizen/20190819.232229 submit/tizen/20190820.235609 submit/tizen/20190825.052726 submit/tizen/20190826.105051 submit/tizen/20190826.105652 submit/tizen/20190827.024510 submit/tizen/20190829.010425 submit/tizen_5.5/20191031.000004 submit/tizen_5.5_mobile_hotfix/20201026.185104 tizen_5.5.m2_release
sanghyeok.oh [Fri, 16 Aug 2019 10:21:31 +0000 (19:21 +0900)]
re-arrange code

Change-Id: Ie2f9dcde57b411bd4b84206db2c91c4cae25e1e2
Signed-off-by: sanghyeok.oh <sanghyeok.oh@samsung.com>
5 years agolibgdbus: seperate system-daemon's dbus interfaces from dbus-system.h 83/212183/1
sanghyeok.oh [Fri, 16 Aug 2019 10:20:39 +0000 (19:20 +0900)]
libgdbus: seperate system-daemon's dbus interfaces from dbus-system.h

Change-Id: I4b3ec4dedc93652d426f98eff955e725e9ea1f3e
Signed-off-by: sanghyeok.oh <sanghyeok.oh@samsung.com>
5 years agolibgdbus: change api name from broadcasting to emit 49/212149/1 accepted/tizen/unified/20190816.112239 submit/tizen/20190816.021726
sanghyeok.oh [Fri, 16 Aug 2019 01:43:27 +0000 (10:43 +0900)]
libgdbus: change api name from broadcasting to emit

"Broadcast" is ambiguous due to the ability to send both broadcast and
unicast signals.

change 'dbus_handle_broadcast_dbus_signal' to 'dbus_handle_emit_dbus_signal'

Change-Id: I5f6f25f2dc74535f7dfc091106600d722f664b50
Signed-off-by: sanghyeok.oh <sanghyeok.oh@samsung.com>
5 years agolibgdbus: modified to support unicast signal 06/212106/2 accepted/tizen/unified/20190816.112330 submit/tizen/20190311.062132 submit/tizen/20190814.105129
sanghyeok.oh [Wed, 14 Aug 2019 07:52:22 +0000 (16:52 +0900)]
libgdbus: modified to support unicast signal

Change-Id: I36085cf3d0f4e8e0fd3d78abc259b758112e9720
Signed-off-by: sanghyeok.oh <sanghyeok.oh@samsung.com>
5 years agoChange sensitivity interface to fix dbus error 01/211101/2 submit/tizen/20190730.112013
lokilee73 [Tue, 30 Jul 2019 05:16:19 +0000 (14:16 +0900)]
Change sensitivity interface to fix dbus error

Change-Id: Iefbd48ad9031388c149b5584d93c7398e5dae3d6
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
5 years agoRemove unused SYSTEMD_DBUS_SIGNAL_SYSTEM_STARTUP_FINISHED 87/208887/1
INSUN PYO [Mon, 1 Jul 2019 06:36:44 +0000 (15:36 +0900)]
Remove unused SYSTEMD_DBUS_SIGNAL_SYSTEM_STARTUP_FINISHED

Change-Id: I43f23baf7d8f159f76bc139889fceff7b8b0740a

5 years agoChange library name to libsyscommon. 75/202975/4 accepted/tizen/unified/20190412.124549 submit/tizen/20190410.090025
Yunmi Ha [Mon, 8 Apr 2019 08:33:17 +0000 (17:33 +0900)]
Change library name to libsyscommon.

- Add new function for systemd state

Change-Id: Ie69b718918306fc55e6c801e4c8d0fcaa0ab79b0
Signed-off-by: Yunmi Ha <yunmi.ha@samsung.com>
5 years agoRename systemd_stop_unit_sync() to systemd_stop_unit_wait_stopped() 70/202170/1 accepted/tizen/unified/20190326.024556 submit/tizen/20190325.102033
Hyotaek Shim [Mon, 25 Mar 2019 10:15:45 +0000 (19:15 +0900)]
Rename systemd_stop_unit_sync() to systemd_stop_unit_wait_stopped()

Change-Id: I5c8e321c84e7a54073d8830e7c810e1dae7e5210
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
5 years agoRename systemd_start_unit_sync() to systemd_start_unit_wait_started() 90/202090/4 submit/tizen/20190325.092207
Hyotaek Shim [Fri, 22 Mar 2019 11:22:45 +0000 (20:22 +0900)]
Rename systemd_start_unit_sync() to systemd_start_unit_wait_started()

Change-Id: I2064b404c8ac562b7e952ca061b2159d0bc1876f
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
5 years agoAdd .gitignore 92/202092/1
Hyotaek Shim [Fri, 22 Mar 2019 11:25:04 +0000 (20:25 +0900)]
Add .gitignore

Change-Id: I41c66209d6456a02079416c226c147720e244346
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
5 years agopower: apply modified dbus spec 29/200629/1 accepted/tizen/unified/20190311.072446 accepted/tizen/unified/20190312.113032 submit/tizen/20190305.100545 submit/tizen/20190305.120315 submit/tizen/20190306.005724 submit/tizen/20190308.023010 submit/tizen/20190311.073252
sanghyeok.oh [Wed, 27 Feb 2019 11:00:17 +0000 (20:00 +0900)]
power: apply modified dbus spec

Change-Id: I4008f782ffa43a08a67516df7f99a53421b97969
Signed-off-by: sanghyeok.oh <sanghyeok.oh@samsung.com>
5 years agoAdd Path and Interface for temperature 70/196870/2 accepted/tizen/unified/20190219.154150 accepted/tizen/unified/20190221.165807 submit/tizen/20190218.105211 submit/tizen/20190220.073046
lokilee73 [Mon, 7 Jan 2019 06:30:33 +0000 (15:30 +0900)]
Add Path and Interface for temperature

Change-Id: Icd52d21d0fa90f6367e4354598dd37b02dcc4957
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
5 years agoAdd dlog for debugging and fix build warnings 82/199282/3 accepted/tizen/unified/20190211.060148 submit/tizen/20190208.083757
lokilee73 [Fri, 8 Feb 2019 06:57:05 +0000 (15:57 +0900)]
Add dlog for debugging and fix build warnings

Change-Id: Idad13056a15185a622f51283589af7bedf5734df
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
5 years agolibgdbus: add api to start or stop systemd unit 63/197363/15 submit/tizen/20190208.064159
sanghyeok.oh [Thu, 10 Jan 2019 12:48:35 +0000 (21:48 +0900)]
libgdbus: add api to start or stop systemd unit

Change-Id: Iaa17cc32cff1b763c5ed89ddc69582f9b70e535a
Signed-off-by: sanghyeok.oh <sanghyeok.oh@samsung.com>
5 years agosensitivity: add deviced dbus node info 80/196680/1 accepted/tizen/unified/20190108.062324 submit/tizen/20190107.023946 submit/tizen/20190107.113744
sanghyeok.oh [Thu, 3 Jan 2019 11:15:17 +0000 (20:15 +0900)]
sensitivity: add deviced dbus node info

Change-Id: I5a7c4fa14e5f2a8125b5cbddbb40c5ba2ee09d65
Signed-off-by: sanghyeok.oh <sanghyeok.oh@samsung.com>
5 years agoRemove executable flag from non-executable files 75/196275/1 accepted/tizen/unified/20181231.125020 submit/tizen/20181227.070601 submit/tizen/20181231.010834 submit/tizen/20181231.070821
lokilee73 [Thu, 27 Dec 2018 02:29:12 +0000 (11:29 +0900)]
Remove executable flag from non-executable files

Change-Id: I1633ca1ff4238a4e2c833dfeb52fb751e7f88a64
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
6 years agolibgdbus: replace gdbus proxy call with g_dbus_connection_call 27/184527/2 accepted/tizen/5.0/unified/20181102.021930 accepted/tizen/unified/20180724.073404 submit/tizen/20180724.051226 submit/tizen_5.0/20181101.000004
sanghyeok.oh [Wed, 18 Jul 2018 11:15:29 +0000 (20:15 +0900)]
libgdbus: replace gdbus proxy call with g_dbus_connection_call

Replace g_dbus_proxy_call_with_unix_fd_list_sync with g_dbus_connection_call_with_unix_fd_list_sync.

gdbus proxy is heavy operation - it makes multiple dbus calls to maintain proxy feature.
This functionality is not needed to exchange fd list each other by libgdbus.

Change-Id: I5f7b87614eddfd1a79d7aa82332c97dcc5cc6069
Signed-off-by: sanghyeok.oh <sanghyeok.oh@samsung.com>
6 years agoAdd dbus_handle_method_async_pairs_with_reply 08/182208/4 accepted/tizen/unified/20180629.061543 submit/tizen/20180625.130238 submit/tizen/20180625.142706 submit/tizen/20180627.063926 submit/tizen/20180627.113622 submit/tizen/20180628.074606
lokilee73 [Thu, 21 Jun 2018 07:42:48 +0000 (16:42 +0900)]
Add dbus_handle_method_async_pairs_with_reply

dbus_handle_method_async_pairs() is just for no reply and used in deviced and storaged.
However, the function has been abnormally used and caused dbus error by unmatched signature
between deviced, storaged and system-popup.
So, it was replaced by dbus_handle_method_async_with_reply_var().

Change-Id: I5452bdb80dd52e72cc4364ff0ce1cf86490d9822
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
6 years agoRemove unused dbus path and interface 70/180670/1 submit/tizen/20180611.010039 submit/tizen/20180620.045205
pr.jung [Fri, 1 Jun 2018 02:20:13 +0000 (11:20 +0900)]
Remove unused dbus path and interface

Change-Id: I5fcfd3a6d6c86dad94522e09ceaf224ddd73c3d9
Signed-off-by: pr.jung <pr.jung@samsung.com>
6 years agolibgdbus: fix bug. pass freed memory pointer 46/177246/1 accepted/tizen/unified/20180427.062425 submit/tizen/20180426.110342
sanghyeok.oh [Thu, 26 Apr 2018 10:59:48 +0000 (19:59 +0900)]
libgdbus: fix bug. pass freed memory pointer

Change-Id: Idad7954352aa462254d4051910a3f7e6b685c1cc
Signed-off-by: sanghyeok.oh <sanghyeok.oh@samsung.com>
6 years agomake: change to cmake 20/174320/8 accepted/tizen/unified/20180411.065632 submit/tizen/20180411.045338
sanghyeok.oh [Fri, 30 Mar 2018 05:09:58 +0000 (14:09 +0900)]
make: change to cmake

Change-Id: I57979761fed3eeef223a236308c8d8e529fb5b37
Signed-off-by: sanghyeok.oh <sanghyeok.oh@samsung.com>
6 years agoRemove dbus_handle_init to solve timimg issue 64/174864/3 accepted/tizen/unified/20180406.061942 submit/tizen/20180405.024125 submit/tizen/20180405.044417 submit/tizen/20180405.051333 submit/tizen/20180405.111955
lokilee73 [Wed, 4 Apr 2018 12:31:56 +0000 (21:31 +0900)]
Remove dbus_handle_init to solve timimg issue

refactor dbus_handle_init to two parts in deviced, storaged and feedbackd.
It's to solve timing issue in deviced by AddPoweroffWait method.

Change-Id: I32246f4667dc29447037636ae9b8bf02593e36fe
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
6 years agoRemove unused Requires 37/173837/1 accepted/tizen/unified/20180329.054113 accepted/tizen/unified/20180403.060231 submit/tizen/20180327.003938 submit/tizen/20180403.011657
pr.jung [Mon, 26 Mar 2018 08:36:40 +0000 (17:36 +0900)]
Remove unused Requires

Change-Id: Id57b7a4b01698fcc2aeeaba233e96c650eec9e7a
Signed-off-by: pr.jung <pr.jung@samsung.com>
6 years agolibgdbus: Add common internal apis for gdbus 27/173827/2
pr.jung [Mon, 26 Mar 2018 07:21:32 +0000 (16:21 +0900)]
libgdbus: Add common internal apis for gdbus

Change-Id: I4522aa8771370086c4984d58ae0d95ecc110a808
Signed-off-by: pr.jung <pr.jung@samsung.com>
7 years agoInitial empty repository master
Tizen Infrastructure [Sun, 15 Jan 2017 23:13:35 +0000 (15:13 -0800)]
Initial empty repository