Youngjae Cho [Wed, 26 Jan 2022 05:34:10 +0000 (21:34 -0800)]
Change gcov object install path
Change-Id: I99381e047a1d28d5ae62590611eb0c7cef967f8b
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
(cherry picked from commit
30cab7c845d75957c5bf4b0a7226e23a556d38d2)
taemin.yeom [Mon, 10 May 2021 03:50:26 +0000 (12:50 +0900)]
Fix typo
Change-Id: I12ae3bcc3c07754faa6677447b6b79a152f1a75d
Signed-off-by: taemin.yeom <taemin.yeom@samsung.com>
Hyotaek Shim [Mon, 22 Mar 2021 07:19:07 +0000 (16:19 +0900)]
[ACR-1626] Add usb.host privilege
Change-Id: I4eb9a45c8e34449810352e7a716ea95a593aa743
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
Youngjae Cho [Thu, 1 Apr 2021 06:11:10 +0000 (15:11 +0900)]
Make gcov package
Change-Id: I09998981fddca80acb3812e129acadb00c800f41
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
INSUN PYO [Fri, 26 Mar 2021 02:07:41 +0000 (11:07 +0900)]
Add comment to usb_host_destroy()
Change-Id: Ib716a048b5d15bcdd5b5507c220261b1108cf462
lokilee73 [Thu, 17 Dec 2020 01:33:24 +0000 (10:33 +0900)]
Remove unnecessary HTML link for privilege
Change-Id: I989e7000d06d2cc9ecb37f22ad55fbd6329878ef
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
lokilee73 [Wed, 24 Jun 2020 04:32:52 +0000 (13:32 +0900)]
Remove Requires pkgconfig(capi-base-common)
capi-base-common-devel package is unnecessarily included in image.
So, remove it.
Change-Id: I74a651dce063a1502d6a8bc2f40be9685cb346e4
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
Yunmi Ha [Fri, 13 Dec 2019 02:05:23 +0000 (11:05 +0900)]
Change "developer.tizen.org" link to "docs.tizen.org"
Change-Id: Ie5e5431dbce9d6abaa468360a1b6c3411468f9fe
Signed-off-by: Yunmi Ha <yunmi.ha@samsung.com>
Youngjae Cho [Thu, 24 Oct 2019 02:54:09 +0000 (11:54 +0900)]
Fix documantation typo
Change-Id: I6d2c164a31fb82bce83014b5178dcda2145868eb
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
lokilee73 [Thu, 27 Dec 2018 02:32:49 +0000 (11:32 +0900)]
Remove executable flag from non-executable files
Change-Id: I790ea7d3590621cef9fa6ff73ac10ae95b3f775f
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
Paweł Szewczyk [Tue, 18 Dec 2018 17:54:32 +0000 (18:54 +0100)]
Check validity of API arguments
Added missing checks of pointers that can be dereferenced.
Change-Id: I217ddd993f540ad0342e984dcb25cf19d76e5842
Signed-off-by: Paweł Szewczyk <p.szewczyk@samsung.com>
INSUN PYO [Wed, 26 Sep 2018 23:38:21 +0000 (08:38 +0900)]
Add capi-base-common build and running dependency.
To build an application using usb-host, you should need <tizen.h>.
Signed-off-by: INSUN PYO <insun.pyo@samsung.com>
Change-Id: Iae51813aab9df3f6300285e215e136a224fc8292
Paweł Szewczyk [Wed, 12 Sep 2018 09:36:47 +0000 (11:36 +0200)]
Suppress unused cmake variables warning
The %cmake macro in spec file adds some definitions, which are not used
by the CMakeLists. This causes warnings, which could be confusing in
search of real problems.
This commit ignores this kind of warnings, letting exist variables that
are not used at all.
Change-Id: I08a84c7ca51ce37913475adea63f93048037553b
Signed-off-by: Paweł Szewczyk <p.szewczyk@samsung.com>
INSUN PYO [Tue, 11 Sep 2018 04:17:02 +0000 (13:17 +0900)]
Modify log message
Signed-off-by: INSUN PYO <insun.pyo@samsung.com>
Change-Id: Iacfc34bdd9ca9978d9ef6c83e35501cb2db4399c
Hyotaek Shim [Tue, 11 Sep 2018 23:49:39 +0000 (08:49 +0900)]
Minor fix on license
Change-Id: Icc9d738c677ce882d3844f4e0e244e112cafec23
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
INSUN PYO [Tue, 11 Sep 2018 22:48:14 +0000 (07:48 +0900)]
Remove build(packaging) warning.
warning: File listed twice: /usr/lib/libcapi-system-usbhost.so.0.1.0
Signed-off-by: INSUN PYO <insun.pyo@samsung.com>
Change-Id: I3c96d9b81c0b919be8e31438f2209ea5165f624e
Pawe? Szewczyk [Tue, 11 Sep 2018 11:03:41 +0000 (11:03 +0000)]
Merge "Fix race condition between usb_host_destroy and fd_removed_cb" into tizen
Paweł Szewczyk [Tue, 11 Sep 2018 10:02:25 +0000 (12:02 +0200)]
Check if interface structure is valid when getting endpoint
This prevents null-pointer dereference when interface structure is
allocated, but not properly initialized.
Change-Id: I9bf33eb06431346338668cee17a511174fc04a30
Signed-off-by: Paweł Szewczyk <p.szewczyk@samsung.com>
INSUN PYO [Tue, 11 Sep 2018 04:27:06 +0000 (13:27 +0900)]
Fix race condition between usb_host_destroy and fd_removed_cb
fd_removed_cb is called by libusb_exit() -> usbi_io_exit() -> usbi_remove_poolfd() -> ctx->fd_removed_cb.
fd_removed_cb uses context->gio_channels and context->channel_list_lock.
So, you should not free and destroy it before calling libusb_exit().
Signed-off-by: INSUN PYO <insun.pyo@samsung.com>
Change-Id: I5fdde607d19be9e4df9214489f91e3d33f41eaf6
lokilee73 [Tue, 28 Aug 2018 04:09:35 +0000 (13:09 +0900)]
Fix wrong spelling
beed -> been
submited -> submitted
isochrnous -> isochronous
Change-Id: Ib4f83ad02b4b0f8ef63e098a135e3d58929026ec
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
Michal Bloch [Tue, 14 Aug 2018 13:49:14 +0000 (15:49 +0200)]
Fix get_active_config output value
Change-Id: I99217ea37d0783774b97a62cabe1fb3f43adaf79
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
lokilee73 [Wed, 30 May 2018 06:00:42 +0000 (15:00 +0900)]
Add feature check in usb_host_transfer_set_callback
Change-Id: I42e81cd2e71441122f27ec7074150790c75e36c7
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
Paweł Szewczyk [Thu, 24 May 2018 09:44:44 +0000 (11:44 +0200)]
Exclude system errors handling from lcov
According to already existing policy, this commit excludes lines
responsible for handling errors of external (system) code from line
coverage.
Change-Id: I97a44a493e461ad188d17709ba0a366fd417fe10
Signed-off-by: Paweł Szewczyk <p.szewczyk@samsung.com>
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
Paweł Szewczyk [Thu, 24 May 2018 11:51:24 +0000 (13:51 +0200)]
Call g_source_remove when removing fd form context
Not removed glib source can cause trouble in mainloop and possible
leaks. This commit makes sure the source is removed when no longer
needed.
Change-Id: I346f9f17c1de75775b24063c3389d164e5aa6e47
Signed-off-by: Paweł Szewczyk <p.szewczyk@samsung.com>
sanghyeok.oh [Mon, 9 Apr 2018 10:33:44 +0000 (19:33 +0900)]
svace fix
Change-Id: I347ac6e7865b3a70de1c301afa942b648651ad6c
Signed-off-by: sanghyeok.oh <sanghyeok.oh@samsung.com>
Paweł Szewczyk [Fri, 7 Oct 2016 15:22:20 +0000 (17:22 +0200)]
[5.0] api: Add asynchronous transfers
Change-Id: I31b9773eee6cae0ec3cb935ef053d944cae0d619
Signed-off-by: Paweł Szewczyk <p.szewczyk@samsung.com>
Paweł Szewczyk [Wed, 28 Feb 2018 17:29:40 +0000 (18:29 +0100)]
Fix minor documentation issues
- Fixed few typos
- Moved ERROR_NONE to be the first on error list
- Removed unreturned PERMISSION_DENIED error descriptions
- Added missing INVALID_PARAMETER error description
Change-Id: I5ce5503ca05b797e748342d896919a18e012aaa1
Signed-off-by: Paweł Szewczyk <p.szewczyk@samsung.com>
lokilee73 [Mon, 5 Mar 2018 09:08:38 +0000 (18:08 +0900)]
Fix typing error
Change-Id: Idb9a2cfe20429e8c8b2f56c892dd8e58219e911e
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
Paweł Szewczyk [Fri, 3 Nov 2017 09:37:46 +0000 (10:37 +0100)]
Check if device is opened in getting active configuration
Change-Id: Ice65b6724f57d96b9af01c656a3df509a864b958
Signed-off-by: Paweł Szewczyk <p.szewczyk@samsung.com>
Youngjae Shin [Mon, 25 Sep 2017 01:56:59 +0000 (10:56 +0900)]
fix build warning
Change-Id: Ideef5a0e11e42984da3f60bde95cb110b70a78ee
Paweł Szewczyk [Thu, 22 Jun 2017 13:44:37 +0000 (15:44 +0200)]
api: Add altsetting getter
Change-Id: I5e5da4a42e1a8640987cc9fe509fc0216a1a6768
Signed-off-by: Paweł Szewczyk <p.szewczyk@samsung.com>
Paweł Szewczyk [Mon, 19 Jun 2017 09:18:19 +0000 (11:18 +0200)]
api: Add API for unconfiguring devices
Change-Id: I52d1521cd1d4e6aee0ca81c56414f8cbd68c52be
Signed-off-by: Paweł Szewczyk <p.szewczyk@samsung.com>
Paweł Szewczyk [Mon, 19 Jun 2017 11:17:33 +0000 (13:17 +0200)]
Fix geting configuration from unconfigured device
Device in unconfigured state does not have active configuration, but it
does not neccecarily means an error.
Change-Id: I90c581aed25175ff5f76140d33610a5d4b384ff6
Signed-off-by: Paweł Szewczyk <p.szewczyk@samsung.com>
lokilee73 [Wed, 24 May 2017 07:15:14 +0000 (16:15 +0900)]
Common : change string in usb_host_doc.h
Change-Id: I3add980ffd98409c4be280f77f53e18b340b3c39
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
Paweł Szewczyk [Wed, 17 May 2017 13:01:13 +0000 (15:01 +0200)]
Fix blocking libusb event handling
This patch changes libusb_handle_events to
libusb_handle_events_timeout_completed, which is non-blocking and does
not cause applications to hang.
Change-Id: Ieebfcab3ae827b158345e09c41d6c136a7ed0e18
Signed-off-by: Paweł Szewczyk <p.szewczyk@samsung.com>
Karol Lewandowski [Wed, 12 Apr 2017 10:04:42 +0000 (03:04 -0700)]
Merge "[4.0] [RFC] api: Add connected/disconnected events handling" into tizen
Paweł Szewczyk [Mon, 27 Mar 2017 10:03:40 +0000 (12:03 +0200)]
[4.0] [RFC] api: Add connected/disconnected events handling
Change-Id: If8a58e8401f6913956a5a1d88d5719a75aed2d0b
Signed-off-by: Paweł Szewczyk <p.szewczyk@samsung.com>
lokilee73 [Thu, 6 Apr 2017 04:29:54 +0000 (13:29 +0900)]
URL : apply changed URL for the document
Change-Id: Ibdc923ae567f00044c1c7ab3ca513863ebf1d24d
Signed-off-by: lokilee73 <changjoo.lee@samsung.com>
Paweł Szewczyk [Mon, 12 Dec 2016 12:54:17 +0000 (13:54 +0100)]
Restore correct coding style in usb_host.c
This commit corrects the coding style errors introduced in
commit
0da04f8ec63350ac875247f1b97b9147ba852db7.
The space before the label colon is actually prohibited and detected
by checkpatch script.
Change-Id: I707d2e9a6e40cdc27dfd684c923a2deed59fd923
Signed-off-by: Paweł Szewczyk <p.szewczyk@samsung.com>
taeyoung [Thu, 29 Dec 2016 01:54:46 +0000 (10:54 +0900)]
Merge branch 'tizen_3.0' into tizen
Signed-off-by: taeyoung <ty317.kim@samsung.com>
Change-Id: Ieb3ab4c6c8b4cfd251933507d80f9d16dc0970cb
pr.jung [Fri, 9 Dec 2016 01:35:51 +0000 (10:35 +0900)]
Apply Tizen coding rule
Change-Id: I548833719dc6748049be232b47b45111e02678ba
Signed-off-by: pr.jung <pr.jung@samsung.com>
taeyoung [Wed, 30 Nov 2016 04:18:20 +0000 (13:18 +0900)]
fix not to change the output parameter when an error occurs
Change-Id: Ic809be983c09a80a07103b5b1c5554cc48e48aba
Signed-off-by: taeyoung <ty317.kim@samsung.com>
Kunhoon Baik [Thu, 24 Nov 2016 09:08:43 +0000 (18:08 +0900)]
Fix API reference warning - several fixes
Change-Id: I6b68af3d69c620bd6f0b8081e216a2882912f7ef
taeyoung [Tue, 27 Sep 2016 09:12:42 +0000 (18:12 +0900)]
coverage: remove system error logs from the coverage test
Change-Id: I14884b4715e110e6e1c6ad2f3d51273469ad431e
Signed-off-by: taeyoung <ty317.kim@samsung.com>
taeyoung [Mon, 12 Sep 2016 10:23:40 +0000 (19:23 +0900)]
remove TIZEN_ERROR_USB_HOST
TIZEN_ERROR_USB_HOST is defined in capi-base-common.
Thus it needs to be remove from the usb-host.h
Change-Id: I008bd3f2b4c5b9e8b54d3209468406027b398a98
Signed-off-by: taeyoung <ty317.kim@samsung.com>
taeyoung [Mon, 12 Sep 2016 09:10:09 +0000 (18:10 +0900)]
remove usb_host_device_get_string_descriptor_ascii() from the api list
it can be replaced to usb_host_device_get_serial_number_str(),
usb_host_device_get_product_str(), usb_host_device_get_manufacturer_str().
Change-Id: I4bf8fd54eb3138e11e72b0ff65a56ee107356700
Signed-off-by: taeyoung <ty317.kim@samsung.com>
Paweł Szewczyk [Tue, 6 Sep 2016 16:33:10 +0000 (18:33 +0200)]
api: Fix documentation and spelling
Change-Id: I9402bb3d6c43874b32621e84920d3a50400a0a67
Signed-off-by: Paweł Szewczyk <p.szewczyk@samsung.com>
taeyoung [Mon, 5 Sep 2016 10:27:11 +0000 (19:27 +0900)]
feature: add feature check routine
- "http://tizen.org/feature/usb.host" feature is required
to use usb host apis. Thus the feature check routine is added.
Change-Id: I291bc5bfc67c8348d48edea8738c349237057a06
Signed-off-by: taeyoung <ty317.kim@samsung.com>
taeyoung [Fri, 2 Sep 2016 01:02:12 +0000 (10:02 +0900)]
common: remove unused codes
- test dir, example dir: they are not included to image.
Thus they need to be removed
- others: Unused codes should be removed
Change-Id: I7518ec23f6e64b268a6811e758761ac23ae6baa0
Signed-off-by: taeyoung <ty317.kim@samsung.com>
Paweł Szewczyk [Thu, 7 Apr 2016 13:55:29 +0000 (15:55 +0200)]
api: Switch to Tizen Native API conventions
Change-Id: I41fa22da669864b161f4d6ac8baed19d9f1916dd
Signed-off-by: Paweł Szewczyk <p.szewczyk@samsung.com>
Paweł Szewczyk [Thu, 10 Mar 2016 11:06:37 +0000 (12:06 +0100)]
tests: Add tests of asynchronous API
Change-Id: Ia090f9817c222df4c88f5dcebc81982ff7ee7679
Signed-off-by: Paweł Szewczyk <p.szewczyk@samsung.com>
Paweł Szewczyk [Mon, 7 Mar 2016 14:23:23 +0000 (15:23 +0100)]
libhusb: Add async transfer API
Change-Id: Ia1a09dfaa32e6f420eb64f3df22825e9f6349e6d
Signed-off-by: Paweł Szewczyk <p.szewczyk@samsung.com>
Paweł Szewczyk [Tue, 1 Mar 2016 15:30:11 +0000 (16:30 +0100)]
usd: Remove USD
USD functionality is moved to deviced. This code is no longer needed.
Change-Id: Iec6f46134df8070d7dafb89b19eff5571e872605
Signed-off-by: Paweł Szewczyk <p.szewczyk@samsung.com>
Michal Bloch [Mon, 26 Oct 2015 17:45:42 +0000 (18:45 +0100)]
tests: add libhusb_{get,free}_config_descriptor test
Change-Id: I910e7d899ba69b5a284a005e2b114f3a3217fc1c
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Tue, 27 Oct 2015 18:32:35 +0000 (19:32 +0100)]
tests: add a better libhusb_close test
Since libhusb_device_open_with_vid_pid creates
a device handle with the necessary properties,
i.e. containing a real libusb_device_handle, it
can be used for the libhusb_close test.
This also fixes a memory leak because the handle
was not else deallocated.
The old libhusb_close test (manual allocation
of the libusb_device_handle) stays because it
allows more flexibility as we have control over
what the libusb_device_handle contains, unlike
when using libhusb_device_open_with_vid_pid.
Change-Id: Ic2a77f458023e1e3099ff2e2623fa35730e6bebb
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Mon, 26 Oct 2015 16:43:49 +0000 (17:43 +0100)]
tests: fix libhusb_release_interface tests
The kernel driver attachment part of the
function was ignored, which would sometimes
lead to the test failing when the attachment
was called - this happened randomly because
the value was never initialized.
The simple test for libhusb_release_interface
is changed to make sure it does not check this
scenario. A new sub-test is added to do so.
The invalid arguments test is unaffected as it
never gets to the kernel driver attachment part.
Change-Id: I3628942b436940508ab5b93a76cc59b596645f2a
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Fri, 23 Oct 2015 15:50:27 +0000 (17:50 +0200)]
libhusb: fix warning spelling (helps greppability)
Make sure all failures have the same spelling.
This makes searching for errors easier, as search
for the correct word will now consistently find
all outstanding errors.
Change-Id: I8c31ff44aa8b64944923571cd41088dc4c6db53c
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Fri, 23 Oct 2015 12:10:47 +0000 (14:10 +0200)]
tests: improve transfer tests
Make transfer tests check
transferred bytes output value
returned by function
Change-Id: Id534a4d2015e49dc740054087a89168623997ba9
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Thu, 22 Oct 2015 11:08:52 +0000 (13:08 +0200)]
tests: add libhusb_{release,claim}_interface invalid param tests
Change-Id: I35eb285e7b2ca03831ec656a729b3776274f85ff
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Thu, 22 Oct 2015 10:49:17 +0000 (12:49 +0200)]
tests: add libhusb_get_string_descriptor_ascii test
Change-Id: Iacffc303ea24b1b5de528a556fb9a9f718a46687
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Mon, 19 Oct 2015 13:49:41 +0000 (15:49 +0200)]
tests: Add libhusb_close test
Change-Id: I2dbbcda98a01d053de80e39869d28e175205f6c2
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Michal Bloch [Thu, 15 Oct 2015 17:59:24 +0000 (19:59 +0200)]
tests: minor fixes
* make sure an array is always of the appropriate size
by replacing a duplicate constant with a named identifier.
* initialize tested values for a more uniform distribution.
Change-Id: I2f195b25076b119deaf64f3c17b1ab6b4dee8200
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
Pawel Szewczyk [Tue, 20 Oct 2015 11:32:55 +0000 (13:32 +0200)]
tests: Run tests in verbose mode
As reaching failed tests log while cross compiling in separate environment
is not very convienient, tests are now run in verbose mode.
Change-Id: I9a4abb73f385517b024c8d927f5de2a2884243af
Signed-off-by: Pawel Szewczyk <p.szewczyk@samsung.com>
Stanislaw Wadas [Tue, 6 Oct 2015 14:00:40 +0000 (16:00 +0200)]
tests: Add attach kernel driver test
Change-Id: I3726a098b201c02afe7db4e03abaedc9da1f0c6d
Signed-off-by: Stanislaw Wadas <s.wadas@samsung.com>
Stanislaw Wadas [Tue, 6 Oct 2015 13:53:25 +0000 (15:53 +0200)]
tests: Add detach kernel driver test
Change-Id: I395b898b7ecc9e70e7b457bb98dca9c601ab5d89
Signed-off-by: Stanislaw Wadas <s.wadas@samsung.com>
Stanislaw Wadas [Tue, 6 Oct 2015 13:45:04 +0000 (15:45 +0200)]
tests: Add kernel driver active test
Change-Id: I350eadabaaace5fa4251ad86bb6263d166492b20
Signed-off-by: Stanislaw Wadas <s.wadas@samsung.com>
Stanislaw Wadas [Tue, 6 Oct 2015 13:18:51 +0000 (15:18 +0200)]
tests: Add reset device test
Change-Id: I3ee71e6c6290d139f6d88b202577b763d2ba5d2c
Signed-off-by: Stanislaw Wadas <s.wadas@samsung.com>
Stanislaw Wadas [Tue, 6 Oct 2015 11:39:21 +0000 (13:39 +0200)]
tests: Add clear halt test
Change-Id: I1a6dc5e6cba7cd61b948c05ca6ca8cdd1df9ee7c
Signed-off-by: Stanislaw Wadas <s.wadas@samsung.com>
Stanislaw Wadas [Tue, 6 Oct 2015 10:54:16 +0000 (12:54 +0200)]
tests: Add simple interrupt transfer test
Change-Id: Ife4a5398d5a495adadbb2d0594a524c81fd0eb8a
Signed-off-by: Stanislaw Wadas <s.wadas@samsung.com>
Stanislaw Wadas [Tue, 6 Oct 2015 10:47:49 +0000 (12:47 +0200)]
tests: Add simple release interface test
Change-Id: If01ef56f508b42aaa6b3e0936593dde54d6e9d24
Signed-off-by: Stanislaw Wadas <s.wadas@samsung.com>
Stanislaw Wadas [Tue, 6 Oct 2015 09:59:09 +0000 (11:59 +0200)]
tests: Add simple bulk transfer test
Change-Id: Ie70dd75e8479306a4ee2d0140e94c40357061f4e
Signed-off-by: Stanislaw Wadas <s.wadas@samsung.com>
Stanislaw Wadas [Thu, 8 Oct 2015 08:25:31 +0000 (10:25 +0200)]
tests: Add get port numbers test
Change-Id: Ia5b4c568345f682feb78305354ef3164db805a7a
Signed-off-by: Stanislaw Wadas <s.wadas@samsung.com>
Stanislaw Wadas [Tue, 6 Oct 2015 10:15:20 +0000 (12:15 +0200)]
fix: add missing function implementation
add libhusb_get_port_numbers() implementation
Change-Id: I66199bfdf173c3f234c168ce7dc3eb7e77f46a1b
Signed-off-by: Stanislaw Wadas <s.wadas@samsung.com>
Pawel Szewczyk [Thu, 1 Oct 2015 15:02:08 +0000 (17:02 +0200)]
tests: Add control_transfer test
Change-Id: I37ab9dd661028575c4f1e8a3708d4c8112dbc2a6
Signed-off-by: Pawel Szewczyk <p.szewczyk@samsung.com>
Pawel Szewczyk [Thu, 1 Oct 2015 15:02:04 +0000 (17:02 +0200)]
tests: Add claim_interface test
Change-Id: I19f000062c02f6d1f9d96c8bbadc72f33a5b9d02
Signed-off-by: Pawel Szewczyk <p.szewczyk@samsung.com>
Pawel Szewczyk [Thu, 1 Oct 2015 12:06:46 +0000 (14:06 +0200)]
tests: Add test of set_config
Change-Id: I6d623eb2bdfb6c63f2216f20ba9b65052f92972f
Signed-off-by: Pawel Szewczyk <p.szewczyk@samsung.com>
Pawel Szewczyk [Thu, 1 Oct 2015 11:26:13 +0000 (13:26 +0200)]
tests: Add test of getting device by vid and pid
Change-Id: Ieed35e48ae50b00ae8461b52792cb1877873c1fd
Signed-off-by: Pawel Szewczyk <p.szewczyk@samsung.com>
Pawel Szewczyk [Thu, 1 Oct 2015 09:26:17 +0000 (11:26 +0200)]
tests: Build and run tests
Add tests to CMake files and add running them in packaging. Add
BUILD_TESTS flag to CMake.
Change-Id: I3d374a9b1e9a80416231acc54c1b4e59613bae5e
Signed-off-by: Pawel Szewczyk <p.szewczyk@samsung.com>
Pawel Szewczyk [Tue, 29 Sep 2015 14:08:18 +0000 (16:08 +0200)]
tests: Add get_active_config test
Change-Id: I77b0c502d708e90edf332fda6eec8dda29210aa6
Signed-off-by: Pawel Szewczyk <p.szewczyk@samsung.com>
Pawel Szewczyk [Tue, 29 Sep 2015 14:14:28 +0000 (16:14 +0200)]
tests: Add tests of api functions related to devices
Change-Id: Ia958746d202ea89844015f8bb468bde3d6bd09ff
Signed-off-by: Pawel Szewczyk <p.szewczyk@samsung.com>
Pawel Szewczyk [Thu, 24 Sep 2015 13:41:30 +0000 (15:41 +0200)]
tests: Add test of getting device list
Change-Id: Ie84a227e75093c78ab7b561a3ff0674e18bf10f4
Signed-off-by: Pawel Szewczyk <p.szewczyk@samsung.com>
Pawel Szewczyk [Thu, 24 Sep 2015 12:54:15 +0000 (14:54 +0200)]
tests: Add getting device test
Change-Id: If61331c16b98393aa93f64433a8f73da157e4a5b
Signed-off-by: Pawel Szewczyk <p.szewczyk@samsung.com>
Pawel Szewczyk [Mon, 28 Sep 2015 11:55:18 +0000 (13:55 +0200)]
tests: Add device opening test
Change-Id: I899aaac5a216fc5d62f23674b0e83f927e64fd83
Signed-off-by: Pawel Szewczyk <p.szewczyk@samsung.com>
Pawel Szewczyk [Mon, 28 Sep 2015 11:57:34 +0000 (13:57 +0200)]
tests: Add basic tests
Change-Id: I410c5e796f3e7dfd095c1b877db2dd607714d2d5
Signed-off-by: Pawel Szewczyk <p.szewczyk@samsung.com>
Pawel Szewczyk [Mon, 28 Sep 2015 11:39:42 +0000 (13:39 +0200)]
tests: Add mock implementation of libusb
Instead of using real libusb, we prepare simple mock version of the
library. It allows to control behavior of functions using cmocka,
creating environment for testing host capi.
Functions added here are mostly to be implemented with corresponding
test cases.
Change-Id: If9825c5dc2b24963cccc17ba023891b459fcf969
Signed-off-by: Pawel Szewczyk <p.szewczyk@samsung.com>
Pawel Szewczyk [Mon, 28 Sep 2015 11:33:35 +0000 (13:33 +0200)]
include: Add libhusb_internal.h
For convenience of testing, internal data structures are moved to
separate header. They are still used only internally, but can be
included in tests as well.
Change-Id: I419f155cd5c5251a716f3b8e430074309664a2e5
Signed-off-by: Pawel Szewczyk <p.szewczyk@samsung.com>
Stanislaw Wadas [Fri, 4 Sep 2015 09:31:34 +0000 (11:31 +0200)]
Save policy to file and restore from it during startup
This change is needed as USD exits if no communication is processed.
As for now, all the policy was stored in USD process memory.
Now it is necassary to save it.
As for now store the policy in /run/usb-security-daemon.
This will cause reset of policy after each device reset.
Change-Id: Id8c8c5e00944f3530333a7410bda0250681d8baf
Signed-off-by: Stanislaw Wadas <s.wadas@samsung.com>
Signed-off-by: Jan Cybulski <j.cybulski@samsung.com>
Jan Cybulski [Fri, 31 Jul 2015 13:16:47 +0000 (15:16 +0200)]
USD: Add const identifier to functions that does not alter objects
Change-Id: I78049ca207c629b6ca7b020bf382509628f474a6
Signed-off-by: Jan Cybulski <j.cybulski@samsung.com>
Jan Cybulski [Mon, 27 Jul 2015 10:18:30 +0000 (12:18 +0200)]
Add some error reports in logs
This might be useful in debugging.
Change-Id: Id516a10e539717e769923084cf06d730b577998a
Signed-off-by: Jan Cybulski <j.cybulski@samsung.com>
Jan Cybulski [Fri, 31 Jul 2015 12:57:50 +0000 (14:57 +0200)]
USD: Add service for asking user for permission
Change-Id: Idc5f9f58e2804c37466a7ad58dee92d4414d53c8
Signed-off-by: Jan Cybulski <j.cybulski@samsung.com>
Signed-off-by: Stanislaw Wadas <s.wadas@samsung.com>
Jan Cybulski [Tue, 14 Jul 2015 09:38:19 +0000 (11:38 +0200)]
USD: Add dbus thread
Add class for maintaining thread needed for dbus main loop.
Dbus communication is needed because popup mechanism used this IPC.
Change-Id: Ifd5c34dac3144906d156ad14e151f0684bfa790f
Signed-off-by: Jan Cybulski <j.cybulski@samsung.com>
Signed-off-by: Stanislaw Wadas <s.wadas@samsung.com>
Stanislaw Wadas [Thu, 3 Sep 2015 09:44:03 +0000 (11:44 +0200)]
fix: only two parameters returned by sscanf are valid
Change-Id: I3decc002f0426bd1358aa1cec1de2cc797d01619
Signed-off-by: Stanislaw Wadas <s.wadas@samsung.com>
Stanislaw Wadas [Thu, 23 Jul 2015 14:39:20 +0000 (16:39 +0200)]
Add doxygen documentation
Change-Id: Ieb67d4889d2a567ee737d5ccc1f920bbd727dfe9
Signed-off-by: Stanislaw Wadas <s.wadas@samsung.com>
Stanislaw Wadas [Tue, 28 Jul 2015 12:43:38 +0000 (14:43 +0200)]
fix to allow -DBUILD_DOC_ONLY option run properly
Change-Id: I4543eda5a655e55099c851388779952f4afc07cb
Signed-off-by: Stanislaw Wadas <s.wadas@samsung.com>
Stanislaw Wadas [Mon, 27 Jul 2015 15:45:17 +0000 (17:45 +0200)]
Fix parameter naming.
Change-Id: I47a2c2768f360c07c3166f38b8659979b633c3af
Signed-off-by: Stanislaw Wadas <s.wadas@samsung.com>
Taeyoung Kim [Wed, 29 Jul 2015 07:32:54 +0000 (16:32 +0900)]
log: add logs using dlog on libhusb apis
- When a developer uses the apis, they should check the error situation.
When the developer uses IDE, dlog will be shown by default. Thus
dlog is used to store logs of the apis
Change-Id: I279bd1b2104cff33420523141034dc20b1f0bd36
Signed-off-by: Taeyoung Kim <ty317.kim@samsung.com>
Taeyoung Kim [Fri, 24 Jul 2015 07:25:01 +0000 (16:25 +0900)]
usd-commons: add dependency for smack and systemd-daemon
- Build failure occurred on apps using libusb which uses libusd-commons
due to the linking failure. Thus the dependency is needed
Signed-off-by: Taeyoung Kim <ty317.kim@samsung.com>
Change-Id: Ie0e079a4b3eed3297c00d00f3fdc682968143de2
Taeyoung Kim [Fri, 17 Jul 2015 09:26:41 +0000 (18:26 +0900)]
example: fix example app to be built alone
- Example app (sample/test app) should be built alone
to check whether or not the library is working well.
Change-Id: I1a0f22fa5a40985703afda6d2220bb7888a944cd
Signed-off-by: Taeyoung Kim <ty317.kim@samsung.com>
Taeyoung Kim [Fri, 17 Jul 2015 09:07:53 +0000 (18:07 +0900)]
pc: add capi-system-usbhost.pc file
- PC file is necessary for other apps to use apis.
Thus capi-system-usbhost.pc is added.
- The name of the library is changed from "libhusb"
to "capi-system-usbhost". The name would not be changed
and the keyword "husb" which is used for header file and
each api is not related with the library name.
Change-Id: I5ebd6bbc7992dff85b446abd6a4e05bf0a6694fe
Signed-off-by: Taeyoung Kim <ty317.kim@samsung.com>
Taeyoung Kim [Fri, 17 Jul 2015 08:59:15 +0000 (17:59 +0900)]
example: remove example codes from the build list
- Sample (test) app should be able to be build alone.
Thus the code is removed from the CMakeLists.txt
Change-Id: I4090a0b98020b7c416c20ff370d185de79ec0fc7
Signed-off-by: Taeyoung Kim <ty317.kim@samsung.com>