+++ /dev/null
-wrt-plugins-tizen (0.2.99) unstable; urgency=low
-
- * Bug fix on Bluetooth, Push, Calendar, NFC and FileSystem
- * Git : framework/web/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.99
-
- -- Kisub Song <kisubs.song@samsung.com> Mon, 19 Nov 2012 17:25:29 +0900
-
-wrt-plugins-tizen (0.2.98) unstable; urgency=low
-
- * Bug fix on Calendar and AllShare
- * Git : framework/web/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.98
-
- -- Kisub Song <kisubs.song@samsung.com> Tue, 13 Nov 2012 22:05:56 +0900
-
-wrt-plugins-tizen (0.2.97) unstable; urgency=low
-
- * Bug fix on Calendar and Bluetooth
- * Git : framework/web/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.97
-
- -- Kisub Song <kisubs.song@samsung.com> Thu, 08 Nov 2012 16:10:22 +0900
-
-wrt-plugins-tizen (0.2.96) unstable; urgency=low
-
- * Bug fix on Messaging, TimeUtil, Filesystem, Application etc.
- * Git : framework/web/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.96
-
- -- Kisub Song <kisubs.song@samsung.com> Wed, 07 Nov 2012 20:15:31 +0900
-
-wrt-plugins-tizen (0.2.95) unstable; urgency=low
-
- * Bug fix on Application, Push, Download etc.
- * Git : framework/web/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.95
-
- -- Kisub Song <kisubs.song@samsung.com> Thu, 01 Nov 2012 18:18:59 +0900
-
-wrt-plugins-tizen (0.2.94) unstable; urgency=low
-
- * Change spec for Application
- * Git : framework/web/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.94
-
- -- Kisub Song <kisubs.song@samsung.com> Mon, 29 Oct 2012 11:22:07 +0900
-
-wrt-plugins-tizen (0.2.93) unstable; urgency=low
-
- * Bug fix on Contact
- * Git : framework/web/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.93
-
- -- Kisub Song <kisubs.song@samsung.com> Wed, 24 Oct 2012 16:08:38 +0900
-
-wrt-plugins-tizen (0.2.92) unstable; urgency=low
-
- * Bug fix on Messaging, TimeUtil and Contact
- * Git : framework/web/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.92
-
- -- Kisub Song <kisubs.song@samsung.com> Mon, 22 Oct 2012 16:45:17 +0900
-
-wrt-plugins-tizen (0.2.91) unstable; urgency=low
-
- * Bug fix on Messaging, Alarm and Contact
- * Git : framework/web/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.91
-
- -- Kisub Song <kisubs.song@samsung.com> Fri, 19 Oct 2012 18:48:45 +0900
-
-wrt-plugins-tizen (0.2.90) unstable; urgency=low
-
- * Change on Alarm
- * Git : framework/web/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.90
-
- -- Kisub Song <kisubs.song@samsung.com> Thu, 11 Oct 2012 15:37:52 +0900
-
-wrt-plugins-tizen (0.2.89) unstable; urgency=low
-
- * Bug fix on Messaging.
- * Git : framework/web/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.89
-
- -- Kisub Song <kisubs.song@samsung.com> Tue, 09 Oct 2012 21:10:40 +0900
-
-wrt-plugins-tizen (0.2.88) unstable; urgency=low
-
- * Bug fix on MediaContent, SecureElement, Messaging and Application.
- * Git : framework/web/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.88
-
- -- Kisub Song <kisubs.song@samsung.com> Fri, 05 Oct 2012 13:51:51 +0900
-
-wrt-plugins-tizen (0.2.87) unstable; urgency=low
-
- * Bug fix on Messaging, Time, NFC, SystemInfo, MediaContent etc.
- * Git : framework/web/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.87
-
- -- Kisub Song <kisubs.song@samsung.com> Thu, 27 Sep 2012 22:05:11 +0900
-
-wrt-plugins-tizen (0.2.86) unstable; urgency=low
-
- * Bug fix on Contact and TimeUtil
- * Git : framework/web/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.86
-
- -- Taehee Lee <th219.lee@samsung.com> Sat, 22 Sep 2012 16:51:01 +0900
-
-wrt-plugins-tizen (0.2.85) unstable; urgency=low
-
- * Bug fix on Application
- * Git : framework/web/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.85
-
- -- Dongjin Choi <milkelf.choi@samsung.com> Sun, 16 Sep 2012 15:20:42 +0900
-
-wrt-plugins-tizen (0.2.84) unstable; urgency=low
-
- * Bug fix on Application
- * Git : framework/web/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.84
-
- -- Kisub Song <kisubs.song@samsung.com> Sat, 15 Sep 2012 23:14:41 +0900
-
-wrt-plugins-tizen (0.2.83) unstable; urgency=low
-
- * Bug fix on Application
- * Git : framework/web/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.83
-
- -- Kisub Song <kisubs.song@samsung.com> Wed, 12 Sep 2012 09:29:30 +0900
-
-wrt-plugins-tizen (0.2.82) unstable; urgency=low
-
- * Bug fix on Calendar and TimeUtil
- * Git : framework/web/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.82
-
- -- Kisub Song <kisubs.song@samsung.com> Tue, 11 Sep 2012 18:29:57 +0900
-
-wrt-plugins-tizen (0.2.81) unstable; urgency=low
-
- * Bug fix on Device, Contact
- * git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.81
-
- -- Siwoo Lee <siwoo0.lee@samsung.com> Sat, 08 Sep 2012 16:41:49 +0900
-
-wrt-plugins-tizen (0.2.80) unstable; urgency=low
-
- * Bug fix on Systeminfo
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.80
-
- -- Kisub Song <kisubs.song@samsung.com> Fri, 07 Sep 2012 16:39:48 +0900
-
-wrt-plugins-tizen (0.2.79) unstable; urgency=low
-
- * Bug fix on MediaContent
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.79
-
- -- Kisub Song <kisubs.song@samsung.com> Thu, 06 Sep 2012 13:57:59 +0900
-
-wrt-plugins-tizen (0.2.78) unstable; urgency=low
-
- * Bug fix on LBS, Time and Alarm
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.78
-
- -- Kisub Song <kisubs.song@samsung.com> Wed, 05 Sep 2012 22:42:24 +0900
-
-wrt-plugins-tizen (0.2.77) unstable; urgency=low
-
- * Bug fix on Power and MediaContent
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.77
-
- -- Kisub Song <kisubs.song@samsung.com> Tue, 04 Sep 2012 13:57:20 +0900
-
-wrt-plugins-tizen (0.2.76) unstable; urgency=low
-
- * Bug fix on Power and MediaContent
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.76
-
- -- Kisub Song <kisubs.song@samsung.com> Mon, 03 Sep 2012 21:50:35 +0900
-
-wrt-plugins-tizen (0.2.75) unstable; urgency=low
-
- * Bug fix on Messaging, Download, Systeminfo and Contact
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.75
-
- -- Kisub Song <kisubs.song@samsung.com> Sat, 01 Sep 2012 00:10:05 +0900
-
-wrt-plugins-tizen (0.2.74) unstable; urgency=low
-
- * Bug fix on Messaging
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.74
-
- -- Kisub Song <kisubs.song@samsung.com> Wed, 29 Aug 2012 10:59:18 +0900
-
-wrt-plugins-tizen (0.2.73) unstable; urgency=low
-
- * Bug fix on Messaging
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.73
-
- -- Kisub Song <kisubs.song@samsung.com> Tue, 28 Aug 2012 18:37:01 +0900
-
-wrt-plugins-tizen (0.2.72) unstable; urgency=low
-
- * Bug fix on Messaging, Notification, Alarm, LBS and Contact
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.72
-
- -- Kisub Song <kisubs.song@samsung.com> Mon, 27 Aug 2012 19:36:19 +0900
-
-wrt-plugins-tizen (0.2.71) unstable; urgency=low
-
- * Bug fix on Messaging, Calendar, Notification, Download, Contact, Filesystem and Application
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.71
-
- -- Kisub Song <kisubs.song@samsung.com> Fri, 24 Aug 2012 23:17:34 +0900
-
-wrt-plugins-tizen (0.2.70) unstable; urgency=low
-
- * Bug fix on MediaContent, Application, Device and SystemInfo
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.70
-
- -- Kisub Song <kisubs.song@samsung.com> Thu, 23 Aug 2012 18:38:20 +0900
-
-wrt-plugins-tizen (0.2.69) unstable; urgency=low
-
- * Fix Call, Notification, Messaging, Device, Application, Alarm, LBS and
- Download Bug
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.69
-
- -- Kisub Song <kisubs.song@samsung.com> Wed, 22 Aug 2012 18:23:37 +0900
-
-wrt-plugins-tizen (0.2.68) unstable; urgency=low
-
- * Fix Messaging, Alarm and Contact
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.68
-
- -- Kisub Song <kisubs.song@samsung.com> Mon, 20 Aug 2012 20:18:55 +0900
-
-wrt-plugins-tizen (0.2.67) unstable; urgency=low
-
- * Fix Systeminfo bug
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.67
-
- -- Si-Woo Lee <siwoo0.lee@samsung.com> Fri, 17 Aug 2012 23:13:07 +0900
-
-wrt-plugins-tizen (0.2.66) unstable; urgency=low
-
- * Fix Download, Messaging, Calendar bug
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.65
-
- -- Taehee Lee <th219.lee@samsung.com> Fri, 17 Aug 2012 21:41:47 +0900
-
-wrt-plugins-tizen (0.2.65) unstable; urgency=low
-
- * Fix Messaging bug
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.65
-
- -- Kisub Song <kisubs.song@samsung.com> Fri, 17 Aug 2012 01:05:46 +0900
-
-wrt-plugins-tizen (0.2.64) unstable; urgency=low
-
- * Fix MediaContent bug
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.64
-
- -- Kisub Song <kisubs.song@samsung.com> Thu, 16 Aug 2012 23:45:14 +0900
-
-wrt-plugins-tizen (0.2.63) unstable; urgency=low
-
- * Fix Messaging, Contact, MediaContent, Download and Power bug
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.63
-
- -- Kisub Song <kisubs.song@samsung.com> Thu, 16 Aug 2012 22:41:06 +0900
-
-wrt-plugins-tizen (0.2.62) unstable; urgency=low
-
- * Fix Messaging, Calendar and Download bug
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.62
-
- -- Kisub Song <kisubs.song@samsung.com> Tue, 14 Aug 2012 19:49:53 +0900
-
-wrt-plugins-tizen (0.2.61) unstable; urgency=low
-
- * Fix Systeminfo bug
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.61
-
- -- Kisub Song <kisubs.song@samsung.com> Mon, 13 Aug 2012 22:56:16 +0900
-
-wrt-plugins-tizen (0.2.60) unstable; urgency=low
-
- * Fix MediaContent bug, and etc.
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.60
-
- -- Kisub Song <kisubs.song@samsung.com> Fri, 10 Aug 2012 20:31:03 +0900
-
-wrt-plugins-tizen (0.2.59) unstable; urgency=low
-
- * Change dependency to ewebkit2 fro ewebkit
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.59
-
- -- Kisub Song <kisubs.song@samsung.com> Thu, 09 Aug 2012 17:01:09 +0900
-
-wrt-plugins-tizen (0.2.58) unstable; urgency=low
-
- * Fix Application and Download bug
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.58
-
- -- Kisub Song <kisubs.song@samsung.com> Wed, 08 Aug 2012 18:35:39 +0900
-
-wrt-plugins-tizen (0.2.57) unstable; urgency=low
-
- * Apply new telephony API
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.57
-
- -- Kisub Song <kisubs.song@samsung.com> Wed, 08 Aug 2012 16:32:52 +0900
-
-wrt-plugins-tizen (0.2.56) unstable; urgency=low
-
- * Apply new email-service API. Apply new appID policy.
- * Bug fix on Systeminfo, MediaContent
- * Initial commit for Notification
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.56
-
- -- Kisub Song <kisubs.song@samsung.com> Wed, 08 Aug 2012 10:02:01 +0900
-
-wrt-plugins-tizen (0.2.55) unstable; urgency=low
-
- * Remove AllShare
- * Apply new msg-service API
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.55
-
- -- Kisub Song <kisubs.song@samsung.com> Tue, 07 Aug 2012 14:01:19 +0900
-
-wrt-plugins-tizen (0.2.54) unstable; urgency=low
-
- * Bug fix Call, Application and Messaging
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.54
-
- -- Dongjin Choi <milkelf.choi@samsung.com> Fri, 03 Aug 2012 17:56:57 +0900
-
-wrt-plugins-tizen (0.2.53) unstable; urgency=low
-
- * Bug fix on SecureElement, Filesystem, Systeminfo and Application
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.53
-
- -- Kisub Song <kisubs.song@samsung.com> Tue, 31 Jul 2012 18:33:27 +0900
-
-wrt-plugins-tizen (0.2.52) unstable; urgency=low
-
- * Bug fix on Bluetoot, NFC, Calendar, Messaging and Application
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.52
-
- -- Kisub Song <kisubs.song@samsung.com> Thu, 26 Jul 2012 19:29:27 +0900
-
-wrt-plugins-tizen (0.2.51) unstable; urgency=low
-
- * Bug fix on NFC, Systeminfo and MediaContent
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.51
-
- -- Kisub Song <kisubs.song@samsung.com> Mon, 23 Jul 2012 21:01:54 +0900
-
-wrt-plugins-tizen (0.2.50) unstable; urgency=low
-
- * Bug fix on Power, Application, Calendar, Call and SystemInfo
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.50
-
- -- Kisub Song <kisubs.song@samsung.com> Thu, 19 Jul 2012 11:59:16 +0900
-
-wrt-plugins-tizen (0.2.49) unstable; urgency=low
-
- * Bug fix on Contact, Alarm, Application, NFC and MediaContent
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.49
-
- -- Kisub Song <kisubs.song@samsung.com> Tue, 17 Jul 2012 21:46:22 +0900
-
-wrt-plugins-tizen (0.2.48) unstable; urgency=low
-
- * Bug fix on Calendar
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.48
-
- -- Kisub Song <kisubs.song@samsung.com> Mon, 09 Jul 2012 17:31:38 +0900
-
-wrt-plugins-tizen (0.2.47) unstable; urgency=low
-
- * Application, Calendar, Systeminfo update
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.47
-
- -- Kisub Song <kisubs.song@samsung.com> Fri, 06 Jul 2012 09:14:45 +0900
-
-wrt-plugins-tizen (0.2.46) unstable; urgency=low
-
- * Fix Calendar and Contact
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.46
-
- -- Kisub Song <kisubs.song@samsung.com> Wed, 04 Jul 2012 13:45:56 +0900
-
-wrt-plugins-tizen (0.2.45) unstable; urgency=low
-
- * Apply new calendar api.
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.45
-
- -- Kisub Song <kisubs.song@samsung.com> Mon, 02 Jul 2012 11:48:13 +0900
-
-wrt-plugins-tizen (0.2.44) unstable; urgency=low
-
- * Systeminfo, Messaging, POI, Power, Filesystem etc. Spec changed.
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.44
-
- -- Kisub Song <kisubs.song@samsung.com> Tue, 26 Jun 2012 17:28:54 +0900
-
-wrt-plugins-tizen (0.2.43) unstable; urgency=low
-
- * NFC, Bluetooth, Calendar Bug fix
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.43
-
-
- -- Sangtai Kim <sangtai.kim@samsung.com> Thu, 21 Jun 2012 13:42:44 +0900
-
-wrt-plugins-tizen (0.2.42) unstable; urgency=low
-
- * Remove unresolved symbols.
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.42
-
- -- Kisub Song <kisubs.song@samsung.com> Mon, 04 Jun 2012 16:32:16 +0900
-
-wrt-plugins-tizen (0.2.41) unstable; urgency=low
-
- * Contact, Application, AllShare bug fix
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.41
-
- -- Kisub Song <kisubs.song@samsung.com> Thu, 31 May 2012 23:11:59 +0900
-
-wrt-plugins-tizen (0.2.40) unstable; urgency=low
-
- * Minor version update
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.40
-
- -- Kisub Song <kisubs.song@samsung.com> Fri, 25 May 2012 14:26:25 +0900
-
-wrt-plugins-tizen (0.2.39) unstable; urgency=low
-
- * Allshare, Messaging, Time bug fix
- * Apply WRT API change for iframe
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.39
-
- -- Kisub Song <kisubs.song@samsung.com> Thu, 24 May 2012 18:05:21 +0900
-
-wrt-plugins-tizen (0.2.38) unstable; urgency=low
-
- * SecureStorage, Calendar, Messaging changed
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.38
-
- -- Sangtai Kim <sangtai.kim@samsung.com> Mon, 21 May 2012 09:11:25 +0900
-
-wrt-plugins-tizen (0.2.37) unstable; urgency=low
-
- * add Allshare Module. Fix scheem callback bug
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.37
-
- -- Sangtai Kim <sangtai.kim@samsung.com> Mon, 14 May 2012 16:50:23 +0900
-
-wrt-plugins-tizen (0.2.36) unstable; urgency=low
-
- * Application, Messaging, Alarm Bugfix
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.36
-
- -- Sangtai Kim <sangtai.kim@samsung.com> Thu, 10 May 2012 17:15:42 +0900
-
-wrt-plugins-tizen (0.2.35) unstable; urgency=low
-
- * Scheme callback function changed - orientation, application exit
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.35
-
-
- -- Sangtai Kim <sangtai.kim@samsung.com> Mon, 07 May 2012 16:07:22 +0900
-
-wrt-plugins-tizen (0.2.34) unstable; urgency=low
-
- * Messaging Bug fix
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.34
-
- -- Kisub Song <kisubs.song@samsung.com> Fri, 04 May 2012 16:14:14 +0900
-
-wrt-plugins-tizen (0.2.33) unstable; urgency=low
-
- * [Calendar&Filter] Fix timezone conversion bugs: all time values converted from JS layer is based on UTC.
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.33
-
-
- -- Sangtai Kim <sangtai.kim@samsung.com> Thu, 03 May 2012 15:16:49 +0900
-
-wrt-plugins-tizen (0.2.32) unstable; urgency=low
-
- * Calendar, Contact Bug fix
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.32
-
- -- Sangtai Kim <sangtai.kim@samsung.com> Thu, 26 Apr 2012 18:25:11 +0900
-
-wrt-plugins-tizen (0.2.31) unstable; urgency=low
-
- * NFC Bug fix
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.31
-
-
-
- -- Sangtai Kim <sangtai.kim@samsung.com> Mon, 23 Apr 2012 18:29:52 +0900
-
-wrt-plugins-tizen (0.2.30) unstable; urgency=low
-
- * Fix Message build break
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.30
-
-
- -- Sangtai Kim <sangtai.kim@samsung.com> Mon, 23 Apr 2012 17:04:31 +0900
-
-wrt-plugins-tizen (0.2.29) unstable; urgency=low
-
- * Fix Application module bug
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.29
-
- -- Sangtai Kim <sangtai.kim@samsung.com> Sun, 22 Apr 2012 20:15:07 +0900
-
-wrt-plugins-tizen (0.2.28) unstable; urgency=low
-
- * Fix bug on BT, Calendar, Messaging and NFC
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.28
-
- -- Kisub Song <kisubs.song@samsung.net> Sat, 21 Apr 2012 19:48:50 +0900
-
-wrt-plugins-tizen (0.2.27) unstable; urgency=low
-
- * Bug patch for Calendar API
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.27
-
- -- Kisub Song <kisubs.song@samsung.com> Fri, 20 Apr 2012 16:49:49 +0900
-
-wrt-plugins-tizen (0.2.26) unstable; urgency=low
-
- * Apply API change on calendar-svc
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.26
-
- -- Kisub Song <kisubs.song@samsung.com> Fri, 20 Apr 2012 14:44:32 +0900
-
-wrt-plugins-tizen (0.2.25) unstable; urgency=low
-
- * Fix bug on MediaContent
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.25
-
- -- Kisub Song <kisubs.song@samsung.com> Thu, 19 Apr 2012 16:44:55 +0900
-
-wrt-plugins-tizen (0.2.24) unstable; urgency=low
-
- * Fix bug on MediaContent and Sensor
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.24
-
- -- Kisub Song <kisubs.song@samsung.com> Thu, 19 Apr 2012 14:59:55 +0900
-
-wrt-plugins-tizen (0.2.23) unstable; urgency=low
-
- * Fix bug on Filesystem and Call
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.23
-
- -- Kisub Song <kisubs.song@samsung.com> Mon, 16 Apr 2012 22:43:00 +0900
-
-wrt-plugins-tizen (0.2.22) unstable; urgency=low
-
- * Fix TC Bug on Contact, Calendar and Geocoder
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.22
-
- -- Kisub Song <kisubs.song@samsung.com> Mon, 16 Apr 2012 18:42:19 +0900
-
-wrt-plugins-tizen (0.2.21) unstable; urgency=low
-
- * Raise version for public merge
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.21
-
- -- Kisub Song <kisubs.song@samsung.com> Thu, 12 Apr 2012 19:20:34 +0900
-
-wrt-plugins-tizen (0.2.20) unstable; urgency=low
-
- * Bug fix on Calendar and Filesystem
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.20
-
- -- Kisub Song <kisubs.song@samsung.com> Thu, 12 Apr 2012 16:36:40 +0900
-
-wrt-plugins-tizen (0.2.19) unstable; urgency=low
-
- * NFC, Calendar, MediaContents bugfix
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.19
-
- -- Sangtai Kim <sangtai.kim@samsung.com> Mon, 09 Apr 2012 15:12:23 +0900
-
-wrt-plugins-tizen (0.2.18) unstable; urgency=low
-
- * Bug fix on NFC
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.18
-
- -- Kisub Song <kisubs.song@samsung.com> Fri, 06 Apr 2012 13:44:40 +0900
-
-wrt-plugins-tizen (0.2.17) unstable; urgency=low
-
- * Bug fix on Application and Calendar
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.17
-
- -- Kisub Song <kisubs.song@samsung.com> Fri, 06 Apr 2012 13:27:41 +0900
-
-wrt-plugins-tizen (0.2.16) unstable; urgency=low
-
- * Change WebAPIError
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.16
-
- -- Kisub Song <kisubs.song@samsung.com> Thu, 05 Apr 2012 17:12:29 +0900
-
-wrt-plugins-tizen (0.2.15) unstable; urgency=low
-
- * Apply spec change on NFC
- * Bug fix on Filesystem, Systeminfo and Application
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.15
-
- -- Kisub Song <kisubs.song@samsung.com> Thu, 05 Apr 2012 15:08:18 +0900
-
-wrt-plugins-tizen (0.2.14) unstable; urgency=low
-
- * Bug fix on Calendar.
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.14
-
- -- Kisub Song <kisubs.song@samsung.com> Wed, 04 Apr 2012 16:54:51 +0900
-
-wrt-plugins-tizen (0.2.13) unstable; urgency=low
-
- * Bug fix on NFC, Messaging, Bluetooth, MediaContent
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.13
-
- -- Kisub Song <kisubs.song@samsung.com> Tue, 03 Apr 2012 12:21:53 +0900
-
-wrt-plugins-tizen (0.2.12) unstable; urgency=low
-
- * Contact, Calendar, Geocoder bug fix.
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.12
-
- -- Kisub Song <kisubs.song@samsung.com> Tue, 03 Apr 2012 00:05:59 +0900
-
-wrt-plugins-tizen (0.2.11) unstable; urgency=low
-
- * POI, SystemInfo bug fix.
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.11
-
- -- Kisub Song <kisubs.song@samsung.com> Fri, 30 Mar 2012 14:48:39 +0900
-
-wrt-plugins-tizen (0.2.10) unstable; urgency=low
-
- * Bug fix - Bluetooth, POI
- * Remove PendingOperation
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.10
-
- -- Kisub Song <kisubs.song@samsung.com> Thu, 29 Mar 2012 15:59:32 +0900
-
-wrt-plugins-tizen (0.2.9) unstable; urgency=low
-
- * Messaging error fix.
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.9
-
- -- Kisub Song <kisubs.song@samsung.com> Wed, 28 Mar 2012 16:44:48 +0900
-
-wrt-plugins-tizen (0.2.8) unstable; urgency=low
-
- * Remove Account code from Call
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.8
-
- -- Kisub Song <kisubs.song@samsung.com> Wed, 28 Mar 2012 15:42:33 +0900
-
-wrt-plugins-tizen (0.2.7) unstable; urgency=low
-
- * NFC, MediaContent applied new API style.
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.7
-
- -- Kisub Song <kisubs.song@samsung.com> Wed, 28 Mar 2012 13:46:22 +0900
-
-wrt-plugins-tizen (0.2.6) unstable; urgency=low
-
- * POI Changed
- * Apply new API styles
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.6
-
- -- Kisub Song <kisubs.song@samsung.com> Mon, 26 Mar 2012 22:47:36 +0900
-
-wrt-plugins-tizen (0.2.5) unstable; urgency=low
-
- * Update Test Cases
- * Bug fix
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.5
-
- -- Kisub Song <kisubs.song@samsung.com> Mon, 26 Mar 2012 12:03:53 +0900
-
-wrt-plugins-tizen (0.2.4) unstable; urgency=low
-
- * NFC undated
- * Argument checking rule changed
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.4
-
- -- Kisub Song <kisubs.song@samsung.com> Fri, 23 Mar 2012 13:19:16 +0900
-
-wrt-plugins-tizen (0.2.3) unstable; urgency=low
-
- * Messaging, Time bug fix
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.3
-
- -- Sangtai Kim <sangtai.kim@samsung.com> Wed, 21 Mar 2012 15:24:57 +0900
-
-wrt-plugins-tizen (0.2.2) unstable; urgency=low
-
- * LBS, Messaging bug fix
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.2
-
-
- -- Sangtai Kim <sangtai.kim@samsung.com> Tue, 20 Mar 2012 14:05:13 +0900
-
-wrt-plugins-tizen (0.2.1) unstable; urgency=low
-
- * Change APIs to SEC style
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.1
-
-
- -- Taehee Lee <th219.lee@samsung.com> Fri, 16 Mar 2012 22:54:12 +0900
-
-wrt-plugins-tizen (0.2.0-20) unstable; urgency=low
-
- * Change APIs to SEC style
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.0-20
-
- -- Sangtai Kim <sangtai.kim@samsung.com> Thu, 15 Mar 2012 11:11:57 +0900
-
-wrt-plugins-tizen (0.2.0-19) unstable; urgency=low
-
- * Apply changed interfaces regarding plugins start function and security check
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.0-19
-
-
- -- Sangtai Kim <sangtai.kim@samsung.com> Wed, 14 Mar 2012 16:46:13 +0900
-
-wrt-plugins-tizen (0.2.0-18) unstable; urgency=low
-
- * fix NFC Build error
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.0-18
-
-
- -- Sangtai Kim <sangtai.kim@samsung.com> Tue, 13 Mar 2012 10:48:47 +0900
-
-wrt-plugins-tizen (0.2.0-17) unstable; urgency=low
-
- * Call, Calendar bug fix
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.0-17
-
-
- -- Sangtai Kim <sangtai.kim@samsung.com> Fri, 02 Mar 2012 15:41:29 +0900
-
-wrt-plugins-tizen (0.2.0-16) unstable; urgency=low
-
- * fix build error. change dpl-efl dependency version
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.0-16
-
-
- -- Sangtai Kim <sangtai.kim@samsung.com> Wed, 29 Feb 2012 14:55:06 +0900
-
-wrt-plugins-tizen (0.2.0-15) unstable; urgency=low
-
- * Filesystem, Messaging, Mediacontents bug fix
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.0-15
-
-
- -- Sangtai Kim <sangtai.kim@samsung.com> Tue, 28 Feb 2012 19:19:46 +0900
-
-wrt-plugins-tizen (0.2.0-14) unstable; urgency=low
-
- * Apply wrt chages. remove plugins APIs
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.0-14
-
- -- Sangtai Kim <sangtai.kim@samsung.com> Mon, 27 Feb 2012 11:09:30 +0900
-
-wrt-plugins-tizen (0.2.0-13) unstable; urgency=low
-
- * Alarm bug fix
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.0-13
-
-
- -- Sangtai Kim <sangtai.kim@samsung.com> Fri, 24 Feb 2012 10:23:20 +0900
-
-wrt-plugins-tizen (0.2.0-12) unstable; urgency=low
-
- * Messaging and Calendar bug fix
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.0-12
-
-
- -- Sangtai Kim <sangtai.kim@samsung.com> Thu, 23 Feb 2012 15:07:02 +0900
-
-wrt-plugins-tizen (0.2.0-11) unstable; urgency=low
-
- * Systeminfo bug fix
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.0-11
-
-
- -- Sangtai Kim <sangtai.kim@samsung.com> Wed, 22 Feb 2012 19:16:34 +0900
-
-wrt-plugins-tizen (0.2.0-10) unstable; urgency=low
-
- * Callhistory bug fix
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.0-10
-
-
- -- Sangtai Kim <sangtai.kim@samsung.com> Wed, 22 Feb 2012 16:13:04 +0900
-
-wrt-plugins-tizen (0.2.0-9) unstable; urgency=low
-
- * Rangefilter bug fix
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.0-9
-
-
- -- Sangtai Kim <sangtai.kim@samsung.com> Wed, 22 Feb 2012 15:20:31 +0900
-
-wrt-plugins-tizen (0.2.0-8) unstable; urgency=low
-
- * Fix calendar build error
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.0-8
-
-
- -- Sangtai Kim <sangtai.kim@samsung.com> Wed, 22 Feb 2012 13:55:22 +0900
-
-wrt-plugins-tizen (0.2.0-7) unstable; urgency=low
-
- * applied Messaging service new API & function
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.0-7
-
-
- -- Sangtai Kim <sangtai.kim@samsung.com> Tue, 21 Feb 2012 17:44:20 +0900
-
-wrt-plugins-tizen (0.2.0-6) unstable; urgency=low
-
- * Application bug fix
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.0-6
-
-
- -- Sangtai Kim <sangtai.kim@samsung.com> Tue, 21 Feb 2012 17:39:08 +0900
-
-wrt-plugins-tizen (0.2.0-5) unstable; urgency=low
-
- * fix Calendar error
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.0-5
-
-
- -- Sangtai Kim <sangtai.kim@samsung.com> Tue, 21 Feb 2012 12:01:28 +0900
-
-wrt-plugins-tizen (0.2.0-4) unstable; urgency=low
-
- * Contact, Call, MediaContent bug fix
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.0-4
-
-
- -- Sangtai Kim <sangtai.kim@samsung.com> Tue, 21 Feb 2012 10:38:25 +0900
-
-wrt-plugins-tizen (0.2.0-3) unstable; urgency=low
-
- * update call api
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.0-3
-
-
- -- Sangtai Kim <sangtai.kim@samsung.com> Fri, 17 Feb 2012 20:31:20 +0900
-
-wrt-plugins-tizen (0.2.0-2) unstable; urgency=low
-
- * Add new Mediacontents APIs, Change createJSObject function to public
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.0-2
-
-
- -- Sangtai Kim <sangtai.kim@samsung.com> Fri, 17 Feb 2012 16:28:39 +0900
-
-wrt-plugins-tizen (0.2.0-1) unstable; urgency=low
-
- * Seperate common files to independent module
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.0-1
-
- -- Sangtai Kim <sangtai.kim@samsung.com> Thu, 16 Feb 2012 12:19:32 +0900
-
-wrt-plugins-tizen (0.2.0-0) unstable; urgency=low
-
- * prepare beta release
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.2.0-0
-
-
- -- Sangtai Kim <sangtai.kim@samsung.com> Fri, 03 Feb 2012 16:37:23 +0900
-
-wrt-plugins-tizen (0.1.2-16) unstable; urgency=low
-
- * wrt chanaging apply
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.1.2-16
-
-
- -- Sangtai Kim <sangtai.kim@samsung.com> Thu, 02 Feb 2012 17:50:39 +0900
-
-wrt-plugins-tizen (0.1.2-15) unstable; urgency=low
-
- * add Acount module, Message bug fix
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.1.2-15
-
-
- -- Sangtai Kim <sangtai.kim@samsung.com> Thu, 02 Feb 2012 10:46:56 +0900
-
-wrt-plugins-tizen (0.1.2-14) unstable; urgency=low
-
- * wrt-common changing apply
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.1.2-14
-
-
- -- Sangtai Kim <sangtai.kim@samsung.com> Fri, 27 Jan 2012 17:39:02 +0900
-
-wrt-plugins-tizen (0.1.2-13) unstable; urgency=low
-
- * wrt-plugins-common changing apply
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.1.2-13
-
- -- Sangtai Kim <sangtai.kim@samsung.com> Mon, 16 Jan 2012 20:18:12 +0900
-
-wrt-plugins-tizen (0.1.2-12) unstable; urgency=low
-
- * apply msg-service changing
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.1.2-12
-
- -- Sangtai Kim <sangtai.kim@samsung.com> Thu, 12 Jan 2012 18:48:27 +0900
-
-wrt-plugins-tizen (0.1.2-11) oneiric; urgency=low
-
- * Contact photoURI bug fix
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.1.2-11
-
- -- Taehee Lee <th219.lee@samsung.com> Fri, 06 Jan 2012 19:02:29 +0900
-
-wrt-plugins-tizen (0.1.2-10) unstable; urgency=low
-
- * Application, Contact bug fix. UnitTest update
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.1.2-10
-
- -- Sangtai Kim <sangtai.kim@samsung.com> Thu, 05 Jan 2012 13:50:04 +0900
-
-wrt-plugins-tizen (0.1.2-9) unstable; urgency=low
-
- * Calendar bug fix
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.1.2-9
-
- -- Sangtai Kim <sangtai.kim@samsung.com> Thu, 29 Dec 2011 17:51:34 +0900
-
-wrt-plugins-tizen (0.1.2-8) unstable; urgency=low
-
- * Canlendar, Application, NFC bug fix
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.1.2-8
-
- -- Sangtai Kim <sangtai.kim@samsung.com> Wed, 28 Dec 2011 19:04:55 +0900
-
-wrt-plugins-tizen (0.1.2-7) unstable; urgency=low
-
- * Sensor, Message, NFC, bug fix and enable FileSystem
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.1.2-7
-
-
- -- Sangtai Kim <sangtai.kim@samsung.com> Tue, 27 Dec 2011 14:43:01 +0900
-
-wrt-plugins-tizen (0.1.2-6) unstable; urgency=low
-
- * Bluetooth bug fix
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.1.2-6
-
-
- -- Sangtai Kim <sangtai.kim@samsung.com> Fri, 23 Dec 2011 11:53:23 +0900
-
-wrt-plugins-tizen (0.1.2-5) unstable; urgency=low
-
- * NFC, Message, Bluetooth bug fix
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.1.2-5
-
-
- -- Sangtai Kim <sangtai.kim@samsung.com> Thu, 22 Dec 2011 17:15:00 +0900
-
-wrt-plugins-tizen (0.1.2-4) unstable; urgency=low
-
- * Contact, Filesystem bug fix
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.1.2-4
-
-
- -- Sangtai Kim <sangtai.kim@samsung.com> Wed, 21 Dec 2011 19:04:21 +0900
-
-wrt-plugins-tizen (0.1.2-3) unstable; urgency=low
-
- * NFC, Messaging, Time bug fix
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.1.2-3
-
-
- -- Sangtai Kim <sangtai.kim@samsung.com> Tue, 20 Dec 2011 17:45:38 +0900
-
-wrt-plugins-tizen (0.1.2-2) unstable; urgency=low
-
- * add acount features property
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.1.2-2
-
-
- -- Sangtai Kim <sangtai.kim@samsung.com> Tue, 20 Dec 2011 10:42:58 +0900
-
-wrt-plugins-tizen (0.1.2-1) unstable; urgency=low
-
- * Enable Sensor module
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.1.2-1
-
-
- -- Sangtai Kim <sangtai.kim@samsung.com> Mon, 19 Dec 2011 16:31:25 +0900
-
-wrt-plugins-tizen (0.1.2-0) unstable; urgency=low
-
- * first private package
- * Git : slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.1.2-0
-
-
- -- Sangtai Kim <sangtai.kim@samsung.com> Mon, 19 Dec 2011 10:48:25 +0900
-
-wrt-plugins-tizen (0.1.1-5) unstable; urgency=low
-
- * apply wrt name changing
- * Git : 165.213.180.234:slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.1.1-5
-
-
- -- Sangtai Kim <sangtai.kim@samsung.com> Thu, 08 Dec 2011 16:33:59 +0900
-
-wrt-plugins-tizen (0.1.1-4) unstable; urgency=low
-
- * revert package name changing
- * Git : 165.213.180.234:slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.1.1-4
-
-
- -- Sangtai Kim <sangtai.kim@samsung.com> Wed, 07 Dec 2011 20:07:24 +0900
-
-wrt-plugins-tizen (0.1.1-3) unstable; urgency=low
-
- * merge slp-webapi
- * Git : 165.213.180.234:slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.1.1-3
-
-
- -- Sangtai Kim <sangtai.kim@samsung.com> Tue, 06 Dec 2011 21:56:13 +0900
-
-wrt-plugins-tizen (0.1.1-2) unstable; urgency=low
-
- * add boiler plate
- * Git : 165.213.180.234:slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.1.1-2
-
-
- -- Sangtai Kim <sangtai.kim@samsung.com> Tue, 06 Dec 2011 15:39:58 +0900
-
-wrt-plugins-tizen (0.1.1-1) unstable; urgency=low
-
- * add capi-network-nfc-dev
- * Git : 165.213.180.234:slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.1.1-1
-
-
- -- Sangtai Kim <sangtai.kim@samsung.com> Thu, 01 Dec 2011 17:53:42 +0900
-
-wrt-plugins-tizen (0.1.1-0) unstable; urgency=low
-
- * inital upload new git repository
- * Git : 165.213.180.234:slp/pkgs/w/wrt-plugins-tizen
- * Tag : wrt-plugins-tizen_0.1.1-0
-
-
-
- -- Sangtai Kim <sangtai.kim@samsung.com> Thu, 01 Dec 2011 14:04:56 +0900
-
+++ /dev/null
-Source: wrt-plugins-tizen
-Section: devel
-Priority: extra
-Maintainer: Taehee Lee <th219.lee@samsung.com>, Sangtai Kim <sangtai.kim@samsung.com>, Jaehyun Park <jaehyun77.park@samsung.com>, KeeDuck Kim <keeduck.kim@samsung.com>, Kisub Song <kisubs.song@samsung.com>
-Build-Depends: debhelper (>= 5), wrt-commons-dev (>=0.2.6), libwebkit-engine-dev, capi-location-manager-dev, capi-location-geocoder-dev, libmm-camcorder-dev, capi-network-bluetooth-dev, capi-appfw-app-manager-dev, capi-appfw-application-dev, libslp-calendar-dev, capi-system-sensor-dev, libappsvc-dev, email-service-dev, libslp-msg-service-dev (>=0.5.0), capi-telephony-call-dev, libicu-dev, libnetwork-dev, libslp-setting-dev, libdevman-dev, capi-social-call-log-dev, libdownload-agent-dev,libaccounts-svc-dev , libslp-tapi-dev, wrt-plugins-common-dev (>=0.3.17), capi-network-nfc-dev, libaul-1-dev, libmm-fileinfo-dev, libcontacts-service-dev, capi-system-power-dev, capi-system-device-dev, smartcard-service-dev, smartcard-service-common-dev, libss-client-dev, capi-location-poi-dev, capi-location-route-dev
-Uploaders: Sangtai Kim <sangtai.kim@samsung.com>, Kisub Song <kisubs.song@samsung.com>
-
-Package: wrt-plugins-tizen
-Architecture: any
-Section: libs
-Depends: ${shlibs:Depends}, ${misc:Depends}, wrt-commons (>=0.2.6), wrt-plugins-common (>=0.3.17)
-Description: JavaScript plugins for WebRuntime
-
-Package: wrt-plugins-tizen-dbg
-Architecture: any
-Section: debug
-Depends: ${shlibs:Depends}, ${misc:Depends}
-Description: JavaScript plugins for WebRuntime - debug
+++ /dev/null
-#!/usr/bin/make -f
-# -*- makefile -*-
-# Sample debian/rules that uses debhelper.
-# This file was originally written by Joey Hess and Craig Small.
-# As a special exception, when this file is copied by dh-make into a
-# dh-make output file, you may use that output file without restriction.
-# This special exception was added by Craig Small in version 0.37 of dh-make.
-
-# Uncomment this to turn on verbose mode.
-#export DH_VERBOSE=1
-
-
-# These are used for cross-compiling and for saving the configure script
-# from having to guess our platform (since we know it already)
-DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
-DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
-
-CFLAGS ?= -Wall -g -fvisibility=hidden -fPIC
-CXXFLAGS ?= -Wall -g -fPIC
-PREFIX ?= /usr/lib/wrt-plugins
-CONFIG_DTD ?= /usr/etc/tizen-apis
-DATADIR ?= /opt
-
-ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
- CFLAGS += -O0
- CXXFLAGS += -O0
-else
- CFLAGS += -O2
- CXXFLAGS += -O2
-endif
-
-ifeq (,$(findstring no,$(DPL_LOG)))
- DPL_LOGS_STATUS = "ON"
-else
- DPL_LOGS_STATUS = "OFF"
-endif
-
-LDFLAGS += -Wl,--rpath=$(PREFIX)/lib -Wl,--as-needed -Wl,--hash-style=both# -Wl,--version-script=$(CURDIR)/wrt-plugins.map
-
-ifdef DEVPKG
- CMAKEFLAGS += -DDEVPKG="$(DEVPKG)"
-endif
-
-configure: configure-stamp
-configure-stamp:
- dh_testdir
- # Add here commands to configure the package.
- CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)" cmake . -DCMAKE_INSTALL_PREFIX=$(PREFIX) $(CMAKEFLAGS) -DDPL_LOG=$(DPL_LOGS_STATUS) -DCMAKE_BUILD_TYPE="$(BUILD_TYPE)"
- touch configure-stamp
-
-build: build-stamp
-
-build-stamp: configure-stamp
- dh_testdir
-
- # Add here commands to compile the package.
- $(MAKE) -j9 -l2.0
- #docbook-to-man debian/ncurses.sgml > ncurses.1
-
- for f in `find $(CURDIR)/debian/ -name "*.in"`; do \
- cat $$f > $${f%.in}; \
- sed -i -e "s#@PREFIX@#$(PREFIX)#g" $${f%.in}; \
- sed -i -e "s#@CONFIG_DTD@#$(CONFIG_DTD)#g" $${f%.in}; \
- sed -i -e "s#@DATADIR@#$(DATADIR)#g" $${f%.in}; \
- done
-
- touch $@
-
-clean:
- dh_testdir
- dh_testroot
- rm -f build-stamp configure-stamp
-# -$(MAKE) distclean
- ./clean.sh
-
-ifneq "$(wildcard /usr/share/misc/config.sub)" ""
- cp -f /usr/share/misc/config.sub config.sub
-endif
-ifneq "$(wildcard /usr/share/misc/config.guess)" ""
- cp -f /usr/share/misc/config.guess config.guess
-endif
-
- for f in `find $(CURDIR)/debian/ -name "*.in"`; do \
- rm -f $${f%.in}; \
- done
-
- dh_clean
-
-install: build
- dh_testdir
- dh_testroot
- dh_clean -k
- dh_installdirs
-
- # Add here commands to install the package into debian/ncurses.
- $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
-
-
-# Build architecture-independent files here.
-binary-indep: build install
-# We have nothing to do by default.
-
-# Build architecture-dependent files here.
-binary-arch: build install
- dh_testdir
- dh_testroot
- dh_installchangelogs
- dh_installdocs
- dh_installexamples
- dh_install --sourcedir=debian/tmp
-# dh_installmenu
-# dh_installdebconf
-# dh_installlogrotate
-# dh_installemacsen
-# dh_installpam
-# dh_installmime
-# dh_python
-# dh_installinit
-# dh_installcron
-# dh_installinfo
- dh_installman
- dh_link
- dh_strip --dbg-package=wrt-plugins-tizen-dbg
- dh_compress
- dh_fixperms
-# dh_perl
- dh_makeshlibs
- dh_installdeb
- dh_shlibdeps
- dh_gencontrol
- dh_md5sums
- dh_builddeb
-
-binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install
+++ /dev/null
-@PREFIX@/*
-@CONFIG_DTD@/*
Name: wrt-plugins-tizen
Summary: JavaScript plugins for WebRuntime
Version: 0.4.25
-Release: 0
+Release: 1
Group: Development/Libraries
License: Apache License, Version 2.0
Source0: %{name}-%{version}.tar.gz
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>wrt-plugins-tizen</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- </buildSpec>
- <natures>
- </natures>
-</projectDescription>
snprintf(strDate, sizeof(strDate), "%d %d %d %d %d %d",m_date.tm_year, m_date.tm_mon,
m_date.tm_mday, m_date.tm_hour, m_date.tm_min, m_date.tm_sec);
- LoggerI("setDate encrypted string = " << strDate);
service_add_extra_data(m_service_handle, ALARM_ALSOLUTE_DATE_KEY, strDate);
LoggerI("AlarmAbsolute Date = " << " Sec: " << m_date.tm_sec << ", Min: "<< m_date.tm_min
{
service_h service;
service_create(&service);
- LoggerE("[ILOVEFILM] Enter AlarmConverter toService std package = " << id.c_str());
service_set_operation(service, SERVICE_OPERATION_DEFAULT);
service_set_package(service, id.c_str());
service_h service;
service_create(&service);
- LoggerE("[ILOVEFILM] Enter AlarmConverter toService std package = " << id.c_str());
-
service_set_operation(service, SERVICE_OPERATION_DEFAULT);
service_set_package(service, id.c_str());
return service;
memset(&date, 0, sizeof(tm));
int error = ALARM_ERROR_NONE;
- LoggerI("Enter AlarmConverter.toAlarmAbsolutePtr");
-
error = service_get_extra_data(handle, ALARM_ALSOLUTE_DATE_KEY, &dateString);
LoggerI("Date Strng = " << dateString);
result = convertFlagToDaysOfTheWeek(byDayValue);
privateData->setByDayRecurrence(result);
} else {
- LoggerI("Can't get the recurrence week flag.");
+ LoggerE("Can't get the recurrence week flag.");
}
}
bool AlarmConverter::toAlarmService(service_h service, DeviceAPI::Application::ApplicationControlPtr appservice)
{
if (appservice->getOperation().compare("") != 0) {
- LoggerD("operation is "<<appservice->getOperation());
service_set_operation(service, appservice->getOperation().c_str() );
} else {
LoggerD("Error. operation is madatory field. cannot be null");
}
if (appservice->getUri().compare("") != 0) {
- LoggerD("uri is not null");
service_set_uri(service, appservice->getUri().c_str() );
}
if (appservice->getMime().compare("") != 0) {
- LoggerD("mime is "<<appservice->getMime());
service_set_mime(service, appservice->getMime().c_str() );
}
- LoggerD(">>> appservice->getAppControlDataArray");
std::vector<DeviceAPI::Application::ApplicationControlDataPtr> appControlDataArray = appservice->getAppControlDataArray();
if (!appControlDataArray.empty()) {
std::string key;
const char** arr = NULL;
- LoggerD("serviceDataArray.size() : "<<appControlDataArray.size());
for (size_t i = 0; i < appControlDataArray.size(); ++i) {
key = appControlDataArray.at(i)->getKey();
#include "alarm_common.h"
#include <JSTimeDuration.h>
#include <app.h>
-#include <Logger.h>
namespace DeviceAPI {
namespace Alarm {
void AlarmRelative::setPeriod(int value)
{
- LoggerI("Param Peroid = " << value);
m_Period = value;
- LoggerI("Setted Period = " << m_Period);
}
int AlarmRelative::getPeriod()
{
- LoggerI("return Period = " << m_Period);
return m_Period;
}
JSObjectRef result = JSObjectMakeDate(ctx, 6, args, exception);
return result;
} catch (...) {
- LoggerW("Exception: occured");
+ LoggerE("Exception: occured");
}
return JSValueMakeUndefined(ctx);
return JSValueMakeNull(ctx);
}
} catch (...) {
- LoggerW("Exception: occured");
+ LoggerE("Exception: occured");
}
return JSValueMakeUndefined(ctx);
return JSValueMakeNull(ctx);
}
} catch (...) {
- LoggerW("Exception: occured");
+ LoggerI("Exception: occured");
}
return JSValueMakeUndefined(ctx);
return jsResult;
} catch (...) {
- LoggerW("Exception: occured");
+ LoggerI("Exception: occured");
}
return JSValueMakeUndefined(ctx);
void JSAlarmManager::initialize(JSContextRef ctx, JSObjectRef object)
{
gContext = ctx;
- LoggerI("GContext = " << gContext);
}
void JSAlarmManager::finalize(JSObjectRef object)
// applicationId
std::string appId = validator.toString(1);
- LoggerD("appId:[" << appId << "]");
// alarm
JSObjectRef alarmObj = validator.toObject(0);
DeviceAPI::Common::UnknownException err("Unknown Error in ApplicationManager.getAppSharedURI().");
return JSWebAPIException::throwException(ctx, exception, err);
}
-
-#if 0
-
- Validator check(ctx, exception);
- AlarmConverter converter(ctx);
- DeviceAPI::Application::ApplicationConverter applicationConverter(ctx);
-
- Try {
- if(argumentCount < 2) {
- ThrowMsg(ConversionException, "Wrong parameter type.");
- }
-
- if(argumentCount >= 2) {
- if( JSValueIsNull(ctx, arguments[1]) || JSValueIsUndefined(ctx, arguments[1]) ) {
- ThrowMsg(InvalidArgumentException, "Wrong application id.");
- }
- applicationId = converter.toString(arguments[1]);
- LoggerD("package:[" << applicationId << "]");
- }
-
- if(JSValueIsObjectOfClass(ctx, arguments[0], JSAlarmAbsolute::getClassRef())) {
- // AlarmAbsolute obj
- JSObjectRef alarmObj = JSValueToObject(ctx, arguments[0], exception);
- JSAlarmAbsolutePriv *priv = static_cast<JSAlarmAbsolutePriv*>(JSObjectGetPrivate(alarmObj));
- if (!priv) {
- ThrowMsg(ConversionException, "Object is null.");
- }
- AlarmAbsolutePtr alarmPtr = priv->getObject();
- if (!alarmPtr) {
- ThrowMsg(ConversionException, "Private object is null.");
- }
-
- startDate = alarmPtr->getDate();
- service = alarmPtr->getService();
-
- if(argumentCount >=3) {
- // It's service object
- if(JSValueIsObjectOfClass(ctx, arguments[2], DeviceAPI::Application::JSApplicationControl::getClassRef())) {
- DeviceAPI::Application::ApplicationControlPtr appService = applicationConverter.toApplicationControl(arguments[2]);
- if(converter.toAlarmService(service, appService) == false) {
- ThrowMsg(ConversionException, "Wrong parameter type.");
- }
- } else if (JSValueIsNull(ctx, arguments[2]) || JSValueIsUndefined(ctx, arguments[2])) {
- service_set_operation(service, SERVICE_OPERATION_DEFAULT);
- } else {
- ThrowMsg(ConversionException, "Wrong third parameter.");
- }
- } else {
- service_set_operation(service, SERVICE_OPERATION_DEFAULT);
- }
-
- LoggerD("applicationId:[" << applicationId << "]");
- service_set_app_id(service, applicationId.c_str());
-
- AbsoluteRecurrence::Type alarmType = alarmPtr->getRecurrenceType();
-
- int err = ALARM_ERROR_NONE;
- if(alarmType == AbsoluteRecurrence::ByDayValue) {
- int bydayValue = converter.toNativeAlarmValue(alarmPtr->getByDayRecurrence());
- LoggerI("Native bydayValue = " << bydayValue);
- err = alarm_schedule_with_recurrence_week_flag(service, &startDate, bydayValue, &alarm_id);
- } else if(alarmType == AbsoluteRecurrence::Interval) {
- int interval = alarmPtr->getInterval();
- err = alarm_schedule_at_date(service, &startDate, interval, &alarm_id);
- } else {
- err = alarm_schedule_at_date(service, &startDate, 0, &alarm_id);
- }
-
- if(err == ALARM_ERROR_NONE) {
- alarmPtr->setId(alarm_id);
- }else{
- LoggerD("err:[" << err << "]");
- ThrowMsg(PlatformException, "Alarm scheduling failed.");
- }
- } else if(JSValueIsObjectOfClass(ctx, arguments[0], JSAlarmRelative::getClassRef())) {
- JSObjectRef alarmObj = JSValueToObject(ctx, arguments[0], exception);
- JSAlarmRelativePriv *priv = static_cast<JSAlarmRelativePriv*>(JSObjectGetPrivate(alarmObj));
- if (!priv) {
- ThrowMsg(ConversionException, "Object is null.");
- }
-
- AlarmRelativePtr alarmPtr = priv->getObject();
- if (!alarmPtr) {
- ThrowMsg(ConversionException, "Private object is null.");
- }
-
- delay = alarmPtr->getDelay();
- int interval = alarmPtr->getPeriod();
- service = alarmPtr->getService();
-
- if(argumentCount >=3) {
- // It's service object
- if(JSValueIsObjectOfClass(ctx, arguments[2], DeviceAPI::Application::JSApplicationControl::getClassRef())) {
- DeviceAPI::Application::ApplicationControlPtr appService = applicationConverter.toApplicationControl(arguments[2]);
- if(converter.toAlarmService(service, appService) == false) {
- ThrowMsg(ConversionException, "Wrong third parameter type.");
- }
- } else if (JSValueIsNull(ctx, arguments[2]) || JSValueIsUndefined(ctx, arguments[2])) {
- service_set_operation(service, SERVICE_OPERATION_DEFAULT);
- } else {
- ThrowMsg(ConversionException, "Wrong third parameter.");
- }
- } else {
- service_set_operation(service, SERVICE_OPERATION_DEFAULT);
- }
-
- LoggerD("applicationId:[" << applicationId << "]");
- service_set_app_id(service, applicationId.c_str());
-
- int err = alarm_schedule_after_delay(service, delay, interval, &alarm_id);
-
- if(err == ALARM_ERROR_NONE) {
- alarmPtr->setId(alarm_id);
- }else{
- LoggerD("err:[" << err << "]");
- }
- } else {
- ThrowMsg(ConversionException, "Wrong first parameter type.");
- }
- } Catch(ConversionException) {
- LoggerW("Exception: "<<_rethrown_exception.GetMessage());
- return JSTizenExceptionFactory::postException(ctx, exception, JSTizenException::TYPE_MISMATCH_ERROR, _rethrown_exception.GetMessage());
- } Catch(UnsupportedException) {
- LoggerW("Exception: "<<_rethrown_exception.GetMessage());
- return JSTizenExceptionFactory::postException(ctx, exception, JSTizenException::NOT_SUPPORTED_ERROR, _rethrown_exception.GetMessage());
- } Catch(InvalidArgumentException) {
- LoggerW("Exception: "<<_rethrown_exception.GetMessage());
- return JSTizenExceptionFactory::postException(ctx, exception, JSTizenException::INVALID_VALUES_ERROR, _rethrown_exception.GetMessage());
- } Catch(Exception) {
- LoggerW("Exception: "<<_rethrown_exception.GetMessage());
- return JSTizenExceptionFactory::postException(ctx, exception, JSTizenException::UNKNOWN_ERROR, _rethrown_exception.GetMessage());
- }
- return JSValueMakeUndefined(ctx);
-#endif
-
}
JSValueRef JSAlarmManager::remove(JSContextRef ctx, JSObjectRef object, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
std::stringstream(id) >> alarmId;
if (alarmId <= 0) {
- LoggerE("id is wrong : " << alarmId);
throw InvalidValuesException("Invalid ID");
}
TIME_TRACER_ITEM_END("(removeAll)alarm_cancel_all", 0);
if (ALARM_ERROR_NONE != returnVal) {
- LoggerI("Error while removing all alarms: "<<returnVal);
+ LoggerE("Error while removing all alarms: "<< returnVal);
}
TIME_TRACER_ITEM_END(__FUNCTION__, 0);
std::stringstream(id) >> alarmId;
if (alarmId <= 0) {
- LoggerE("id is wrong : " << alarmId);
+ LoggerE("Wrong Alarm ID");
throw InvalidValuesException("Invalid ID");
}
int error = alarm_foreach_registered_alarm(alarm_iterate_callback, &alarmIds);
if (error == ALARM_ERROR_CONNECTION_FAIL) {
- LoggerW("Alarm system may not be ready yet.");
+ LoggerE("Alarm system may not be ready yet.");
alarmIds.clear();
} else if(error != ALARM_ERROR_NONE) {
- LoggerI("Error occurred while getting all alarms: "<<error);
+ LoggerE("Error occurred while getting all alarms : " << error);
throw UnknownException("Unknown error occurred.");
}
error = alarm_get_service(alarmIds.at(i), &handle);
if(error != ALARM_ERROR_NONE) {
- LoggerI("Getting service failed: " << error);
+ LoggerE("Getting service failed: " << error);
throw NotFoundException("Alarm not found");
}
throw UnknownException("Unknown error occurred.");
}
- LoggerI("Alarm id: " << alarmIds.at(i));
- LoggerI("Alarm Type: " << alarmType);
-
JSValueRef obj = NULL;
if (strcmp(alarmType, ALARM_TYPE_ABSOLUTE_VALUE) == 0) {
- LoggerI("Enter getAll Natvie alarm id = " << alarmIds.at(i));
AlarmAbsolutePtr privateData = AlarmAbsolutePtr(new AlarmAbsolute(handle));
if(!converter.toAlarmAbsolutePtr(alarmIds.at(i), handle, privateData)) {
return JSUtil::toJSValueRef(context, (long)604800);
}
} catch (const BasePlatformException &err) {
- LoggerW("Getting property is failed. %s", err.getMessage().c_str());
+ LoggerE("Getting property is failed. %s", err.getMessage().c_str());
}
return NULL;
long result = nextTime - currentTime;
- LoggerD("nextTime: "<<nextTime<<", currentTime: "<<currentTime<<", result: "<<result);
+ LoggerI("nextTime: "<<nextTime<<", currentTime: "<<currentTime<<", result: "<<result);
if(result < 0) {
// It is impossible
void on_widget_start_callback(int widgetId)
{
- LoggerD("[Tizen\\AlarmManager ] on_widget_start_callback (" << widgetId << ")");
+ LoggerI("[Tizen\\AlarmManager ] on_widget_start_callback (" << widgetId << ")");
Try
{
TIME_TRACER_INIT();
void on_widget_stop_callback(int widgetId)
{
- LoggerD("[Tizen\\AlarmManager ] on_widget_stop_callback (" << widgetId << ")");
+ LoggerI("[Tizen\\AlarmManager ] on_widget_stop_callback (" << widgetId << ")");
Try
{
TIME_TRACER_EXPORT_REPORT_TO(TIME_TRACER_EXPORT_FILE,"Alarm");
}
}
+void AppManagerWrapper::setCurrentAppId(std::string appId)
+{
+ m_curr_app_id = appId;
+}
+
+std::string AppManagerWrapper::getCurrentAppId() const
+{
+ return m_curr_app_id;
+}
+
+
void AppManagerWrapper::registerAppListChangedCallbacks(IAppManagerAppListChangedCallbacks *callbacks)
{
if(callbacks == NULL)
{
- LoggerW("Parameter is NULL.");
+ LoggerE("callback cannot be set to NULL.");
return;
}
{
if(callbacks == NULL)
{
- LoggerW("Parameter is NULL.");
+ LoggerE("callback cannot be set to NULL.");
return;
}
if(m_callbacks.size() == 0)
{
- LoggerW("No callbacks are registered.");
+ LoggerE("No callbacks are registered.");
return;
}
AppListChangedCallbacksSet::iterator iter = m_callbacks.find(callbacks);
if(iter == m_callbacks.end())
{
- LoggerW("Callbacks " << callbacks << " are not registered.");
+ LoggerE("Callback " << callbacks << " is not registered.");
return;
}
bool AppManagerWrapper::app_callback(package_info_app_component_type_e comp_type, const char *app_id, void *user_data)
{
if(app_id == NULL) {
- LoggerW("app_manager listener gave a NULL package name.");
+ LoggerE("Callback is called. but no package name is passed. skip this request");
return true;
}
if(user_data == NULL) {
- LoggerW("No user data to store appId");
+ LoggerE("user data is not exist. skip this request");
return true;
}
void AppManagerWrapper::appListChangedCallback(app_manger_event_type_e event_type, const char *pkgId, void *user_data)
{
if(user_data == NULL) {
- LoggerW("No user data to store appId");
+ LoggerE("user data is not exist. skip this request");
return;
}
int ret = package_manager_get_package_info(pkgId, &package_info);
if (ret != PACKAGE_MANAGER_ERROR_NONE) {
- LoggerD("Cannot create package info by : " << pkgId);
+ LoggerE("Cannot create package info");
return;
}
ret = package_info_foreach_app_from_package(package_info, PACKAGE_INFO_ALLAPP, app_callback, user_data);
if (ret != PACKAGE_MANAGER_ERROR_NONE) {
- LoggerD("failed while getting appids");
+ LoggerE("failed while getting appids");
return;
}
ret = package_info_destroy(package_info);
if (ret != PACKAGE_MANAGER_ERROR_NONE) {
- LoggerD("Cannot destroy package info");
+ LoggerE("Cannot destroy package info");
}
for (size_t i = 0; i < appManager->applist.size(); i++) {
appListAppUpdated(appManager->applist.at(i).c_str());
break;
default:
- LoggerW("app_manager listener gave wrong event_type : " << event_type);
+ LoggerE("app_manager listener gave wrong event_type : " << event_type);
break;
}
}
void AppManagerWrapper::appListAppInstalled(const char *appId)
{
- LoggerD("app installed : " << appId);
-
AppListChangedCallbacksSet::iterator iter = m_callbacks.begin();
for(; iter != m_callbacks.end(); iter++)
{
void AppManagerWrapper::appListAppUninstalled(const char *appId)
{
- LoggerD("app uninstalled : " << appId);
-
AppListChangedCallbacksSet::iterator iter = m_callbacks.begin();
for(; iter != m_callbacks.end(); iter++)
{
void AppManagerWrapper::appListAppUpdated(const char *appId)
{
- LoggerD("app updated : " << appId);
-
AppListChangedCallbacksSet::iterator iter = m_callbacks.begin();
for(; iter != m_callbacks.end(); iter++)
{
}
-
int AppManagerWrapper::app_list_changed_cb_broker(int id, const char *type, const char *package, const char *key, const char *val, const void *msg, void *data)
{
static app_manger_event_type_e event_type;
int ret = package_manager_get_package_info(package, &package_info);
if (ret != PACKAGE_MANAGER_ERROR_NONE) {
- LoggerD("Cannot create package info by : " << package);
+ LoggerE("Cannot create package info");
}
ret = package_info_foreach_app_from_package(package_info, PACKAGE_INFO_ALLAPP, app_callback, data);
if (ret != PACKAGE_MANAGER_ERROR_NONE) {
- LoggerD("failed while getting appids");
+ LoggerE("failed while getting appids");
}
ret = package_info_destroy(package_info);
if (ret != PACKAGE_MANAGER_ERROR_NONE) {
- LoggerD("Cannot destroy package info");
+ LoggerE("Cannot destroy package info");
}
event_type = APP_MANAGER_EVENT_UNINSTALLED;
} else if (!strcasecmp(val, "update")) {
void AppManagerWrapper::registerAppListChangedCallbacks()
{
if (m_manager_handle != NULL) {
- LoggerW("Callback already registered.");
+ LoggerW("Callback is already registered.");
return;
}
void AppManagerWrapper::unregisterAppListChangedCallbacks()
{
if (m_manager_handle == NULL) {
- LoggerW("No callback registered");
+ LoggerE("No callback is registered");
return;
}
char* packageId = NULL;
int ret = 0;
- //LoggerD("InitializeAppInfo for " << appInfo->getAppId().c_str());
-
ret = package_manager_get_package_id_by_app_id(appId.c_str(), &packageId);
if (ret != PACKAGE_MANAGER_ERROR_NONE)
{
- LoggerD("Fail to get package id with appId : " << appId.c_str());
+ LoggerE("Fail to get package id");
}
// Below code is already run on ApplicationManager.cpp
ret = pkgmgrinfo_appinfo_get_appinfo(appId.c_str(), &appinfo_h);
if (ret != PMINFO_R_OK) {
- LoggerD("Fail to get appinfo by " << appId.c_str());
+ LoggerE("Fail to get appinfo");
}
ret = pkgmgrinfo_appinfo_get_label(appinfo_h, &name);
if (ret != PMINFO_R_OK) {
- LoggerD("Fail to get name by " << appId.c_str());
+ LoggerE("Fail to get name");
}
appInfo->setName(name);
ret = pkgmgrinfo_appinfo_get_icon(appinfo_h, &iconPath);
if (ret != PMINFO_R_OK) {
- LoggerD("Fail to get icon by " << appId.c_str());
+ LoggerE("Fail to get icon");
}
appInfo->setIconPath(iconPath);
ret = pkgmgrinfo_appinfo_is_nodisplay(appinfo_h, &noDisplay);
if (ret != PMINFO_R_OK) {
- LoggerD("Fail to get nodisplay by " << appId.c_str());
+ LoggerE("Fail to get nodisplay");
}
appInfo->setShow(!noDisplay);
ret = pkgmgrinfo_appinfo_foreach_category(appinfo_h, category_cb, (void*)appInfo.Get());
if (ret < 0)
{
- LoggerD("Fail to get categories " << appId.c_str());
+ LoggerE("Fail to get categories");
}
ret = pkgmgrinfo_appinfo_destroy_appinfo(appinfo_h);
if (ret < 0)
{
- LoggerD("Fail to destroy " << appId.c_str());
+ LoggerE("Fail to destroy ");
}
#endif
ret = pkgmgrinfo_pkginfo_get_pkginfo(packageId, &pkginfo_h);
if (ret != PMINFO_R_OK) {
- LoggerD("Fail to get package info");
+ LoggerE("Fail to get package info");
}
ret = pkgmgrinfo_pkginfo_get_version(pkginfo_h, &version);
if (ret != PMINFO_R_OK) {
- LoggerD("Fail to get version");
+ LoggerE("Fail to get version");
}
appInfo->setVersion(version);
ret = pkgmgrinfo_pkginfo_get_total_size(pkginfo_h, &total_size);
if (ret == PMINFO_R_OK) {
+ LoggerE("Fail to get installed size");
appInfo->setInstallSize(total_size);
}
ret = pkgmgrinfo_pkginfo_get_installed_time(pkginfo_h, &installed_time);
if (ret == PMINFO_R_OK) {
+ LoggerE("Fail to get installed date");
appInfo->setInstallDate(installed_time);
}
bool initializeAppInfo(ApplicationInformationPtr &appInfo);
+ // get the current application id from WRT
+ void setCurrentAppId(std::string appId);
+ std::string getCurrentAppId() const;
+
private:
static bool app_callback(package_info_app_component_type_e comp_type, const char *app_id, void *user_data);
AppListChangedCallbacksSet m_callbacks;
pkgmgr_client *m_manager_handle;
long m_watchIdAcc;
+ std::string m_curr_app_id;
public:
std::vector<std::string> applist;
void Application::getRequestedAppControl(const EventApplicationGetRequestedAppControlPtr& event)
{
- LoggerD("entered");
-
Try
{
int ret = 0;
std::string bundle_str = event->getEncodedBundle();
- LoggerD("bundle str : " << bundle_str);
service_h service = NULL;
char* tmpStr = NULL;
ret = service_get_operation(service, &tmpStr);
if(ret == SERVICE_ERROR_NONE && tmpStr != NULL)
{
- LoggerD(" operation : " << tmpStr);
appControl->setOperation(tmpStr);
free(tmpStr);
tmpStr = NULL;
ret = service_get_uri(service, &tmpStr);
if(ret == SERVICE_ERROR_NONE && tmpStr != NULL)
{
- LoggerD(" uri : " << tmpStr);
appControl->setUri(tmpStr);
free(tmpStr);
tmpStr = NULL;
ret = service_get_mime(service, &tmpStr);
if(ret == SERVICE_ERROR_NONE && tmpStr != NULL)
{
- LoggerD(" mime : " << tmpStr);
appControl->setMime(tmpStr);
free(tmpStr);
tmpStr = NULL;
ret = service_get_category(service, &tmpStr);
if(ret == SERVICE_ERROR_NONE && tmpStr != NULL)
{
- LoggerD(" category : " << tmpStr);
appControl->setCategory(tmpStr);
free(tmpStr);
tmpStr = NULL;
ret = service_get_caller(service, &tmpStr);
if(ret == SERVICE_ERROR_NONE && tmpStr != NULL)
{
- LoggerD(" caller App Id : " << tmpStr);
appCtrMgr->setCallerAppId(tmpStr);
free(tmpStr);
tmpStr = NULL;
} else {
- LoggerE("caller id fail");
+ LoggerE("fail to get caller application ID");
event->setExceptionCode(Commons::ExceptionCodes::PlatformException);
}
event->setRequestedAppControl(appCtrMgr);
ApplicationControl::ApplicationControl() :
m_appControl(NULL)
{
- LoggerD("entered");
}
ApplicationControl::ApplicationControl(const std::string &op, const std::string &uri,
std::vector<ApplicationControlDataPtr> &dataArray) :
m_appControl(NULL)
{
- LoggerD("entered");
m_operation = op;
m_uri = uri;
m_mime = mime;
ApplicationControl::~ApplicationControl()
{
- LoggerD("entered");
}
std::string ApplicationControl::getOperation() const
service_add_extra_data_array(reply, key, arr, valueArray.size());
}
} else {
- LoggerE("==[replyResult] appControlDataArray is empty");
+ LoggerE("appControlDataArray is empty");
}
service_reply_to_launch_request(reply, m_appControl, SERVICE_RESULT_SUCCEEDED);
//
#include "ApplicationControlData.h"
-#include <Logger.h>
namespace DeviceAPI {
namespace Application {
ApplicationControlData::ApplicationControlData()
{
- LoggerD("entered");
}
ApplicationControlData::~ApplicationControlData()
{
//nothing to do in destructor
- LoggerD("entered");
}
std::string ApplicationControlData::getKey() const
EventApplicationAppInfoEventListenerListener(ThreadEnum::NULL_THREAD),
ApplicationPrivObject(context, application)
{
- LoggerD("ApplicationController constructed : " << this);
if (!application) {
- LoggerW("controller has no application object");
+ LoggerE("controller has no application object");
}
}
ApplicationController::~ApplicationController()
{
- LoggerD("ApplicationController destructed : " << this);
}
void ApplicationController::OnAnswerReceived(const EventApplicationLaunchPtr &event)
void ApplicationAsyncAnswerHandler::launch(const EventApplicationLaunchPtr &event)
{
- LoggerD("entered");
JSCallbackManagerPtr callbackManager =
DPL::StaticPointerCast<JSCallbackManager>(event->getPrivateData());
if (!callbackManager) {
void ApplicationAsyncAnswerHandler::kill(const EventApplicationKillPtr &event)
{
- LoggerD("entered");
JSCallbackManagerPtr callbackManager =
DPL::StaticPointerCast<JSCallbackManager>(event->getPrivateData());
if (!callbackManager) {
void ApplicationAsyncAnswerHandler::launchAppControl(const EventApplicationLaunchAppControlPtr &event)
{
- LoggerD("entered");
JSCallbackManagerPtr callbackManager =
DPL::StaticPointerCast<JSCallbackManager>(event->getPrivateData());
if (!callbackManager) {
void ApplicationAsyncAnswerHandler::launchAppControlReply(const EventApplicationLaunchAppControlReplyPtr &event)
{
- LoggerD("entered");
JSCallbackManagerPtr callbackManager =
DPL::StaticPointerCast<JSCallbackManager>(event->getPrivateData());
if (!callbackManager) {
ApplicationConverterFactory::getConverter(gContext);
JSValueRef result = converter->toJSValueRef(*appControlDataArray);
- LoggerD("replyCallbackManager onsuccess");
-
callbackManager->callOnSuccess(result);
return;
} Catch(Exception) {
void ApplicationAsyncAnswerHandler::findAppControl(const EventApplicationFindAppControlPtr &event)
{
- LoggerD("entered");
JSCallbackManagerPtr callbackManager =
DPL::StaticPointerCast<JSCallbackManager>(event->getPrivateData());
if (!callbackManager) {
void ApplicationAsyncAnswerHandler::getAppsContext(const EventApplicationGetAppsContextPtr &event)
{
- LoggerD("entered");
JSCallbackManagerPtr callbackManager =
DPL::StaticPointerCast<JSCallbackManager>(event->getPrivateData());
if (!callbackManager) {
void ApplicationAsyncAnswerHandler::getAppsInfo(const EventApplicationGetAppsInfoPtr &event)
{
- LoggerD("entered");
JSCallbackManagerPtr callbackManager =
DPL::StaticPointerCast<JSCallbackManager>(event->getPrivateData());
if (!callbackManager) {
void ApplicationAsyncAnswerHandler::eventListener(const EventApplicationAppInfoEventListenerPtr &event)
{
- LoggerD("entered");
JSApplicationEventCallbackManagerPtr callbackManager =
DPL::StaticPointerCast<JSApplicationEventCallbackManager>(event->getPrivateData());
if (!callbackManager)
ApplicationInformationPtr appInfo = event->getAppInfo();
if(appInfo == NULL)
{
- LoggerE("AppInfo did not set.");
+ LoggerE("AppInfo is not set.");
return;
}
JSValueRef result = converter->toJSValueRefFromApplicationInformation(appInfo);
ApplicationInformationPtr appInfo = event->getAppInfo();
if(appInfo == NULL)
{
- LoggerE("AppInfo did not set.");
+ LoggerE("AppInfo is not set.");
return;
}
JSValueRef result = converter->toJSValueRefFromApplicationInformation(appInfo);
std::string appId = appInfo->getAppId();
if(appId == "")
{
- LoggerE("AppId did not set.");
+ LoggerE("AppId is not set.");
return;
}
JSValueRef result = converter->toJSValueRef(appId);
#include "JSApplicationControl.h"
#include "JSRequestedApplicationControl.h"
#include "JSApplicationCert.h"
-#include <Logger.h>
namespace DeviceAPI {
namespace Application {
JSValueRef ApplicationConverter::toJSValueRefFromApplication(const ApplicationPtr &arg)
{
- LoggerD("entered to toJSValueRefFromApplication ");
if(arg == NULL) {
Throw(Commons::ConversionException);
}
JSValueRef ApplicationConverter::toJSValueRefFromApplicationCert(const ApplicationCertPtr &arg)
{
- LoggerD("entered to toJSValueRefFromApplicationCert ");
if(arg == NULL) {
Throw(Commons::ConversionException);
}
JSValueRef ApplicationConverter::toJSValueRef(const RequestedApplicationControlPtr &arg)
{
- LoggerD("entered to toJSValueRefFromRequestedApplicationControl" );
if(arg == NULL) {
Throw(Commons::InvalidArgumentException);
}
JSValueRef ApplicationConverter::toJSValueRef(const ApplicationControlPtr &arg)
{
- LoggerD("entered");
if(arg == NULL) {
Throw(Commons::InvalidArgumentException);
}
JSValueRef ApplicationConverter::toJSValueRef(const ApplicationControlDataPtr &arg)
{
- LoggerD("entered");
return CommonsJavaScript::JSUtils::makeObject(m_context, JSApplicationControlData::getClassRef(), arg);
}
static void app_manager_app_context_event_callback(app_context_h app_context,
app_context_event_e event, void *user_data)
{
- LoggerD("called");
int ret = 0;
if(event != APP_CONTEXT_EVENT_TERMINATED)
ret = app_context_get_pid(app_context, &pid);
if(ret != APP_MANAGER_ERROR_NONE)
{
- LoggerD("Fail to get pid of terminated app (" << ret << ")");
+ LoggerE("Fail to get pid of terminated app (" << ret << ")");
return;
}
ret = app_manager_get_app_info(appId, &handle);
if (ret < 0)
{
- LoggerD("Fail to get appinfo by " << appId);
+ LoggerE("Fail to get appinfo");
return NULL;
}
ret = app_info_get_package(handle, &pkgName);
if (ret < 0)
{
- LoggerD("Fail to get pkgName by " << appId);
+ LoggerE("Fail to get pkgName");
pkgName = NULL;
}
ret = app_info_destroy(handle);
if (ret < 0)
{
- LoggerD("Fail to get destory appinfo");
+ LoggerE("Fail to get destory appinfo");
return NULL;
}
ret = app_context_get_app_id(app_context, &app_id);
if((ret != APP_MANAGER_ERROR_NONE) || (app_id == NULL))
{
- LoggerD("app_context_get_app_id error (" << ret << ")");
+ LoggerE("Fail to get app id from context (" << ret << ")");
return false;
}
ret = app_context_get_pid(app_context, &pid);
if(ret != APP_MANAGER_ERROR_NONE)
{
- LoggerD("app_context_get_app_id error (" << ret << ")");
+ LoggerE("Fail to get pid from context (" << ret << ")");
if (app_id)
free(app_id);
return false;
static void service_reply_callback(service_h request, service_h reply,
service_result_e result, void *user_data)
{
- LoggerD("appControlResultCallback called");
LaunchAppControlPendingEventMap::DataKeyType key =
(LaunchAppControlPendingEventMap::DataKeyType)user_data;
certName = "DISTRIBUTOR2_SIGNER";
break;
default:
- LoggerD("Unknow Cert type!!!");
+ LoggerE("Unknow Cert type!!!");
break;
}
return true;
}
-
- static int get_current_app_id(char** app_id)
+ static std::string get_current_app_id()
{
- LoggerD("get_current_app_id enter");
- int parent_pid = getppid();
- LoggerD("parent pid : " << parent_pid);
-
- int ret = app_manager_get_app_id(parent_pid, app_id);
-
- if ((ret != APP_MANAGER_ERROR_NONE) || (app_id == NULL))
- {
- LoggerD("Cannot get app id from pid : " << parent_pid);
- }
- else
- {
- LoggerD("appid : " << *app_id);
- }
-
- return ret;
+ std::string appId = AppManagerWrapperSingleton::Instance().getCurrentAppId();
+ return appId;
}
static int category_cb(const char *category, void *user_data)
{
- //LoggerD("enter");
if (category == NULL)
return true;
return true;
}
+#if 0
// @20130125-wscho: current pkgmanager has a problem while db operation.
// So, if enable below code, foreach callback of "pkgmgrinfo_appinfo_get_installed_list"
// is not running.
ret = pkgmgrinfo_pkginfo_get_pkginfo(packageId, &pkginfo_h);
if (ret != PMINFO_R_OK) {
- LoggerD("Fail to get package info");
+ LoggerD("Fail to get package info. skip getting info");
+ return;
}
ret = pkgmgrinfo_pkginfo_get_version(pkginfo_h, &version);
if (ret != PMINFO_R_OK) {
LoggerD("Fail to get destroy pkginfo");
}
- LoggerD("6");
}
+#endif
static ApplicationInformationPtr create_app_info(pkgmgrinfo_appinfo_h handle)
{
- //LoggerD("enter");
char* appId = NULL;
- //char* packageId = NULL;
char* name = NULL;
char* iconPath = NULL;
bool noDisplay = false;
ApplicationInformationPtr appInfo(new ApplicationInformation());
ret = pkgmgrinfo_appinfo_get_appid(handle, &appId);
if (ret != PMINFO_R_OK) {
- LoggerD("Fail to get name by " << appId);
+ LoggerD("Fail to get name");
} else {
appInfo->setAppId(appId);
}
ret = pkgmgrinfo_appinfo_get_label(handle, &name);
if ((ret != PMINFO_R_OK) || (name == NULL)) {
- LoggerD("Fail to get name by " << appId);
+ LoggerD("Fail to get name");
} else {
appInfo->setName(name);
}
ret = pkgmgrinfo_appinfo_get_icon(handle, &iconPath);
if ((ret != PMINFO_R_OK) || (iconPath == NULL)) {
- LoggerD("Fail to get icon by " << appId);
+ LoggerD("Fail to get icon");
} else {
appInfo->setIconPath(iconPath);
}
ret = pkgmgrinfo_appinfo_is_nodisplay(handle, &noDisplay);
if (ret != PMINFO_R_OK) {
- LoggerD("Fail to get nodisplay by " << appId);
+ LoggerD("Fail to get nodisplay");
} else {
appInfo->setShow(!noDisplay);
}
ret = pkgmgrinfo_appinfo_foreach_category(handle, category_cb, (void*)appInfo.Get());
if (ret != PMINFO_R_OK) {
- LoggerD("Fail to get categories " << appId);
+ LoggerD("Fail to get categories");
}
ret = pkgmgrinfo_appinfo_get_pkgid(handle, &pkgId);
if ((ret != PMINFO_R_OK) || (pkgId == NULL)) {
- LoggerD("Fail to get pkg Id by " << appId);
+ LoggerD("Fail to get pkg Id");
} else {
appInfo->setPackageId(pkgId);
}
ret = pkgmgrinfo_appinfo_get_pkgname(handle, &packageId);
if (ret != PMINFO_R_OK)
{
- LoggerD("Fail to get package id with appId : " << appId);
+ LoggerD("Fail to get package id");
return appInfo;
}
- LoggerD("package id : " << packageId);
-
set_additional_app_info(appInfo, packageId);
#endif
static int installed_app_info_cb(pkgmgrinfo_appinfo_h handle, void *user_data)
{
- //LoggerD("enter");
ApplicationInformationPtr appInfo = create_app_info(handle);
ApplicationInformationArray *appInfoArray = (ApplicationInformationArray*)user_data;
appInfoArray->push_back(appInfo);
{
if(appid == NULL)
{
- LoggerW("appid is NULL");
+ LoggerD("appid is NULL");
return false;
}
//ApplicationInformationPtr appInfo(new ApplicationInformation(appid));
pkgmgrinfo_appinfo_h handle;
int ret = pkgmgrinfo_appinfo_get_appinfo(appid, &handle);
if (ret != PMINFO_R_OK) {
- LoggerW("Fail to get appInfo from appId : " << appid);
- }
- ApplicationInformationPtr appInfo = create_app_info(handle);
- pkgmgrinfo_appinfo_destroy_appinfo(handle);
+ LoggerD("Fail to get appInfo from appId : " << appid);
+ } else {
+ ApplicationInformationPtr appInfo = create_app_info(handle);
+ pkgmgrinfo_appinfo_destroy_appinfo(handle);
- ApplicationInformationArray *appInfos = (ApplicationInformationArray *)user_data;
- appInfos->push_back(appInfo);
+ ApplicationInformationArray *appInfos = (ApplicationInformationArray *)user_data;
+ appInfos->push_back(appInfo);
+ }
return true;
}
-
}
ApplicationManager::ApplicationManager() :
void ApplicationManager::getAppCerts(const EventApplicationGetAppCertsPtr& event)
{
- LoggerE("ApplicationManager::getAppCerts");
if (m_initialized == false) {
initialize();
}
void ApplicationManager::getAppSharedURI(const EventApplicationGetAppSharedURIPtr& event)
{
- LoggerE("ApplicationManager::getAppSharedURI");
if (m_initialized == false) {
initialize();
}
if(result == SERVICE_RESULT_SUCCEEDED)
{
- LoggerD("SERVICE_RESULT_SUCCEEDED in serviceResultCallback");
-
// create new service object to store result.
ApplicationControlDataArrayPtr appControlDataArray(new ApplicationControlDataArray());
if( result == SERVICE_ERROR_NONE)
{
event->setAppControlDataArray(appControlDataArray);
- LoggerD("service_foreach_extra_data() success");
}
else
{
- LoggerD("service_foreach_extra_data() failed");
event->setExceptionCode(Commons::ExceptionCodes::NotFoundException);
}
}
else if(result == SERVICE_RESULT_FAILED || result == SERVICE_RESULT_CANCELED)
{
- LoggerD("SERVICE_RESULT_FAILED in serviceResultCallback : " <<result);
event->setExceptionCode(Commons::ExceptionCodes::NotFoundException);
}
EventApplicationKillPtr event = it->second;
m_killEventMap.erase(it);
- LoggerD("Calling kill success callback for pid : " << pid);
-
EventRequestReceiver<EventApplicationKill>::ManualAnswer(event);
}
int ret = 0;
ApplicationControlDataArray* appControlDataArray = (ApplicationControlDataArray*)user_data;
- LoggerD(" key : " << key);
bool isArray = false;
ret = service_is_extra_data_array(service, key, &isArray);
if (ret != SERVICE_ERROR_NONE)
{
- LoggerD("service_is_extra_data_array passes error");
+ LoggerE("service_is_extra_data_array passes error");
// fail to checking. go to next extra data.
return true;
}
switch(ret)
{
case SERVICE_ERROR_NONE: {
- LoggerD("service_get_extra_data success");
std::vector<std::string> valArray;
- LoggerD("value length : " << length);
+ LoggerI("value length : " << length);
for (int i = 0; i < length; i++)
{
- LoggerD("value : " << value[i]);
if(value[i])
{
valArray.push_back(value[i]);
break;
}
case SERVICE_ERROR_INVALID_PARAMETER:
- LoggerD("service_get_extra_data retuns SERVICE_ERROR_INVALID_PARAMETER");
+ LoggerE("service_get_extra_data retuns SERVICE_ERROR_INVALID_PARAMETER");
break;
case SERVICE_ERROR_KEY_NOT_FOUND:
- LoggerD("service_get_extra_data retuns SERVICE_ERROR_KEY_NOT_FOUND");
+ LoggerE("service_get_extra_data retuns SERVICE_ERROR_KEY_NOT_FOUND");
break;
case SERVICE_ERROR_OUT_OF_MEMORY:
- LoggerD("service_get_extra_data retuns SERVICE_ERROR_OUT_OF_MEMORY");
+ LoggerE("service_get_extra_data retuns SERVICE_ERROR_OUT_OF_MEMORY");
break;
default:
- LoggerD("service_get_extra_data retuns Error");
+ LoggerE("service_get_extra_data retuns Error");
break;
}
}
{
if(value == NULL)
{
- LoggerD("service_get_extra_data returns NULL");
+ LoggerE("service_get_extra_data returns NULL");
break;
}
- LoggerD("service_get_extra_data success");
- LoggerD("key = "<<key<<" value = "<<value);
+
std::vector<std::string> valArray;
valArray.push_back(value);
break;
}
case SERVICE_ERROR_INVALID_PARAMETER:
- LoggerD("service_get_extra_data retuns SERVICE_ERROR_INVALID_PARAMETER");
+ LoggerE("service_get_extra_data retuns SERVICE_ERROR_INVALID_PARAMETER");
break;
case SERVICE_ERROR_KEY_NOT_FOUND:
- LoggerD("service_get_extra_data retuns SERVICE_ERROR_KEY_NOT_FOUND");
+ LoggerE("service_get_extra_data retuns SERVICE_ERROR_KEY_NOT_FOUND");
break;
case SERVICE_ERROR_OUT_OF_MEMORY:
- LoggerD("service_get_extra_data retuns SERVICE_ERROR_OUT_OF_MEMORY");
+ LoggerE("service_get_extra_data retuns SERVICE_ERROR_OUT_OF_MEMORY");
break;
default:
- LoggerD("service_get_extra_data retuns Error");
+ LoggerE("service_get_extra_data retuns Error");
break;
}
}
void ApplicationManager::OnRequestReceived(const EventApplicationGetCurrAppPtr& event)
{
- LoggerD("entered");
-
if (m_app != NULL) {
LoggerD("CurrentApplicaton Object is already created.");
event->setApp(m_app);
Try
{
- std::string appId;
-
- // get package info of current app
- {
- char *app_id = NULL;
-
- //int ret = app_get_id(&app_id);
- int ret = get_current_app_id(&app_id);
- if((ret != APP_ERROR_NONE) || (app_id == NULL))
- {
- LoggerE("Can not get app id from current pid (" << ret << ")");
- event->setExceptionCode(Commons::ExceptionCodes::NotFoundException);
- return;
- }
- appId = app_id;
-
- free(app_id);
- }
+ std::string appId = get_current_app_id();
//ApplicationInformationPtr appinfo(new ApplicationInformation(appId));
pkgmgrinfo_appinfo_h handle;
int ret = pkgmgrinfo_appinfo_get_appinfo(appId.c_str(), &handle);
if (ret != PMINFO_R_OK) {
- LoggerW("Fail to get appInfo from appId : " << appId);
-
- }
+ LoggerE("Fail to get appInfo");
+ return;
+ }
ApplicationInformationPtr appInfo = create_app_info(handle);
pkgmgrinfo_appinfo_destroy_appinfo(handle);
std::stringstream sstr;
sstr << pid;
app->setContextId(sstr.str());
-
- LoggerE("set pid : " << pid);
}
event->setApp(app);
- LoggerD("set application to event ");
m_app = app;
-
}
Catch (WrtDeviceApis::Commons::Exception)
{
void ApplicationManager::OnRequestReceived(const EventApplicationLaunchPtr& event)
{
- LoggerD("entered");
-
Try
{
int ret;
std::string appId = event->getAppId();
if(appId.empty())
{
- LoggerE("App id is empty");
+ LoggerE("App id is mandatory field.");
event->setExceptionCode(Commons::ExceptionCodes::InvalidArgumentException);
return;
}
- LoggerD("Launching app id : " << appId);
-
-// if the application is running, send raise event to the app instead of reset the application.
-#if 1
+ // if the application is running, send raise event to the app instead of reset the application.
// give a second chance to launch application to avoid platform issue.
// this retry code will be removed after platform code change.
while (retry < 3) {
{
case AUL_R_EINVAL:
case AUL_R_ERROR:
- LoggerD("aul_open_app returns Not Found error");
+ LoggerE("returns Not Found error");
event->setExceptionCode(Commons::ExceptionCodes::NotFoundException);
break;
case AUL_R_ECOMM:
- LoggerD("aul_open_app returns internal IPC error");
+ LoggerE("returns internal IPC error");
event->setExceptionCode(Commons::ExceptionCodes::PlatformException);
break;
default:
- LoggerD("aul_open_app returns Unknown error");
+ LoggerE("returns Unknown error");
event->setExceptionCode(Commons::ExceptionCodes::UnknownException);
break;
}
} else {
- LoggerD("callee's pid " << ret);
- }
-#else
- service_h service;
- service_create(&service);
-
- service_set_operation(service, SERVICE_OPERATION_DEFAULT);
-
- service_set_app_id(service, appId.c_str());
-
- // give a second chance to launch application to avoid platform issue.
- // this retry code will be removed after platform code change.
- while (retry < 3) {
- ret = service_send_launch_request(service, NULL, this);
- if (ret != SERVICE_ERROR_LAUNCH_REJECTED) {
- break;
- }
- // delay 300ms for each retry
- usleep(300 * 1000);
- retry++;
- LoggerD("retry launch request : " << retry);
- }
-
- service_destroy(service);
-
- if(ret != SERVICE_ERROR_NONE)
- {
- switch (ret)
- {
- case SERVICE_ERROR_INVALID_PARAMETER:
- LoggerD("service_send_launch_request returns SERVICE_ERROR_INVALID_PARAMETER");
- event->setExceptionCode(Commons::ExceptionCodes::InvalidArgumentException);
- break;
- case SERVICE_ERROR_OUT_OF_MEMORY:
- LoggerD("service_send_launch_request returns SERVICE_ERROR_OUT_OF_MEMORY");
- event->setExceptionCode(Commons::ExceptionCodes::PlatformException);
- break;
- case SERVICE_ERROR_LAUNCH_REJECTED:
- case SERVICE_ERROR_APP_NOT_FOUND:
- LoggerD("service_send_launch_request returns SERVICE_ERROR_APP_NOT_FOUND");
- event->setExceptionCode(Commons::ExceptionCodes::NotFoundException);
- break;
- default:
- LoggerD("service_send_launch_request returns UNKNOWN ERROR!!! (" << ret << ")");
- event->setExceptionCode(Commons::ExceptionCodes::UnknownException);
- break;
- }
+ LoggerD("Success to launch.");
}
-#endif
-
-
}
Catch (WrtDeviceApis::Commons::Exception)
{
void ApplicationManager::OnRequestReceived(const EventApplicationKillPtr& event)
{
- LoggerD("entered");
-
Try
{
int ret;
if(contextId.empty())
{
- LoggerE("Context id is empty");
+ LoggerE("Context id is mandatory");
event->setExceptionCode(Commons::ExceptionCodes::InvalidArgumentException);
return;
}
- LoggerD("Killing context id : " << contextId);
-
int pid;
std::stringstream(contextId) >> pid;
if(pid <= 0)
{
- LoggerE("Context id is wrong : " << pid);
+ LoggerE("Given context id is wrong");
event->setExceptionCode(Commons::ExceptionCodes::NotFoundException);
return;
}
void ApplicationManager::OnRequestReceived(const EventApplicationLaunchAppControlPtr& event)
{
- LoggerD("entered");
-
Try
{
int ret = 0;
ApplicationControlPtr appControl = event->getAppControl();
if(appControl == NULL)
{
- LoggerE("appControl is NULL");
+ LoggerE("appControl is mandatory");
event->setExceptionCode(Commons::ExceptionCodes::InvalidArgumentException);
return;
}
std::string operation = appControl->getOperation();
if(operation.empty())
{
- LoggerD("operation being madatory is empty");
+ LoggerE("operation is madatory");
event->setExceptionCode(Commons::ExceptionCodes::InvalidArgumentException);
return;
}
if (!appId.empty())
{
- LoggerD(" app id : " << appId);
-
service_set_app_id(service, appId.c_str());
// get resolved app id for aliased app id cannot be used to app_manager_get_app_info()
}
service_set_operation(service, operation.c_str() );
- LoggerD(" operation : " << operation);
std::string uri = appControl->getUri();
if (!uri.empty())
{
- LoggerD(" uri : " << uri);
service_set_uri(service, uri.c_str() );
}
std::string mime = appControl->getMime();
if (!mime.empty())
{
- LoggerD(" mime : " << mime);
service_set_mime(service, mime.c_str() );
}
std::string category = appControl->getCategory();
if (!category.empty())
{
- LoggerD(" category : " << category);
service_set_category(service, category.c_str() );
}
if(!appControlDataArray.empty())
{
- LoggerD(" datas : " << appControlDataArray.size());
+ LoggerI(" data size : " << appControlDataArray.size());
ApplicationControlDataArray::iterator iter;
for(iter = appControlDataArray.begin(); iter != appControlDataArray.end(); iter++)
ApplicationControlDataPtr appControlData = *iter;
std::string key = appControlData->getKey();
- LoggerD(" key : " << key);
if(key.empty())
{
for (size_t j = 0; j < size; j++)
{
arr[j] = valueArray.at(j).c_str();
- LoggerD(" value : " << arr[j]);
}
// @20121207-wscho: roll-back to return extra-data instead of extra-data array when the value size is one.
switch (ret)
{
case SERVICE_ERROR_INVALID_PARAMETER:
- LoggerD("service_send_launch_request returns SERVICE_ERROR_INVALID_PARAMETER");
+ LoggerE("service_send_launch_request returns SERVICE_ERROR_INVALID_PARAMETER");
event->setExceptionCode(Commons::ExceptionCodes::InvalidArgumentException);
break;
case SERVICE_ERROR_OUT_OF_MEMORY:
- LoggerD("service_send_launch_request returns SERVICE_ERROR_OUT_OF_MEMORY");
+ LoggerE("service_send_launch_request returns SERVICE_ERROR_OUT_OF_MEMORY");
event->setExceptionCode(Commons::ExceptionCodes::PlatformException);
break;
case SERVICE_ERROR_LAUNCH_REJECTED:
- LoggerD("service_send_launch_request returns SERVICE_ERROR_LAUNCH_REJECTED!!!");
+ LoggerE("service_send_launch_request returns SERVICE_ERROR_LAUNCH_REJECTED!!!");
event->setExceptionCode(Commons::ExceptionCodes::PlatformException);
break;
case SERVICE_ERROR_APP_NOT_FOUND:
- LoggerD("service_send_launch_request returns SERVICE_ERROR_APP_NOT_FOUND");
+ LoggerE("service_send_launch_request returns SERVICE_ERROR_APP_NOT_FOUND");
event->setExceptionCode(Commons::ExceptionCodes::NotFoundException);
break;
default:
- LoggerD("service_send_launch_request returns UNKNOWN ERROR!!!");
+ LoggerE("service_send_launch_request returns UNKNOWN ERROR!!!");
event->setExceptionCode(Commons::ExceptionCodes::UnknownException);
break;
}
void ApplicationManager::OnRequestReceived(const EventApplicationLaunchAppControlReplyPtr& event)
{
- LoggerD("entered");
event->switchToManualAnswer();
}
void ApplicationManager::OnRequestReceived(const EventApplicationFindAppControlPtr& event)
{
- LoggerD("entered");
-
Try
{
ApplicationControlPtr appControl = event->getAppControl();
std::string operation = appControl->getOperation();
if(operation.empty())
{
- LoggerD("operation being madatory is empty");
+ LoggerE("operation is madatory");
event->setExceptionCode(Commons::ExceptionCodes::InvalidArgumentException);
return;
}
service_create(&service);
service_set_operation(service, operation.c_str() );
- LoggerD(" operation : " << operation);
std::string uri = appControl->getUri();
if (!uri.empty())
{
- LoggerD(" uri : " << uri);
service_set_uri(service, uri.c_str() );
}
std::string mime = appControl->getMime();
if (!mime.empty())
{
- LoggerD(" mime : " << mime);
service_set_mime(service, mime.c_str() );
}
std::string category = appControl->getCategory();
if (!category.empty())
{
- LoggerD(" category : " << category);
service_set_category(service, category.c_str() );
}
if(!appControlDataArray.empty())
{
- LoggerD(" datas : " << appControlDataArray.size());
+ LoggerD(" data size : " << appControlDataArray.size());
ApplicationControlDataArray::iterator iter;
for(iter = appControlDataArray.begin(); iter != appControlDataArray.end(); iter++)
ApplicationControlDataPtr appControlData = *iter;
std::string key = appControlData->getKey();
- LoggerD(" key : " << key);
if(key.empty())
{
for (size_t j = 0; j < size; j++)
{
arr[j] = valueArray.at(j).c_str();
- LoggerD(" value : " << arr[j]);
}
// @20121207-wscho: roll-back to return extra-data instead of extra-data array when the value size is one.
void ApplicationManager::OnRequestReceived(const EventApplicationGetAppsContextPtr& event)
{
- LoggerD("entered");
-
Try
{
int ret = 0;
void ApplicationManager::OnRequestReceived(const EventApplicationGetAppContextPtr& event)
{
- LoggerD("entered");
-
Try
{
int ret = 0;
std::string contextId = event->getAppContextId();
- LoggerD("contextId : " << contextId);
int pid;
if (contextId.empty())
{
- LoggerD("empty");
//pid = getpid();
pid = getppid();
}
else
{
- LoggerD("not empty");
std::stringstream(contextId) >> pid;
if (pid <= 0)
{
- LoggerE("contextId is wrong : " << contextId);
+ LoggerE("Given contextId is wrong");
event->setExceptionCode(Commons::ExceptionCodes::NotFoundException);
return;
}
void ApplicationManager::OnRequestReceived(const EventApplicationGetAppsInfoPtr& event)
{
- LoggerD("entered");
-
Try
{
int ret = 0;
void ApplicationManager::OnRequestReceived(const EventApplicationGetAppInfoPtr& event)
{
- LoggerD("entered");
-
Try
{
std::string appId = event->getAppId();
// in case of no argument, get application information of current.
if (appId.empty())
{
- char *app_id = NULL;
-
- //int ret = app_get_id(&app_id); // webkit2 patch.
- int ret = get_current_app_id(&app_id);
- if((ret != APP_ERROR_NONE) || (app_id == NULL))
- {
- LoggerE("Can not get app id from current pid (" << ret << ")");
- event->setExceptionCode(Commons::ExceptionCodes::NotFoundException);
- return;
- }
- appId = app_id;
- free(app_id);
+ appId = get_current_app_id();
}
pkgmgrinfo_appinfo_h handle;
int ret = pkgmgrinfo_appinfo_get_appinfo(appId.c_str(), &handle);
if (ret != PMINFO_R_OK) {
event->setExceptionCode(Commons::ExceptionCodes::NotFoundException);
+ return;
}
ApplicationInformationPtr appInfo = create_app_info(handle);
void ApplicationManager::OnRequestReceived(const EventApplicationAddAppInfoEventListenerPtr& event)
{
- LoggerD("entered");
-
Try
{
EventApplicationAppInfoEventListenerEmitterPtr emitter = event->getEmitter();
void ApplicationManager::OnRequestReceived(const EventApplicationRemoveAppInfoEventListenerPtr& event)
{
- LoggerD("entered");
-
Try
{
long watchId = event->getWatchId();
void ApplicationManager::OnRequestReceived(const EventApplicationGetAppCertsPtr& event)
{
- LoggerD("entered");
-
Try
{
std::string appId = event->getAppId();
// in case of no argument, get application information of current.
if (appId.empty())
{
- char *tmp = NULL;
-
- //int ret = app_get_id(&tmp);
- int ret = get_current_app_id(&tmp);
- if((ret != APP_ERROR_NONE) || (tmp == NULL))
- {
- LoggerE("Can not get app id from current pid (" << ret << ")");
- event->setExceptionCode(Commons::ExceptionCodes::NotFoundException);
- return;
- }
-
- appId = tmp;
- if (tmp)
- free(tmp);
+ appId = get_current_app_id();
}
char* package = getPackageByAppId(appId.c_str());
if (package == NULL)
{
- LoggerE("Can not get package from appId (" << appId << ")");
+ LoggerE("Can not get package");
event->setExceptionCode(Commons::ExceptionCodes::NotFoundException);
return;
}
- LoggerD("package : " << package);
package_info_h pkg_info;
int result = 0;
}
event->setAppCerts(certArray);
-
- LoggerD("Finish to getting package cert info");
}
Catch (WrtDeviceApis::Commons::Exception)
{
void ApplicationManager::OnRequestReceived(const EventApplicationGetAppSharedURIPtr& event)
{
- LoggerE("ApplicationManager::getAppCerts");
std::string id = event->getAppId();
-
std::string appId;
- int ret = 0;
- LoggerE("appId(" << id << ")");
- if (id.empty()) {
- char *app_id = NULL;
- //int ret = app_get_id(&app_id); // webkit2 patch.
- ret = get_current_app_id(&app_id);
- if((ret != APP_ERROR_NONE) || (app_id == NULL)) {
- LoggerE("Can not get app id from current pid (" << ret << ")");
- event->setExceptionCode(Commons::ExceptionCodes::NotFoundException);
- return;
- }
- appId = app_id;
- free(app_id);
+ if (id.empty()) {
+ appId = get_current_app_id();
} else {
appId = id;
}
app_info_h handle;
char* pkg_name = NULL;
- ret = app_manager_get_app_info(appId.c_str(), &handle);
+ int ret = app_manager_get_app_info(appId.c_str(), &handle);
if (ret != APP_ERROR_NONE) {
- LoggerD("Fail to get appinfo by " << appId);
+ LoggerD("Fail to get appinfo");
event->setExceptionCode(Commons::ExceptionCodes::NotFoundException);
return;
}
ret = app_info_get_package(handle, &pkg_name);
if ((ret != APP_ERROR_NONE) || (pkg_name == NULL)) {
- LoggerD("Fail to get pkg_name by " << appId);
+ LoggerD("Fail to get pkg_name");
event->setExceptionCode(Commons::ExceptionCodes::NotFoundException);
return;
}
app_info_destroy(handle);
- LoggerE("pkg_name(" << pkg_name << ")");
-
pkgmgrinfo_pkginfo_h pkginfo_h;
char* root_path = NULL;
ret = pkgmgrinfo_pkginfo_get_root_path(pkginfo_h, &root_path);
if ((ret != PMINFO_R_OK) && (root_path != NULL)) {
- LoggerD("Fail to get root path");
+ LoggerE("Fail to get root path");
free(pkg_name);
event->setExceptionCode(Commons::ExceptionCodes::PlatformException);
return;
}
- LoggerE("pkg_name(" << root_path << ")");
-
std::string sharedURI = TIZENAPIS_APP_FILE_SCHEME + std::string(root_path) + TIZENAPIS_APP_SLASH +
std::string(pkg_name) + TIZENAPIS_APP_SLASH + TIZENAPIS_APP_SHARED;
free(pkg_name);
- LoggerE("sharedURI(" << sharedURI << ")");
-
pkgmgrinfo_pkginfo_destroy_pkginfo(pkginfo_h);
event->setSharedURI(sharedURI);
void ApplicationManager::onAppManagerEventInstalled(const char *appId)
{
- LoggerD("APP_MANAGER_EVENT_INSTALLED, appId : "<< appId);
-
EventApplicationAppInfoEventListenerPtr event(new EventApplicationAppInfoEventListener());
pkgmgrinfo_appinfo_h handle;
int ret = pkgmgrinfo_appinfo_get_appinfo(appId, &handle);
if (ret != PMINFO_R_OK) {
event->setExceptionCode(Commons::ExceptionCodes::NotFoundException);
+ } else {
+ ApplicationInformationPtr appInfo = create_app_info(handle);
+ event->setAppInfo(appInfo);
+ pkgmgrinfo_appinfo_destroy_appinfo(handle);
}
-
- ApplicationInformationPtr appInfo = create_app_info(handle);
- event->setAppInfo(appInfo);
- pkgmgrinfo_appinfo_destroy_appinfo(handle);
event->setType(EventApplicationAppInfoEventListener::OnInstalled);
m_installedApplicationsEmitters.emit(event);
void ApplicationManager::onAppManagerEventUninstalled(const char *appId)
{
- LoggerD("APP_MANAGER_EVENT_UNINSTALLED, appId : "<< appId);
-
EventApplicationAppInfoEventListenerPtr event(new EventApplicationAppInfoEventListener());
ApplicationInformationPtr appInfo(new ApplicationInformation(appId));
void ApplicationManager::onAppManagerEventUpdated(const char *appId)
{
- LoggerD("APP_MANAGER_EVENT_UPDATED, appId : "<< appId);
-
EventApplicationAppInfoEventListenerPtr event(new EventApplicationAppInfoEventListener());
pkgmgrinfo_appinfo_h handle;
int ret = pkgmgrinfo_appinfo_get_appinfo(appId, &handle);
if (ret != PMINFO_R_OK) {
event->setExceptionCode(Commons::ExceptionCodes::NotFoundException);
+ } else {
+ ApplicationInformationPtr appInfo = create_app_info(handle);
+ event->setAppInfo(appInfo);
+ pkgmgrinfo_appinfo_destroy_appinfo(handle);
}
-
- ApplicationInformationPtr appInfo = create_app_info(handle);
- event->setAppInfo(appInfo);
- pkgmgrinfo_appinfo_destroy_appinfo(handle);
event->setType(EventApplicationAppInfoEventListener::OnUpdated);
m_installedApplicationsEmitters.emit(event);
DataPtrType dataPtr = getData(*keySetIter);
if(dataPtr == NULL)
{
- LoggerW("No data for " << *keySetIter);
+ LoggerD("No data for " << *keySetIter);
break;
}
typename KeyMapType::iterator keyMapIter = m_keyMap.find(key);
if(keyMapIter == m_keyMap.end())
{
- LoggerW("No data for Key");
+ LoggerD("No data for Key");
return;
}
DataKeySetType::iterator keySetIter = keySet.find(dataKey);
if(keySetIter == keySet.end())
{
- LoggerW("No data for " << dataKey);
+ LoggerD("No data for " << dataKey);
return;
}
typename DataMapType::iterator dataKeyIter = m_dataMap.find(*keySetIter);
if(dataKeyIter == m_dataMap.end())
{
- LoggerW("No data to erase.");
+ LoggerD("No data to erase.");
break;
}
void JSApplication::initialize(JSContextRef context, JSObjectRef object)
{
- LoggerI(">> initialize");
}
void JSApplication::finalize(JSObjectRef object)
{
- LoggerI(">> finalize");
JSApplicationPriv* priv = static_cast<JSApplicationPriv*>(JSObjectGetPrivate(object));
JSObjectSetPrivate(object, NULL);
- LoggerD("Deleting JSApplication object");
+ LoggerI("Deleting JSApplication object");
delete priv;
}
JSValueRef JSApplication::makeObject(JSContextRef ctx, const ApplicationPtr value)
{
- LoggerI("entered to ApplicationPtr ");
if(value == NULL) {
throw TypeMismatchException("Private object is NULL.");
}
const JSValueRef arguments[],
JSValueRef* exception)
{
- LoggerD("entered");
TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0);
try {
const JSValueRef arguments[],
JSValueRef* exception)
{
- LoggerD("entered");
TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0);
try {
const JSValueRef arguments[],
JSValueRef* exception)
{
- LoggerD("entered");
TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0);
JSApplicationPriv *priv = static_cast<JSApplicationPriv*>(JSObjectGetPrivate(thisObject));
ScopedJSStringRef(JSStringCreateWithUTF8CString("__bundle")).get(),
exception);
if (JSValueIsUndefined(context, encodedBundle) || JSValueIsNull(context, encodedBundle)) {
- LoggerE("encodedBundle"+converter->toString(encodedBundle));
return JSValueMakeNull(context);
}
void JSApplicationCert::initialize(JSContextRef context, JSObjectRef object)
{
- LoggerI(">> initialize");
}
void JSApplicationCert::finalize(JSObjectRef object)
{
- LoggerI(">> finalize");
JSApplicationCertPriv* priv = static_cast<JSApplicationCertPriv*>(JSObjectGetPrivate(object));
JSObjectSetPrivate(object, NULL);
- LoggerD("Deleting JSApplicationCert object");
delete priv;
}
CommonsJavaScript::Converter converter(context);
ApplicationCertPtr privateData = getPrivData(object);
- LoggerE("JSApplicationCert::getProperty = " << propertyName);
+ LoggerD("JSApplicationCert::getProperty = " << propertyName);
if (JSStringIsEqualToUTF8CString(propertyName, TIZEN_APPLICATION_CERT_TYPE)) {
return converter.toJSValueRef(privateData->getType());
void JSApplicationContext::initialize(JSContextRef context, JSObjectRef object)
{
- LoggerI(">> initialize");
}
void JSApplicationContext::finalize(JSObjectRef object)
{
- LoggerI(">> finalize");
JSApplicationContextPriv* priv = static_cast<JSApplicationContextPriv*>(JSObjectGetPrivate(object));
JSObjectSetPrivate(object, NULL);
- LoggerD("Deleting JSApplicationContext object");
delete priv;
}
#include <SecurityExceptions.h>
#include <JSWebAPIException.h>
#include <ArgumentValidator.h>
-#include <Logger.h>
//#include <Commons/Exception.h>
//#include <JSTizenExceptionFactory.h>
//#include <JSTizenException.h>
#include "plugin_config.h"
-#include <Logger.h>
#include "ApplicationConverter.h"
#include "ApplicationUtil.h"
JSObjectRef JSApplicationControl::createJSObject(JSContextRef context, const ApplicationControlPtr &appsvc)
{
- LoggerI(">> createJSObject");
JSApplicationControlPriv *priv = new JSApplicationControlPriv(context, appsvc);
if (!priv) {
void JSApplicationControl::initialize(JSContextRef context,JSObjectRef object)
{
- LoggerI(">> initialize");
}
void JSApplicationControl::finalize(JSObjectRef object)
{
- LoggerI(">> finalize");
JSApplicationControlPriv* priv = static_cast<JSApplicationControlPriv*>(JSObjectGetPrivate(object));
JSObjectSetPrivate(object, NULL);
- LoggerD("Deleting ApplicationControl object");
delete priv;
}
ApplicationControlPtr JSApplicationControl::getPrivData(JSContextRef context, JSObjectRef object)
{
- LoggerD("entered");
JSApplicationControlPriv *priv = static_cast<JSApplicationControlPriv*>(JSObjectGetPrivate(object));
if (!priv) {
throw TypeMismatchException("Private object is null");
ApplicationConverterFactory::ConverterType converter = ApplicationConverterFactory::getConverter(context);
if (JSStringIsEqualToUTF8CString(propertyName, TIZEN_APPLICATION_CONTROL_OPERATION)) {
- LoggerD("JSApplicationControl::getProperty::operation " << appsvc->getOperation());
return converter->toJSValueRef(appsvc->getOperation());
} else if (JSStringIsEqualToUTF8CString(propertyName, TIZEN_APPLICATION_CONTROL_URI)) {
std::string uri = appsvc->getUri();
- LoggerD("JSApplicationControl::getProperty::uri " << uri);
if (uri.empty()) {
return JSValueMakeNull(context);
} else {
}
} else if (JSStringIsEqualToUTF8CString(propertyName, TIZEN_APPLICATION_CONTROL_MIME)) {
std::string mime = appsvc->getMime();
- LoggerD("JSApplicationControl::getProperty::mime " << mime);
if (mime.empty()) {
return JSValueMakeNull(context);
} else {
}
} else if (JSStringIsEqualToUTF8CString(propertyName, TIZEN_APPLICATION_CONTROL_CATEGORY)) {
std::string category = appsvc->getCategory();
- LoggerD("JSApplicationControl::getProperty::category " << category);
if (category.empty()) {
return JSValueMakeNull(context);
} else {
return converter->toJSValueRef(category);
}
}else if (JSStringIsEqualToUTF8CString(propertyName, TIZEN_APPLICATION_CONTROL_DATA)) {
- LoggerD("JSApplicationControl::getProperty::extraData ");
return converter->toJSValueRef(appsvc->getAppControlDataArray());
}
#include "JSApplicationControlData.h"
#include "ApplicationConverter.h"
#include "ApplicationUtil.h"
-#include <Logger.h>
using namespace WrtDeviceApis::Commons;
using namespace WrtDeviceApis::CommonsJavaScript;
JSObjectRef JSApplicationControlData::createJSObject(JSContextRef context, const ApplicationControlDataPtr &appdata)
{
- LoggerI(">> createJSObject");
JSApplicationControlDataPriv *priv = new JSApplicationControlDataPriv(context, appdata);
if (!priv) {
void JSApplicationControlData::initialize(JSContextRef context, JSObjectRef object)
{
- LoggerI(">> initialize");
}
void JSApplicationControlData::finalize(JSObjectRef object)
{
- LoggerI(">> finalize");
JSApplicationControlDataPriv* priv = static_cast<JSApplicationControlDataPriv*>(JSObjectGetPrivate(object));
JSObjectSetPrivate(object, NULL);
- LoggerD("Deleting ApplicationControl object");
delete priv;
}
ApplicationControlDataPtr JSApplicationControlData::getPrivData(JSObjectRef object)
{
- LoggerD("entered");
JSApplicationControlDataPriv *priv = static_cast<JSApplicationControlDataPriv*>(JSObjectGetPrivate(object));
if (!priv) {
throw TypeMismatchException("Private object is null");
{
if ( m_onInstalled == NULL )
{
- //LoggerD("oninstalled callback is not set");
return;
}
JSValueRef objParam[1] = { appInfo };
{
if ( m_onUpdated == NULL )
{
- //LoggerD("onupdated callback is not set");
return;
}
JSValueRef objParam[1] = { appInfo };
{
if ( m_onUninstalled == NULL )
{
- //LoggerD("onuninstalled callback is not set");
return;
}
JSValueRef objParam[1] = { appId };
{
if ( m_onError == NULL )
{
- //LoggerD("Error callback is not set");
return;
}
JSValueRef objParam[1] = { error };
if (callback == NULL)
{
- LoggerE("callback is NULL");
+ LoggerE("callback cannot be NULL");
return;
}
{
if (argc == 0)
{
- //LoggerD("Calling object directly, no arguments");
JSObjectCallAsFunction(context, callback, object, 0, NULL, NULL);
}
else
{
- //LoggerD("Calling object directly, one argument");
JSObjectCallAsFunction(context, callback, object, argc, argv, NULL);
}
return;
void JSApplicationInformation::initialize(JSContextRef context, JSObjectRef object)
{
- //LoggerI(">> initialize");
}
void JSApplicationInformation::finalize(JSObjectRef object)
{
- LoggerI(">> finalize");
JSApplicationInformationPriv* priv = static_cast<JSApplicationInformationPriv*>(JSObjectGetPrivate(object));
JSObjectSetPrivate(object, NULL);
- LoggerD("Deleting JSApplicationInformation object");
delete priv;
}
// below code is temporal. if package manager issue is solved, rollback this code.
#if 1 // below code is used to fill attribute lazy
if (!privateData->isInitialized()) {
- //LoggerI(">> is Not Initialized");
AppManagerWrapperSingleton::Instance().initializeAppInfo(privateData);
}
#endif
void JSApplicationManager::initialize(JSContextRef context, JSObjectRef object)
{
- LoggerD(">>> JSApplicationManager::initialize");
ApplicationController* priv = static_cast<ApplicationController*>(JSObjectGetPrivate(object));
if (!priv) {
priv = new ApplicationController(context, applications);
if (!JSObjectSetPrivate(object, static_cast<void*>(priv))) {
- LoggerE("Object can't store private data.");
delete priv;
}
} else {
const JSValueRef arguments[],
JSValueRef* exception)
{
- LoggerD("entered");
TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0);
IApplicationManagerPtr appmgr;
ApplicationController *controller;
throw UnknownException("Unknown exception occured");
}
- LoggerE("get Current Application Successfully. convert application to JSValue");
-
- //return converter->toJSValueRefFromApplication(event->getApp());
TIME_TRACER_ITEM_END(__FUNCTION__, 0);
return JSApplication::makeObject(context, event->getApp());
} catch (...) {
const JSValueRef arguments[],
JSValueRef* exception)
{
- LoggerD("entered");
TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0);
TIME_TRACER_ITEM_BEGIN("launch(async)", 0);
const JSValueRef arguments[],
JSValueRef* exception)
{
- LoggerD("entered");
TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0);
TIME_TRACER_ITEM_BEGIN("kill(async)", 0);
const JSValueRef arguments[],
JSValueRef* exception)
{
- LoggerD("entered");
TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0);
try {
const JSValueRef arguments[],
JSValueRef* exception)
{
- LoggerD("entered");
TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0);
TIME_TRACER_ITEM_BEGIN("launchAppControlReply", 0);
TIME_TRACER_ITEM_BEGIN("launchAppControl(async)", 0);
// id
std::string id = validator.toString(1, true, "");
- LoggerW("id : " << id);
event->setAppId(id);
// successCallback
const JSValueRef arguments[],
JSValueRef* exception)
{
- LoggerD("entered");
TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0);
TIME_TRACER_ITEM_BEGIN("findAppControl(async)", 0);
try {
const JSValueRef arguments[],
JSValueRef* exception)
{
- LoggerD("entered");
TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0);
TIME_TRACER_ITEM_BEGIN("getAppsContext(async)", 0);
return JSValueMakeUndefined(context);
} catch (const BasePlatformException &err) {
- LoggerD("BasePlatformException");
+ LoggerE("BasePlatformException");
return JSWebAPIException::throwException(context, exception, err);
} catch (...) {
- LoggerD("etc...");
+ LoggerE("etc...");
DeviceAPI::Common::UnknownException err("Unknown Error in ApplicationManager.getAppsContext().");
return JSWebAPIException::throwException(context, exception, err);
}
const JSValueRef arguments[],
JSValueRef* exception)
{
- LoggerD("entered");
TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0);
try {
// contextId
std::string contextId = validator.toString(0, true, "");
- LoggerD("contextId : " << contextId);
event->setAppContextId(contextId);
event->setForSynchronousCall();
const JSValueRef arguments[],
JSValueRef* exception)
{
- LoggerD("entered");
TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0);
TIME_TRACER_ITEM_BEGIN("getAppsInfo(async)", 0);
const JSValueRef arguments[],
JSValueRef* exception)
{
- LoggerD("entered");
TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0);
try {
const JSValueRef arguments[],
JSValueRef* exception)
{
- LoggerD("entered");
TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0);
try {
const JSValueRef arguments[],
JSValueRef* exception)
{
- LoggerD("entered");
TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0);
try {
// watchId
long watchId = validator.toLong(0);
- LoggerD("watchId : " << watchId);
event->setWatchId(watchId);
event->setForSynchronousCall();
const JSValueRef arguments[],
JSValueRef* exception)
{
- LoggerD("entered");
TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0);
AceSecurityStatus status = APPLICATION_CHECK_ACCESS(APPLICATION_FUNCTION_API_GET_APP_CERTS);
const JSValueRef arguments[],
JSValueRef* exception)
{
- LoggerD("entered");
TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0);
try {
}
void JSApplicationManager::setTitleProperty(JSContextRef context, std::string propertyValue){
- LoggerD("<<<propertyValue:[" << propertyValue << "]");
WrtDeviceApis::CommonsJavaScript::Converter converter(context);
// get window object
JSValueMakeString(context, JSStringCreateWithUTF8CString(propertyValue.c_str())),
kJSPropertyAttributeNone,
NULL);
-
- LoggerD(">>>");
}
}
JSObjectRef JSRequestedApplicationControl::createJSObject(JSContextRef context, const RequestedApplicationControlPtr &appsvc)
{
- LoggerI(">> createJSObject");
JSRequestedApplicationControlPriv *priv = new JSRequestedApplicationControlPriv(context, appsvc);
if (!priv) {
void JSRequestedApplicationControl::initialize(JSContextRef context,JSObjectRef object)
{
- LoggerI(">> initialize");
}
void JSRequestedApplicationControl::finalize(JSObjectRef object)
{
- LoggerI(">> finalize");
JSRequestedApplicationControlPriv* priv = static_cast<JSRequestedApplicationControlPriv*>(JSObjectGetPrivate(object));
JSObjectSetPrivate(object, NULL);
- LoggerD("Deleting ApplicationControl object");
delete priv;
}
RequestedApplicationControlPtr JSRequestedApplicationControl::getPrivData(JSObjectRef object)
{
- LoggerD("entered");
JSRequestedApplicationControlPriv *priv = static_cast<JSRequestedApplicationControlPriv*>(JSObjectGetPrivate(object));
if (!priv) {
ThrowMsg(WrtDeviceApis::Commons::NullPointerException, "Private object is null");
ApplicationConverterFactory::ConverterType converter = ApplicationConverterFactory::getConverter(context);
if (JSStringIsEqualToUTF8CString(propertyName, TIZEN_APPLICATION_CONTROL)) {
- LoggerD("JSRequestedApplicationControl::getProperty::appControl " << providerMgr->getAppControl());
return converter->toJSValueRef(providerMgr->getAppControl());
} else if (JSStringIsEqualToUTF8CString(propertyName, TIZEN_CALLER_APP_ID)) {
- LoggerD("JSRequestedApplicationControl::getProperty::callerAppId " << providerMgr->getCallerAppId());
return converter->toJSValueRef(providerMgr->getCallerAppId());
}
} Catch(WrtDeviceApis::Commons::Exception) {
- LoggerE("Exception: " << _rethrown_exception.GetMessage());
+ LoggerE("Exception: "<< _rethrown_exception.GetMessage());
return JSDOMExceptionFactory::UnknownException.make(context, exception);
}
const JSValueRef arguments[],
JSValueRef* exception)
{
- LoggerD("entered");
JSRequestedApplicationControlPriv *priv = static_cast<JSRequestedApplicationControlPriv*>(JSObjectGetPrivate(thisObject));
Try {
}
providerMgr->replyResult(resultArray);
} Catch (ConversionException) {
- LoggerW("Exception: "<<_rethrown_exception.GetMessage());
+ LoggerE("Exception: "<<_rethrown_exception.GetMessage());
return JSTizenExceptionFactory::postException(context, exception,JSTizenException::TYPE_MISMATCH_ERROR, _rethrown_exception.GetMessage());
} Catch (NotFoundException) {
- LoggerW("Exception: "<<_rethrown_exception.GetMessage());
+ LoggerE("Exception: "<<_rethrown_exception.GetMessage());
return JSTizenExceptionFactory::postException(context, exception,JSTizenException::NOT_FOUND_ERROR, _rethrown_exception.GetMessage());
} Catch (NullPointerException) {
- LoggerW("Exception: "<<_rethrown_exception.GetMessage());
+ LoggerE("Exception: "<<_rethrown_exception.GetMessage());
return JSTizenExceptionFactory::postException(context, exception,JSTizenException::UNKNOWN_ERROR, _rethrown_exception.GetMessage());
} Catch (Exception) {
- LoggerW("Exception: "<<_rethrown_exception.GetMessage());
+ LoggerE("Exception: "<<_rethrown_exception.GetMessage());
return JSTizenExceptionFactory::postException(context, exception,JSTizenException::UNKNOWN_ERROR, _rethrown_exception.GetMessage());
}
const JSValueRef arguments[],
JSValueRef* exception)
{
- LoggerD("entered");
JSRequestedApplicationControlPriv *priv = static_cast<JSRequestedApplicationControlPriv*>(JSObjectGetPrivate(thisObject));
Try {
RequestedApplicationControlPtr providerMgr = priv->getObject();
providerMgr->replyFailure();
} Catch (NotFoundException) {
- LoggerW("Exception: "<<_rethrown_exception.GetMessage());
+ LoggerE("Exception: "<<_rethrown_exception.GetMessage());
return JSTizenExceptionFactory::postException(context, exception,JSTizenException::NOT_FOUND_ERROR, _rethrown_exception.GetMessage());
} Catch (NullPointerException) {
- LoggerW("Exception: "<<_rethrown_exception.GetMessage());
+ LoggerE("Exception: "<<_rethrown_exception.GetMessage());
return JSTizenExceptionFactory::postException(context, exception,JSTizenException::UNKNOWN_ERROR, _rethrown_exception.GetMessage());
} Catch (Exception) {
- LoggerW("Exception: "<<_rethrown_exception.GetMessage());
+ LoggerE("Exception: "<<_rethrown_exception.GetMessage());
return JSTizenExceptionFactory::postException(context, exception,JSTizenException::UNKNOWN_ERROR, _rethrown_exception.GetMessage());
}
m_appControl(NULL),
m_appService(NULL)
{
- LoggerD("entered");
}
RequestedApplicationControl::~RequestedApplicationControl()
{
- LoggerD("entered");
}
ApplicationControlPtr RequestedApplicationControl::getAppControl() const
if (arr != NULL) {
for (size_t j = 0; j < valueArray.size(); j++) {
arr[j] = valueArray.at(j).c_str();
- LoggerD("== value : " << arr[j]);
}
}
service_add_extra_data_array(reply, appControlDataArray.at(i)->getKey().c_str(), arr, valueArray.size());
// temporal code to check caller liveness
if (m_callerAppId.empty()) {
- LoggerD("m_callerAppId is empty. means caller is dead");
+ LoggerE("m_callerAppId is empty. means caller is dead");
ThrowMsg(NotFoundException, "Cannot find caller");
} else {
bool running = false;
int ret = app_manager_is_running(m_callerAppId.c_str(), &running);
if ((ret != APP_MANAGER_ERROR_NONE) || !running) {
- LoggerD("caller is not running");
+ LoggerE("caller is not running");
ThrowMsg(NotFoundException, "Cannot find caller");
}
}
service_h reply;
service_create(&reply);
- LoggerE("[replyFailure] enter RequestedApplicationControl::replyFailure");
-
// temporal code to check caller liveness
if (m_callerAppId.empty()) {
- LoggerD("m_callerAppId is empty. means caller is dead");
+ LoggerE("m_callerAppId is empty. means caller is dead");
ThrowMsg(NotFoundException, "Cannot find caller");
} else {
bool running = false;
int ret = app_manager_is_running(m_callerAppId.c_str(), &running);
if ((ret != APP_MANAGER_ERROR_NONE) || !running) {
- LoggerD("caller is not running");
+ LoggerE("caller is not running");
ThrowMsg(NotFoundException, "Cannot find caller");
}
}
// limitations under the License.
//
+#include <dpl/wrt-dao-ro/widget_dao_read_only.h>
+#include <dpl/string.h>
+
#include <Commons/plugin_initializer_def.h>
#include <Commons/WrtAccess/WrtAccess.h>
#include <sys/types.h>
#include "JSApplicationControl.h"
#include "ApplicationAsyncCallbackManager.h"
#include "ApplicationListenerManager.h"
+#include "AppManagerWrapper.h"
#include <Logger.h>
using namespace WrtDeviceApis;
void on_widget_start_callback(int widgetId) {
LoggerD("[Tizen1_0\\Application] on_widget_start_callback ("<<widgetId<<")");
Try {
+ WrtDB::WidgetDAOReadOnly dao(widgetId);
+ std::string tzAppId = DPL::ToUTF8String(dao.getTzAppId());
+ AppManagerWrapperSingleton::Instance().setCurrentAppId(tzAppId);
+
TIME_TRACER_INIT();
WrtAccessSingleton::Instance().initialize(widgetId);
} Catch(WrtDeviceApis::Commons::Exception) {
void BluetoothAdapter::onStateChangedCB(int result, bt_adapter_state_e adapterState, void *userData)
{
- LoggerD("Entered");
-
BluetoothAdapterPtr object = static_cast<BluetoothAdapterPtr>(userData);
if(!object) {
LoggerW("userData is NULL");
void BluetoothAdapter::onNameChangedCB(char *name, void *userData)
{
- LoggerD("Entered");
-
BluetoothAdapterPtr object = static_cast<BluetoothAdapterPtr>(userData);
if(!object) {
LoggerW("userData is NULL");
void BluetoothAdapter::onVisibilityChangedCB(int result, bt_adapter_visibility_mode_e visibilityMode, void *userData)
{
- LoggerD("Entered");
-
BluetoothAdapterPtr object = static_cast<BluetoothAdapterPtr>(userData);
if(!object) {
LoggerW("userData is NULL");
UnknownException error("Unknown error");
callback->invokeCallback("error", JSWebAPIError::makeJSWebAPIError(context, error));
}
- }
+ }
bt_adapter_unset_visibility_mode_changed_cb();
}
void BluetoothAdapter::onDiscoveryStateChangedCB(int result, bt_adapter_device_discovery_state_e discoveryState,
bt_adapter_device_discovery_info_s *discoveryInfo, void *userData)
{
- LoggerD("Entered");
-
BluetoothAdapterPtr object = static_cast<BluetoothAdapterPtr>(userData);
if(!object) {
LoggerW("userData is NULL");
switch(discoveryState) {
case BT_ADAPTER_DEVICE_DISCOVERY_STARTED:
{
- LoggerD("BT_ADAPTER_DEVICE_DISCOVERY_STARTED");
+ LoggerD("Discovery started");
if(object->mUserDataList[DISCOVER_DEVICES] != NULL) { // requested event
MultiCallbackUserDataPtr callback =
static_cast<MultiCallbackUserDataPtr>(object->mUserDataList[DISCOVER_DEVICES]);
}
else {
if(callback) {
- LoggerD("Reset DISCOVER_DEVICES");
object->mUserDataList[DISCOVER_DEVICES].reset();
JSContextRef context = callback->getContext();
}
case BT_ADAPTER_DEVICE_DISCOVERY_FINISHED:
{
- LoggerD("BT_ADAPTER_DEVICE_DISCOVERY_FINISHED");
+ LoggerD("Discovery finished");
if(result == BT_ERROR_NONE || result == BT_ERROR_CANCELLED) {
// in case of discoverDevices()
if(object->mUserDataList[DISCOVER_DEVICES] != NULL) {
static_cast<MultiCallbackUserDataPtr>(object->mUserDataList[DISCOVER_DEVICES]);
if(callback) {
- LoggerD("Call onfinished()");
if(object->mDisappearedDevices.size() > 0) {
LoggerD("There are disappeared devices");
for(std::vector<std::string>::iterator iter = object->mDisappearedDevices.begin();
devices[i] = deviceObj;
}
- LoggerD("Reset DISCOVER_DEVICES");
object->mUserDataList[DISCOVER_DEVICES].reset();
callback->invokeCallback(
}
else { // There is no found device
LoggerD("There is no found device");
-
- LoggerD("Reset DISCOVER_DEVICES");
object->mUserDataList[DISCOVER_DEVICES].reset();
callback->invokeCallback(
//bt_adapter_unset_device_discovery_state_changed_cb();
}
else {
- LoggerW("result MUST be BT_ERROR_NONE or BT_ERROR_CANCELLED when BT_ADAPTER_DEVICE_DISCOVERY_FINISHED");
+ LoggerW("Unexpected result of discovery finish");
}
break;
}
case BT_ADAPTER_DEVICE_DISCOVERY_FOUND:
{
- LoggerD("BT_ADAPTER_DEVICE_DISCOVERY_FOUND");
+ LoggerD("A device is found");
if(!discoveryInfo) {
- LoggerW("discoveryInfo is NULL");
+ LoggerW("No information about found device");
return;
}
for(std::vector<std::string>::iterator iter = object->mDisappearedDevices.begin();
iter != object->mDisappearedDevices.end(); iter++) {
if(!strcmp(discoveryInfo->remote_address, (*iter).c_str())) {
- LoggerD("This device is still found");
object->mDisappearedDevices.erase(iter);
break;
}
callback->invokeCallback("ondevicefound", deviceObj);
}
else {
- LoggerW("result MUST be BT_ERROR_NONE when BT_ADAPTER_DEVICE_DISCOVERY_FOUND");
+ LoggerW("Unexpected result of discovery");
}
}
else { // unexpected event
bool BluetoothAdapter::foreachBondedDevicesCB(bt_device_info_s *deviceInfo, void *userData)
{
- LoggerD("Entered");
-
BluetoothAdapterPtr adapter = static_cast<BluetoothAdapterPtr>(userData);
if(!adapter) {
LoggerW("userData is NULL");
BluetoothDeviceSharedPtr foundDevice = *iter;
if(!strcmp(foundDevice->getAddress().c_str(), deviceInfo->remote_address)) {
- LoggerD("Already known device");
foundDevice->updateInfo(deviceInfo);
break;
}
}
if(iter == adapter->knownDevices.end()) {
- LoggerD("Add a device into foundDevices");
BluetoothDeviceSharedPtr device(new BluetoothDevice(deviceInfo));
adapter->knownDevices.push_back(device);
}
void BluetoothAdapter::onBondCreatedCB(int result, bt_device_info_s *deviceInfo, void *userData)
{
- LoggerD("Entered");
-
BluetoothAdapterPtr object = static_cast<BluetoothAdapterPtr>(userData);
if(!object) {
LoggerW("userData is NULL");
void BluetoothAdapter::onBondDestroyedCB(int result, char *remoteAddress, void *userData)
{
- LoggerD("Entered");
-
BluetoothAdapterPtr object = static_cast<BluetoothAdapterPtr>(userData);
if(!object) {
LoggerW("userData is NULL");
object->mDestroyBondingAddress.clear();
}
else { // unexpected event
- LoggerW("A bonding is created unexpectedly");
+ LoggerW("A bonding is destroyed unexpectedly");
}
}
void BluetoothAdapter::onSocketConnected(int result, bt_socket_connection_state_e state, bt_socket_connection_s *connection, void *userData)
{
- LoggerD("Entered");
-
BluetoothAdapterPtr object = static_cast<BluetoothAdapterPtr>(userData);
if(!object) {
LoggerW("userData is NULL");
do {
iter = object->mConnReqMap.find(remoteAddress);
if(iter != object->mConnReqMap.end() && !strcmp(iter->second->mUUID.c_str(), connection->service_uuid)) {
- LoggerD("Find");
break;
}
} while(iter != object->mConnReqMap.end());
}
if(object->mRegisteredUUID.size() == 0 && object->mConnReqMap.size() == 0 && object->mConnectedSocket.size() == 0) {
- LoggerD("mRegisteredUUID.size()=%d, mConnReqMap.size()=%d, mConnectedSocket.size()=%d",
- object->mRegisteredUUID.size(), object->mConnReqMap.size(), object->mConnectedSocket.size());
bt_socket_unset_connection_state_changed_cb();
}
}
void BluetoothAdapter::onSocketReceivedCB(bt_socket_received_data_s *data, void *userData)
{
- LoggerD("Entered");
-
BluetoothAdapterPtr object = static_cast<BluetoothAdapterPtr>(userData);
if(!object) {
LoggerW("userData is NULL");
BluetoothAdapter::BluetoothAdapter():
mEnabled(false)
{
- LoggerD("Entered");
-
if(bt_initialize() != BT_ERROR_NONE) {
LoggerE("bt_initialize() failed");
}
BluetoothAdapter::~BluetoothAdapter()
{
- LoggerD("Entered");
-
// unset platform callback
bt_adapter_unset_state_changed_cb();
bt_adapter_unset_name_changed_cb();
void BluetoothAdapter::unloadFrame(JSContextRef context)
{
- LoggerD("Entered");
-
LoggerD("Clean mUserDataList");
for(int i = 0; i <= DESTROY_BONDING; i++) {
if(mUserDataList[i]) {
MultiCallbackUserDataPtr callback = mUserDataList[i];
if(!GlobalContextManager::getInstance()->isAliveGlobalContext(callback->getContext())) {
- LoggerD("reset an userData");
mUserDataList[i].reset();
}
}
ConnReqMultiMapT::iterator temp = iter++;
MultiCallbackUserDataPtr callback = temp->second->mUserData;
if(!callback && !GlobalContextManager::getInstance()->isAliveGlobalContext(callback->getContext())) {
- LoggerD("erase a connectionRequest");
mConnReqMap.erase(temp);
}
}
void BluetoothAdapter::unregisterUUID(std::string &uuid)
{
- LoggerD("Entered");
-
mRegisteredUUID.erase(mRegisteredUUID.find(uuid));
if(mRegisteredUUID.size() == 0 && mConnReqMap.size() == 0 && mConnectedSocket.size() == 0) {
- LoggerD("mRegisteredUUID.size()=%d, mConnReqMap.size()=%d, mConnectedSocket.size()=%d",
- mRegisteredUUID.size(), mConnReqMap.size(), mConnectedSocket.size());
bt_socket_unset_connection_state_changed_cb();
}
}
bool BluetoothAdapter::closeConnectedSocket(int socket)
{
- LoggerD("Entered");
-
if(mEnabled == true) {
ConnectedSocketMapT::iterator iter = mConnectedSocket.find(socket);
if(iter == mConnectedSocket.end()) {
}
if(mRegisteredUUID.size() == 0 && mConnReqMap.size() == 0 && mConnectedSocket.size() == 0) {
- LoggerD("mRegisteredUUID.size()=%d, mConnReqMap.size()=%d, mConnectedSocket.size()=%d",
- mRegisteredUUID.size(), mConnReqMap.size(), mConnectedSocket.size());
bt_socket_unset_connection_state_changed_cb();
}
void BluetoothAdapter::removeConnReq(std::string &remoteAddress)
{
- LoggerD("Entered");
-
mConnReqMap.erase(remoteAddress);
if(mRegisteredUUID.size() == 0 && mConnReqMap.size() == 0 && mConnectedSocket.size() == 0) {
- LoggerD("mRegisteredUUID.size()=%d, mConnReqMap.size()=%d, mConnectedSocket.size()=%d",
- mRegisteredUUID.size(), mConnReqMap.size(), mConnectedSocket.size());
if(bt_socket_unset_connection_state_changed_cb() != BT_ERROR_NONE) {
LoggerW("Unsetting connection event callback failed");
}
BluetoothAdapter* BluetoothAdapter::getInstance()
{
- LoggerD("Entered");
-
static BluetoothAdapter instance;
return &instance;
}
bool BluetoothAdapter::isValidAddress(std::string &address)
{
- LoggerD("Entered");
-
pcrecpp::RE re("(([0-9a-zA-Z]+):)+([0-9a-zA-Z]+)");
std::string compareAddress = "00:12:47:08:9A:A6";
std::string BluetoothAdapter::getName() const
{
- LoggerD("Entered");
-
char* name = NULL;
std::string str = "";
void BluetoothAdapter::setName(std::string &name, MultiCallbackUserDataPtr userData)
{
- LoggerD("Entered");
-
if(mEnabled == true) {
std::string adapterName = getName();
if(adapterName == name) { // in case of same name
std::string BluetoothAdapter::getAddress() const
{
- LoggerD("Entered");
-
char* address = NULL;
std::string str = "";
bool BluetoothAdapter::getPowered() const
{
- LoggerD("Entered");
-
return mEnabled;
}
void BluetoothAdapter::setPowered(bool powered, MultiCallbackUserDataPtr userData)
{
- LoggerD("Entered");
-
if(powered == mEnabled) {
LoggerD("same state");
BluetoothCallbackUtil::syncToAsyncSuccessCallback(userData);
bool BluetoothAdapter::getVisible() const
{
- LoggerD("Entered");
-
bt_adapter_visibility_mode_e mode;
if (bt_adapter_get_visibility(&mode, NULL) == BT_ERROR_NONE) {
void BluetoothAdapter::setVisible(bool visible, unsigned int timeout, MultiCallbackUserDataPtr userData)
{
- LoggerD("Entered");
-
if(mEnabled == true) {
bt_adapter_visibility_mode_e discoverable_mode = BT_ADAPTER_VISIBILITY_MODE_NON_DISCOVERABLE;
if(visible == true) {
void BluetoothAdapter::discoverDevices(MultiCallbackUserDataPtr userData)
{
- LoggerD("Entered");
-
if(mUserDataList[DISCOVER_DEVICES] == NULL) {
mUserDataList[DISCOVER_DEVICES] = userData;
void BluetoothAdapter::stopDiscovery(MultiCallbackUserDataPtr userData)
{
- LoggerD("Entered");
-
if(mEnabled == true) {
bool isDiscovering = false;
void BluetoothAdapter::getKnownDevices(MultiCallbackUserDataPtr userData)
{
- LoggerD("Entered");
BluetoothCallbackUtil::syncToAsyncDeviceArrayCallback(userData);
}
void BluetoothAdapter::getDevice(std::string &address, MultiCallbackUserDataPtr userData)
{
- LoggerD("Entered");
BluetoothCallbackUtil::syncToAsyncDeviceCallback(userData, address);
}
void BluetoothAdapter::createBonding(std::string &address, MultiCallbackUserDataPtr userData)
{
- LoggerD("Entered");
-
if(!isValidAddress(address)) {
LoggerE("Wrong address");
NotFoundException *error = new NotFoundException("Wrong address");
void BluetoothAdapter::destroyBonding(std::string &address, MultiCallbackUserDataPtr userData)
{
- LoggerD("Entered");
-
if(!isValidAddress(address)) {
LoggerE("Wrong address");
NotFoundException *error = new NotFoundException("Wrong address");
void BluetoothAdapter::registerRFCOMMServiceByUUID(std::string &uuid, std::string &name, MultiCallbackUserDataPtr userData)
{
- LoggerD("Entered");
BluetoothCallbackUtil::syncToAsyncServiceCallback(userData, uuid, name);
}
void BluetoothAdapter::connectToServiceByUUID(std::string &remoteAddress, std::string &uuid, Common::MultiCallbackUserDataPtr userData)
{
- LoggerD("Entered");
-
if(!isValidUUID(uuid)) {
LoggerE("Wrong UUID");
InvalidValuesException *error = new InvalidValuesException("Wrong UUID");
void BluetoothAdapter::returnKnownDevices(Common::MultiCallbackUserDataPtr userData)
{
- LoggerD("Entered");
-
if(mEnabled == true) {
knownDevices = mFoundDevices;
if(bt_adapter_foreach_bonded_device(foreachBondedDevicesCB, this) == BT_ERROR_NONE) {
devices[i] = deviceObj;
}
- LoggerD("invoke successCallback");
userData->invokeCallback("success", JSObjectMakeArray(userData->getContext(), num, devices, NULL));
}
else { // There is no found device
- LoggerD("There is no found device");
userData->invokeCallback("success", JSObjectMakeArray(userData->getContext(), 0, NULL, NULL) );
}
}
void BluetoothAdapter::returnDevice(std::string &address, Common::MultiCallbackUserDataPtr userData)
{
- LoggerD("Entered");
-
if(!isValidAddress(address)) {
LoggerE("Wrong address");
userData->invokeCallback("error", JSWebAPIError::makeJSWebAPIError(userData->getContext(), NotFoundException("Wrong address")));
void BluetoothAdapter::returnRegisteredService(std::string &uuid, std::string &name, Common::MultiCallbackUserDataPtr userData)
{
- LoggerD("Entered");
-
if(!isValidUUID(uuid)) {
LoggerE("Wrong UUID");
userData->invokeCallback("error", JSWebAPIError::makeJSWebAPIError(userData->getContext(), InvalidValuesException("Wrong UUID")));
namespace Bluetooth {
static Eina_Bool jobCompleteCB(void *userData){
- LoggerD("Entered");
-
BluetoothCallbackUserDataPtr data = static_cast<BluetoothCallbackUserDataPtr>(userData);
if(!data) {
BluetoothClass::BluetoothClass(bt_class_s bluetoothClass)
{
- LoggerD("Enter");
mMajor = BluetoothClassDeviceMajor::getInstance()->getMajorValue(bluetoothClass.major_device_class);
mMinor = BluetoothClassDeviceMinor::getInstance()->getMinorValue(bluetoothClass.minor_device_class);
mServices= BluetoothClassDeviceService::getInstance()->getServiceValues(bluetoothClass.major_service_class_mask);
BluetoothClass::~BluetoothClass()
{
- LoggerD("Enter");
}
unsigned long BluetoothClass::getMajor() const
{
- LoggerD("Enter");
return mMajor;
}
unsigned long BluetoothClass::getMinor() const
{
- LoggerD("Enter");
return mMinor;
}
JSValueRef BluetoothClass::getServices(JSContextRef context)
{
- LoggerD("Enter");
/*
JSValueRef service = mLocalProperty.getProperty(context, BLUETOOTH_CLASS_SERVICES);
if(service == NULL) {
bool BluetoothClass::hasService(unsigned long service)
{
- LoggerD("Enter");
-
for(std::vector<unsigned long>::iterator iter = mServices.begin(); iter != mServices.end(); ++iter) {
if((*iter) == service) {
return true;
BluetoothClassDeviceMajor::BluetoothClassDeviceMajor()
{
- LoggerD("Enter");
-
mMajorStringMap.insert(std::pair<std::string, unsigned long>("MISC", 0x00));
mMajorStringMap.insert(std::pair<std::string, unsigned long>("COMPUTER", 0x01));
mMajorStringMap.insert(std::pair<std::string, unsigned long>("PHONE", 0x02));
BluetoothClassDeviceMajor::~BluetoothClassDeviceMajor()
{
- LoggerD("Enter");
}
BluetoothClassDeviceMajor* BluetoothClassDeviceMajor::getInstance()
{
- LoggerD("Enter");
static BluetoothClassDeviceMajor instance;
return &instance;
}
unsigned long BluetoothClassDeviceMajor::getMajorValue(std::string major)
{
- LoggerD("Enter");
return mMajorStringMap.find(major)->second;
}
unsigned long BluetoothClassDeviceMajor::getMajorValue(bt_major_device_class_e major)
{
- LoggerD("Enter");
return mMajorEnumMap.find(major)->second;
}
BluetoothClassDeviceMinor::BluetoothClassDeviceMinor()
{
- LoggerD("Enter");
-
mMinorStringMap.insert(std::pair<std::string, unsigned long>("COMPUTER_UNCATEGORIZED", 0x00));
mMinorStringMap.insert(std::pair<std::string, unsigned long>("COMPUTER_DESKTOP", 0x01));
mMinorStringMap.insert(std::pair<std::string, unsigned long>("COMPUTER_SERVER", 0x02));
BluetoothClassDeviceMinor::~BluetoothClassDeviceMinor()
{
- LoggerD("Enter");
}
BluetoothClassDeviceMinor* BluetoothClassDeviceMinor::getInstance()
{
- LoggerD("Enter");
static BluetoothClassDeviceMinor instance;
return &instance;
}
unsigned long BluetoothClassDeviceMinor::getMinorValue(std::string minor)
{
- LoggerD("Enter");
return mMinorStringMap.find(minor)->second;
}
unsigned long BluetoothClassDeviceMinor::getMinorValue(bt_minor_device_class_e minor)
{
- LoggerD("Enter");
-
// F/W provides more minor deivce class
std::map<bt_minor_device_class_e, unsigned long>::iterator iter = mMinorEnumMap.find(minor);
if(iter != mMinorEnumMap.end()) {
BluetoothClassDeviceService::BluetoothClassDeviceService()
{
- LoggerD("Enter");
-
mServiceStringMap.insert(std::pair<std::string, unsigned long>("LIMITED_DISCOVERABILITY", 0x0001));
mServiceStringMap.insert(std::pair<std::string, unsigned long>("POSITIONING", 0x0008));
mServiceStringMap.insert(std::pair<std::string, unsigned long>("NETWORKING", 0x0010));
BluetoothClassDeviceService::~BluetoothClassDeviceService()
{
- LoggerD("Enter");
}
BluetoothClassDeviceService* BluetoothClassDeviceService::getInstance()
{
- LoggerD("Enter");
static BluetoothClassDeviceService instance;
return &instance;
}
unsigned long BluetoothClassDeviceService::getServiceValue(std::string service)
{
- LoggerD("Enter");
return mServiceStringMap.find(service)->second;
}
unsigned long BluetoothClassDeviceService::getServiceValue(bt_major_service_class_e service)
{
- LoggerD("Enter");
return mServiceEnumMap.find(service)->second;
}
std::vector<unsigned long> BluetoothClassDeviceService::getServiceValues(int serviceMask)
{
- LoggerD("Enter");
-
std::vector<unsigned long> ret;
for(std::map<bt_major_service_class_e, unsigned long>::iterator iter = mServiceEnumMap.begin(); iter != mServiceEnumMap.end(); iter++) {
if(iter->first & serviceMask) {
BluetoothDevice::BluetoothDevice(bt_adapter_device_discovery_info_s *discoveryInfo)
{
- LoggerD("Enter");
-
mName = std::string(discoveryInfo->remote_name);
mAddress = std::string(discoveryInfo->remote_address);
mDeviceClass = BluetoothClassSharedPtr(new BluetoothClass(discoveryInfo->bt_class));
BluetoothDevice::BluetoothDevice(bt_device_info_s *deviceInfo)
{
- LoggerD("Enter");
-
mName = std::string(deviceInfo->remote_name);
mAddress = std::string(deviceInfo->remote_address);
mDeviceClass = BluetoothClassSharedPtr(new BluetoothClass(deviceInfo->bt_class));
BluetoothDevice::~BluetoothDevice()
{
- LoggerD("Enter");
BluetoothAdapter::getInstance()->removeConnReq(mAddress);
}
void BluetoothDevice::updateInfo(bt_device_info_s *deviceInfo)
{
- LoggerD("Enter");
-
mName = std::string(deviceInfo->remote_name);
mUUIDs.clear();
for(int i = 0; i < deviceInfo->service_count; i++) {
std::string BluetoothDevice::getName() const
{
- LoggerD("Enter");
return mName;
}
std::string BluetoothDevice::getAddress() const
{
- LoggerD("Enter");
return mAddress;
}
JSValueRef BluetoothDevice::getDeviceClass(JSContextRef context)
{
- LoggerD("Enter");
/*
JSValueRef deviceClass = mLocalProperty.getProperty(context, BLUETOOTH_DEVICE_DEVICE_CLASS);
if(deviceClass == NULL) {
bool BluetoothDevice::isBonded() const
{
- LoggerD("Enter");
-
bool ret = false;
bt_device_info_s *deviceInfo = NULL;
if(bt_adapter_get_bonded_device_info(mAddress.c_str(), &deviceInfo) == BT_ERROR_NONE && deviceInfo != NULL) {
bool BluetoothDevice::isTrusted() const
{
- LoggerD("Enter");
-
bool ret = false;
bt_device_info_s *deviceInfo = NULL;
if(bt_adapter_get_bonded_device_info(mAddress.c_str(), &deviceInfo) == BT_ERROR_NONE && deviceInfo != NULL) {
bool BluetoothDevice::isConnected() const
{
- LoggerD("Enter");
-
bool ret = false;
bt_device_info_s *deviceInfo = NULL;
if(bt_adapter_get_bonded_device_info(mAddress.c_str(), &deviceInfo) == BT_ERROR_NONE && deviceInfo != NULL) {
JSValueRef BluetoothDevice::getUUIDs(JSContextRef context)
{
- LoggerD("Enter");
/*
if(isUpdated == true) {
mLocalProperty.setProperty(context, BLUETOOTH_DEVICE_UUIDS, JSUtil::toJSValueRef(context, mUUIDs));
BluetoothServiceHandler::~BluetoothServiceHandler()
{
- LoggerD("Enter");
-
if(mIsRegistered) {
BluetoothAdapter::getInstance()->unregisterUUID(mUUID);
if(bt_socket_destroy_rfcomm(mRegisteredSocket) != BT_ERROR_NONE) {
bool BluetoothServiceHandler::setOnConnect(JSContextRef context, JSObjectRef onConnect)
{
- LoggerD("Enter");
-
MultiCallbackUserDataPtr callback(
new MultiCallbackUserData(GlobalContextManager::getInstance()->getGlobalContext(context)));
if(!callback){
JSValueRef BluetoothServiceHandler::getOnConnect(JSContextRef context)
{
- LoggerD("Enter");
-
JSValueRef onConnect = mLocalProperty.getProperty(context, BLUETOOTH_SERVICE_HANDLER_ONCONNECT);
if(onConnect == NULL) {
LoggerD("onconnect is null");
void BluetoothServiceHandler::unregister(MultiCallbackUserDataPtr userData)
{
- LoggerD("Enter");
-
if(BluetoothAdapter::getInstance()->getPowered() == true) {
if(bt_socket_destroy_rfcomm(mRegisteredSocket) == BT_ERROR_NONE) {
mIsRegistered = false;
BluetoothSocket::BluetoothSocket(bt_socket_connection_s *connection)
{
- LoggerD("Enter");
mConnectedSocket = connection->socket_fd;
mUUID = std::string(connection->service_uuid);
mIsConnected = true;
BluetoothSocket::~BluetoothSocket()
{
- LoggerD("Enter");
if(mIsConnected) {
if(bt_socket_disconnect_rfcomm(mConnectedSocket) != BT_ERROR_NONE) {
LoggerW("Already disconnected");
bool BluetoothSocket::setOnMessage(JSContextRef context, JSObjectRef onMessage)
{
- LoggerD("Enter");
MultiCallbackUserDataPtr callback(
new MultiCallbackUserData(GlobalContextManager::getInstance()->getGlobalContext(context)));
if(!callback){
bool BluetoothSocket::setOnClose(JSContextRef context, JSObjectRef onClose)
{
- LoggerD("Enter");
MultiCallbackUserDataPtr callback(
new MultiCallbackUserData(GlobalContextManager::getInstance()->getGlobalContext(context)));
if(!callback){
bool BluetoothSocket::setOnError(JSContextRef context, JSObjectRef onError)
{
- LoggerD("Enter");
MultiCallbackUserDataPtr callback(
new MultiCallbackUserData(GlobalContextManager::getInstance()->getGlobalContext(context)));
if(!callback){
std::string BluetoothSocket::getUUID() const
{
- LoggerD("Enter");
return mUUID;
}
void BluetoothSocket::setConnectionState(bool isConnected)
{
- LoggerD("Enter");
mIsConnected = isConnected;
}
bool BluetoothSocket::getConnectionState()
{
- LoggerD("Enter");
return mIsConnected;
}
JSValueRef BluetoothSocket::getPeer(JSContextRef context)
{
- LoggerD("Enter");
/*
JSValueRef peer = mLocalProperty.getProperty(context, BLUETOOTH_SOCKET_PEER);
if(peer == NULL && mPeer != NULL) {
JSValueRef BluetoothSocket::getOnMessage(JSContextRef context)
{
- LoggerD("Enter");
JSValueRef onMessage = mLocalProperty.getProperty(context, BLUETOOTH_SOCKET_ONMESSAGE);
if(onMessage == NULL) {
LoggerD("onmessage is null");
JSValueRef BluetoothSocket::getOnClose(JSContextRef context)
{
- LoggerD("Enter");
-
JSValueRef onClose = mLocalProperty.getProperty(context, BLUETOOTH_SOCKET_ONCLOSE);
if(onClose == NULL) {
LoggerD("onclose is null");
JSValueRef BluetoothSocket::getOnError(JSContextRef context)
{
- LoggerD("Enter");
-
JSValueRef onError = mLocalProperty.getProperty(context, BLUETOOTH_SOCKET_ONERROR);
if(onError == NULL) {
LoggerD("onerror is null");
unsigned long BluetoothSocket::writeData(char* data, unsigned long size)
{
- LoggerD("Enter");
-
unsigned long ret = 0;
if(bt_socket_send_data(mConnectedSocket, data, static_cast<int>(size)) == BT_ERROR_NONE) {
LoggerD("bt_socket_send_data() succeeded");
void BluetoothSocket::storeRecivedData(char *data, unsigned long size)
{
- LoggerD("Enter");
-
for(unsigned long i = 0; i < size; i++) {
mReceivedData.push_back(static_cast<signed char>(data[i]));
}
std::vector<signed char> BluetoothSocket::readData()
{
- LoggerD("Enter");
-
std::vector<signed char> result (mReceivedData);
mReceivedData.clear();
void BluetoothSocket::close()
{
- LoggerD("Enter");
-
if(!mIsConnected) {
LoggerD("Already disconnected");
return;
void JSBluetoothAdapter::initialize(JSContextRef context, JSObjectRef object)
{
// do nothing
- LoggerD("Enter");
}
void JSBluetoothAdapter::finalize(JSObjectRef object)
{
// do nothing
- LoggerD("Enter");
}
JSValueRef JSBluetoothAdapter::getProperty(JSContextRef context,
JSStringRef propertyName,
JSValueRef* exception)
{
- LoggerD("Enter");
try {
if (JSStringIsEqualToUTF8CString(propertyName, BLUETOOTH_ADAPTER_NAME)) {
std::string name = BluetoothAdapter::getInstance()->getName();
const JSValueRef arguments[],
JSValueRef* exception)
{
- LoggerD("Entered");
TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0);
// Access Check
const JSValueRef arguments[],
JSValueRef* exception)
{
- LoggerD("Entered");
TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0);
// Access Check
const JSValueRef arguments[],
JSValueRef* exception)
{
- LoggerD("Entered");
TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0);
// Access Check
const JSValueRef arguments[],
JSValueRef* exception)
{
- LoggerD("Entered");
TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0);
// Access Check
const JSValueRef arguments[],
JSValueRef* exception)
{
- LoggerD("Entered");
TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0);
// Access Check
const JSValueRef arguments[],
JSValueRef* exception)
{
- LoggerD("Entered");
TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0);
// Access Check
const JSValueRef arguments[],
JSValueRef* exception)
{
- LoggerD("Entered");
TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0);
// Access Check
const JSValueRef arguments[],
JSValueRef* exception)
{
- LoggerD("Entered");
TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0);
// Access Check
const JSValueRef arguments[],
JSValueRef* exception)
{
- LoggerD("Entered");
TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0);
// Access Check
const JSValueRef arguments[],
JSValueRef* exception)
{
- LoggerD("Entered");
TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0);
// Access Check
void JSBluetoothClass::initialize(JSContextRef context, JSObjectRef object)
{
- LoggerD("Enter");
// do nothing
}
const JSValueRef arguments[],
JSValueRef* exception)
{
- LoggerD("Enter");
TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0);
// Access Check
ArgumentValidator validator(context, argumentCount, arguments);
unsigned long service = validator.toULong(0); // uuid
- if(service > 65535) {
- throw InvalidValuesException("Invalid value");
- }
+
TIME_TRACER_ITEM_END(__FUNCTION__, 0);
return JSUtil::toJSValueRef(context, priv->mClass->hasService(service));
void JSBluetoothClassDeviceMajor::initialize(JSContextRef context, JSObjectRef object)
{
- LoggerD("Enter");
// Do nothing
}
void JSBluetoothClassDeviceMajor::finalize(JSObjectRef object)
{
- LoggerD("Enter");
// Do nothing
}
void JSBluetoothClassDeviceMinor::initialize(JSContextRef context, JSObjectRef object)
{
- LoggerD("Enter"); // do nothing
+ // do nothing
}
void JSBluetoothClassDeviceMinor::finalize(JSObjectRef object)
{
- LoggerD("Enter"); // do nothing
+ // do nothing
}
JSValueRef JSBluetoothClassDeviceMinor::getProperty(JSContextRef context,
void JSBluetoothClassDeviceService::initialize(JSContextRef context, JSObjectRef object)
{
- LoggerD("Enter"); // do nothing
+ // do nothing
}
void JSBluetoothClassDeviceService::finalize(JSObjectRef object)
{
- LoggerD("Enter"); // do nothing
+ // do nothing
}
JSValueRef JSBluetoothClassDeviceService::getProperty(JSContextRef context,
void JSBluetoothDevice::initialize(JSContextRef context, JSObjectRef object)
{
- LoggerD("Enter");
// Do nothing
}
const JSValueRef arguments[],
JSValueRef* exception)
{
- LoggerD("Enter");
TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0);
// Access Check
const JSValueRef arguments[],
JSValueRef* exception)
{
- LoggerD("Enter");
TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0);
// Access Check
JSObjectRef JSBluetoothServiceHandler::createJSObject(JSContextRef context, BluetoothServiceHandlerPtr service)
{
- LoggerD("Enter");
return JSObjectMake(context, getClassRef(), static_cast<void*>(service));
}
void JSBluetoothServiceHandler::initialize(JSContextRef context, JSObjectRef object)
{
- LoggerD("Enter"); // do nothing
+ // do nothing
}
void JSBluetoothServiceHandler::finalize(JSObjectRef object)
{
- LoggerD("Enter");
-
BluetoothServiceHandlerPtr priv = static_cast<BluetoothServiceHandlerPtr>(JSObjectGetPrivate(object));
if (priv) {
JSObjectSetPrivate(object, NULL);
JSStringRef propertyName,
JSValueRef* exception)
{
- LoggerD("Enter");
-
try {
BluetoothServiceHandlerPtr priv = static_cast<BluetoothServiceHandlerPtr>(JSObjectGetPrivate(object));
if (!priv) {
JSValueRef value,
JSValueRef* exception)
{
- LoggerD("Enter");
-
try {
BluetoothServiceHandlerPtr priv = static_cast<BluetoothServiceHandlerPtr>(JSObjectGetPrivate(object));
if (!priv) {
const JSValueRef arguments[],
JSValueRef* exception)
{
- LoggerD("Enter");
TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0);
// Access Check
void JSBluetoothSocket::initialize(JSContextRef context, JSObjectRef object)
{
- LoggerD("Enter"); // do nothing
+ // do nothing
}
void JSBluetoothSocket::finalize(JSObjectRef object)
JSStringRef propertyName,
JSValueRef* exception)
{
- LoggerD("Enter");
-
try {
BluetoothSocketPtr priv = static_cast<BluetoothSocketPtr>(JSObjectGetPrivate(object));
if (!priv) {
const JSValueRef arguments[],
JSValueRef* exception)
{
- LoggerD("Enter");
TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0);
// Access Check
const JSValueRef arguments[],
JSValueRef* exception)
{
- LoggerD("Enter");
TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0);
// Access Check
const JSValueRef arguments[],
JSValueRef* exception)
{
- LoggerD("Enter");
TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0);
// Access Check
{
if (Validator(m_context).isCallback(arg)) {
return arg;
- } else if (!JSValueIsNull(m_context,
- arg) && !JSValueIsUndefined(m_context, arg)) {
+ } else if (!JSValueIsNull(m_context, arg)) {
ThrowMsg(ConversionException, "Not a function nor JS null.");
}
return NULL;
} else {
ThrowMsg(ConversionException, "Wrong duration unit.");
}
+
+ result->getDuration()->length = length;
+ result->getDuration()->unit = unit;
}
if (!JSValueIsUndefined(m_context, locationData)) {
m_calendarId(UNDEFINED_CALENDAR_ID),
m_startTime(UNDEFINED_TIME),
m_endTime(UNDEFINED_TIME),
+ m_duration(new DeviceAPI::Time::DurationProperties()),
m_recurrence(new EventRecurrenceRule()),
m_status(UNDEFINED_STATUS),
m_alarms(new EventAlarmList()),
m_calendarType(EVENT_TYPE),
m_context(NULL)
{
+ m_duration->length = UNDEFINED_TIME;
}
CalendarEvent::CalendarEvent(const CalendarEvent &original)
m_subject = original.getSubject();
m_startTime = original.getStartTime();
m_endTime = original.getEndTime();
+
+ DeviceAPI::Time::DurationPropertiesPtr durationPtr( new DeviceAPI::Time::DurationProperties());
+ durationPtr->length = original.getDuration()->length;
+ durationPtr->unit = original.getDuration()->unit;
+ m_duration = durationPtr;
+
m_location = original.getLocation();
EventRecurrenceRulePtr recurrenceRulePtr( new EventRecurrenceRule() );
m_endTime = value;
}
+DeviceAPI::Time::DurationPropertiesPtr CalendarEvent::getDuration() const
+{
+ return m_duration;
+}
+
+void CalendarEvent::setDuration(DeviceAPI::Time::DurationPropertiesPtr value)
+{
+ m_duration = value;
+}
+
std::string CalendarEvent::getLocation() const
{
return m_location;
#include <JavaScriptCore/JavaScript.h>
#include "SimpleCoordinates.h"
+#include "DurationProperties.h"
#include <calendar2.h>
namespace DeviceAPI {
long long int getEndTime() const;
void setEndTime(long long int value);
+ DeviceAPI::Time::DurationPropertiesPtr getDuration() const;
+ void setDuration(DeviceAPI::Time::DurationPropertiesPtr value);
+
std::string getLocation() const;
void setLocation(const std::string &value);
std::string m_subject;
long long int m_startTime;
long long int m_endTime;
+ DeviceAPI::Time::DurationPropertiesPtr m_duration; // Duration is automatically converted to start/end time, thus is not saved in platform.
std::string m_location;
EventRecurrenceRulePtr m_recurrence;
EventStatus m_status;
Try
{
CalendarEventPtr item = getPrivateObject(object);
+ TimeUtilConverter converter(context);
+
+ DurationProperties duration;
+ if(UNDEFINED_TIME!=item->getDuration()->length) {
+ duration.length = item->getDuration()->length;
+ duration.unit = item->getDuration()->unit;
+ LoggerD("Duration length: "<<duration.length<<", unit: "<<duration.unit);
+ return converter.makeDurationObject( duration );
+ }
+ // Alternatively generate the duration object using start/end time.
if(UNDEFINED_TIME==item->getStartTime() || UNDEFINED_TIME==item->getEndTime()) {
LoggerD("Start or end time is not defined.");
return JSValueMakeUndefined(context);
}
- TimeUtilConverter converter(context);
long long length = item->getEndTime() - item->getStartTime(); // in seconds only
LoggerD("item->getStartTime():"<< item->getStartTime() << ", length:" << length);
- return converter.makeMillisecondDurationObject( length*1000 );
+ duration.length = length;
+ duration.unit = SECONDS_UNIT;
+
+ return converter.makeDurationObject( duration );
}
Catch(Exception)
{
return false;
}
+ event->getDuration()->length = length;
+ event->getDuration()->unit = unit;
+
return true;
}
Catch(Exception)
if (m_watchers.size() > 0) {
for (;it < CallHistory::m_watchers.end();) {
- //ret = contacts_db_remove_changed_cb(_contacts_phone_log._uri, callhistoryListenerCB, it->Get());
ret = contacts_db_remove_changed_cb_with_info(_contacts_phone_log._uri, callhistoryListenerCB, it->Get());
if (ret != CONTACTS_ERROR_NONE) {
- LoggerD("callhistory remove listener error [" << ret << "]");
+ LoggerD("Failed removing listener");
}
it = CallHistory::m_watchers.erase(it);
}
- LoggerD("CallHistory Watcher is removed. (" << CallHistory::m_watchers.size() << ")");
}
EventCallHistoryPtr event(new EventCallHistory());
for (;it < CallHistory::m_watchers.end();) {
- LoggerD("removeListener : id ["<<id<<"]");
- LoggerD("removeListener : handle() ["<<(*it)->getHandle()<<"]");
-
if (id == (*it)->getHandle()) {
flag = true;
ret = contacts_db_remove_changed_cb_with_info(_contacts_phone_log._uri, callhistoryListenerCB, it->Get());
if (ret != CONTACTS_ERROR_NONE) {
- LoggerD("callhistory remove listener error [" << ret << "]");
+ LoggerD("Failed removing listener");
}
it = CallHistory::m_watchers.erase(it);
}
if (!flag) {
- ThrowMsg(Commons::InvalidArgumentException, "Invalid values error : handle");
+ ThrowMsg(Commons::InvalidArgumentException, "Invalid values");
}
}
if (record == NULL) {
ret = contacts_list_next(*recordList);
if (ret != CONTACTS_ERROR_NONE && ret != CONTACTS_ERROR_NO_DATA) {
- LoggerD("callhistory parse error [" << ret << "]");
+ LoggerD("Failed callhistory parser");
return false;
} else {
continue;
ret = contacts_list_next(*recordList);
if (ret != CONTACTS_ERROR_NONE && ret != CONTACTS_ERROR_NO_DATA) {
- LoggerD("callhistory parse error [" << ret << "]");
+ LoggerD("Failed callhistory parser");
return false;
}
}
}
if (ret != CONTACTS_ERROR_NONE) {
- LoggerD("callhistory query error [" << ret << "]");
+ LoggerD("callhistory invalid query statement");
}
ret = contacts_db_get_records_with_query(query, offset, limit, &recordList);
if (ret != CONTACTS_ERROR_NONE) {
- LoggerD("callhistory query error [" << ret << "]");
+ LoggerD("Invalid query statement");
}
if (parseRecord(&recordList, callHistoryListPtr)) {
m_removeBatchEvent.push_back(eventData);
event->switchToManualAnswer();
} else {
- LoggerD("callhistory remove Batch error [" << ret << "]");
+ LoggerD("Failed callhistory remove Batch [" << ret << "]");
event->setExceptionCode(Commons::ExceptionCodes::PlatformException);
}
} else {
ret = contacts_db_delete_records(_contacts_phone_log._uri, list, entryIds.size());
if (ret != CONTACTS_ERROR_NONE) {
- LoggerD("callhistory remove Batch error [" << ret << "]");
+ LoggerD("Failed callhistory remove Batch [" << ret << "]");
event->setExceptionCode(Commons::ExceptionCodes::PlatformException);
}
}
contacts_list_get_count(record_list, &total);
list = new int[total];
- LoggerD("total [" << total << "]");
for (unsigned int i = 0; i < total; i++) {
ret = contacts_list_get_current_record_p(record_list, &record);
if (record == NULL) {
ret = contacts_list_next(record_list);
if ( !(ret==CONTACTS_ERROR_NONE || ret==CONTACTS_ERROR_NO_DATA) ){
- LoggerD("callhistory remove All error [" << ret << "]");
+ LoggerD("Failed callhistory remove all [" << ret << "]");
event->setExceptionCode(Commons::ExceptionCodes::PlatformException);
}
continue;
value = 0;
ret = contacts_list_next(record_list);
if ( !(ret==CONTACTS_ERROR_NONE || ret==CONTACTS_ERROR_NO_DATA) ){
- LoggerD("callhistory remove All error [" << ret << "]");
+ LoggerD("Failed callhistory remove all [" << ret << "]");
event->setExceptionCode(Commons::ExceptionCodes::PlatformException);
}
}
- LoggerD("cnt [" << cnt << "]");
-
if (cnt > 0) {
EventRemoveAllDataPtr eventData( new EventCallHistoryPtrs<EventRemoveAll>(event, this));
m_removeAllEvent.push_back(eventData);
event->switchToManualAnswer();
} else {
- LoggerD("callhistory remove All error [" << ret << "]");
+ LoggerD("Failed callhistory remove all [" << ret << "]");
event->setExceptionCode(Commons::ExceptionCodes::PlatformException);
}
} else {
ret = contacts_db_delete_records(_contacts_phone_log._uri, list, cnt);
if (ret != CONTACTS_ERROR_NONE) {
- LoggerD("callhistory remove All error [" << ret << "]");
+ LoggerD("Failed callhistory remove all [" << ret << "]");
event->setExceptionCode(Commons::ExceptionCodes::PlatformException);
}
}
for (it = m_removeBatchEvent.begin(); it != m_removeBatchEvent.end(); ++it) {
if ((*it)->getEventPtrs() == event) {
m_removeBatchEvent.erase(it);
- LoggerD("event is removed. (" << m_removeBatchEvent.size() << ")");
break;
}
}
for (it = m_removeAllEvent.begin(); it != m_removeAllEvent.end(); ++it) {
if ((*it)->getEventPtrs() == event) {
m_removeAllEvent.erase(it);
- LoggerD("event is removed. (" << m_removeAllEvent.size() << ")");
break;
}
}
while( tokenType != NULL )
{
tokenId = strtok( NULL, seps );
- LoggerD("[ %s / %s ]", tokenType , tokenId );
changeType = atoi((const char*)tokenType);
changeId = atoi((const char*)tokenId);
ret = contacts_query_set_sort(query, _contacts_phone_log.id, false);
if (ret != CONTACTS_ERROR_NONE) {
- LoggerD("callhistory query error [" << ret << "]");
+ LoggerD("Invalid callhistory query [" << ret << "]");
}
ret = contacts_db_get_records_with_query(query, 0, 1, &recordList);
contacts_list_destroy(recordList, true);
contacts_query_destroy(query);
contacts_filter_destroy(filter);
- LoggerD("callhistory query error [" << ret << "]");
+ LoggerD("Invalid callhistory query [" << ret << "]");
return;
}
void CallHistoryFilter::visitPreComposite(FilterType& type, int depth)
{
- LoggerD(" type [" << type << "] depth[" << depth << "]");
contacts_filter_h filter = NULL;
contacts_filter_create(_contacts_phone_log._uri, &filter);
if (filter != NULL) {
m_filterStack.push(filter);
}
- LoggerD("filter stack size [" << m_filterStack.size() << "]");
}
void CallHistoryFilter::visitInComposite(FilterType& type, int depth)
{
- LoggerD("type [" << type << "] depth[" << depth << "]");
contacts_filter_h filter = m_filterStack.top();
if(type == DeviceAPI::Tizen::UNION_FILTER)
contacts_filter_add_operator(filter, CONTACTS_FILTER_OPERATOR_OR);
else if(type == DeviceAPI::Tizen::INTERSECTION_FILTER)
contacts_filter_add_operator(filter, CONTACTS_FILTER_OPERATOR_AND);
- LoggerD("filter stack size [" << m_filterStack.size() << "]");
}
void CallHistoryFilter::visitPostComposite(FilterType& type, int depth)
{
- LoggerD(" type [" << type << "] depth[" << depth << "]");
contacts_filter_h filter = m_filterStack.top();
if (m_filterStack.size() > 1) {
m_filterStack.pop();
contacts_filter_add_filter(filterParent, filter);
contacts_filter_destroy(filter);
}
- LoggerD("filter stack size [" << m_filterStack.size() << "]");
}
void CallHistoryFilter::visitAttribute(std::string& attrName, MatchFlag& matchFlag, DeviceAPI::Tizen::AnyPtr& matchValue, int depth)
return;
}
- LoggerD("attrName [" << attrName << "] matchValue[" << matchValue->toString() << "] depth[" << depth << "]");
contacts_filter_h filter = m_filterStack.top();
contacts_filter_h subFilter = NULL;
contacts_filter_create(_contacts_phone_log._uri, &subFilter);
if(initialValue == NULL || endValue == NULL)
return;
- LoggerD("attrName [" << attrName << "] initialValue[" << initialValue->toString() << "] endValue[" << endValue->toString() << "] depth[" << depth <<"]");
contacts_filter_h filter = m_filterStack.top();
unsigned int propertyId = 0;
iValue = atoi(initialValue->getString().c_str());
}
}
- LoggerD("attrName [" << attrName << "] initialValue[" << initialValue->toString() << "] iValue[" << iValue << "]");
}
if (!endValue->isNullOrUndefined()) {
eValue = atoi(endValue->getString().c_str());
}
}
- LoggerD("attrName [" << attrName << "] endValue[" << endValue->toString() << "] eValue[" << eValue << "]");
}
contacts_filter_h subFilter = NULL;
contacts_filter_h CallHistoryFilter::getResult() const
{
- LoggerD("filter stack size [" << m_filterStack.size() << "]");
contacts_filter_h filter = m_filterStack.top();
return filter;
}
LoggerD("onRemoved register");
} else {
- ThrowMsg(Commons::ConversionException, "Type missmatch error : onremoved callback");
+ ThrowMsg(Commons::ConversionException, "Type missmatch exception");
}
}
using namespace WrtDeviceApis::CommonsJavaScript;
void on_widget_start_callback(int widgetId) {
- LoggerD("[Tizen\\callhistory] on_widget_start_callback (" << widgetId << ")");
+ LoggerD("[Tizen\\callhistory] on_widget_start_callback");
TIME_TRACER_INIT();
try {
WrtAccessSingleton::Instance().initialize(widgetId);
}
void on_widget_stop_callback(int widgetId) {
- LoggerD("[Tizen\\callhistory] on_widget_stop_callback (" << widgetId << ")");
+ LoggerD("[Tizen\\callhistory] on_widget_stop_callback");
TIME_TRACER_EXPORT_REPORT_TO(TIME_TRACER_EXPORT_FILE,"CallHistory");
TIME_TRACER_RELEASE();
try {
void on_frame_load_callback(const void * context)
{
- LoggerD("[Tizen\\callhistory] on_frame_load_callback (" << context << ")");
+ LoggerD("[Tizen\\callhistory] on_frame_load_callback");
}
void on_frame_unload_callback(const void * context)
{
- LoggerD("[Tizen\\callhistory] on_frame_unload_callback (" << context << ")");
+ LoggerD("[Tizen\\callhistory] on_frame_unload_callback");
DeviceAPI::CallHistory::CallHistoryAsyncCallbackManagerSingleton::Instance().unregisterContext(static_cast<JSContextRef>(context));
DeviceAPI::CallHistory::CallHistoryListenerManagerSingleton::Instance().unregisterContext(static_cast<JSContextRef>(context));
// create unified address book
AddressBook *addressBook = new AddressBook(true);
+ addressBook->setId(-1);
addressBook->setName("unified address book");
addressBook->setReadOnly(false);
const JSValueRef arguments[],
JSValueRef* exception)
{
- LoggerD("entered");
-
bool jsNoParam = false;
bool js1stParamIsObject = false;
bool js1stParamIsString = false;
const JSValueRef arguments[],
JSValueRef* exception)
{
- LoggerD("entered");
-
bool js1stParamIsObject = false;
JSContactAddressPriv *priv = static_cast<JSContactAddressPriv*>(JSObjectGetPrivate(constructor));
const JSValueRef arguments[],
JSValueRef* exception)
{
- LoggerD("entered");
-
JSContactAnniversaryPriv *priv = static_cast<JSContactAnniversaryPriv*>(JSObjectGetPrivate(constructor));
if (!priv) {
ThrowMsg(WrtDeviceApis::Commons::NullPointerException, "Private object is null");
const JSValueRef arguments[],
JSValueRef* exception)
{
- LoggerD("entered");
-
JSContactEmailAddressPriv *priv = static_cast<JSContactEmailAddressPriv*>(JSObjectGetPrivate(constructor));
if (!priv) {
ThrowMsg(WrtDeviceApis::Commons::NullPointerException, "Private object is null");
const JSValueRef arguments[],
JSValueRef* exception)
{
- LoggerD("entered");
-
JSContactGroupPriv *priv = static_cast<JSContactGroupPriv*>(JSObjectGetPrivate(constructor));
if (!priv) {
ThrowMsg(WrtDeviceApis::Commons::NullPointerException, "Private object is null");
const JSValueRef arguments[],
JSValueRef* exception)
{
- LoggerD("entered");
-
bool js1stParamIsObject = false;
JSContactNamePriv *priv = static_cast<JSContactNamePriv*>(JSObjectGetPrivate(constructor));
const JSValueRef arguments[],
JSValueRef* exception)
{
- LoggerD("entered");
-
bool js1stParamIsObject = false;
JSContactOrganizationPriv *priv = static_cast<JSContactOrganizationPriv*>(JSObjectGetPrivate(constructor));
const JSValueRef arguments[],
JSValueRef* exception)
{
- LoggerD("entered");
-
JSContactPhoneNumberPriv *priv = static_cast<JSContactPhoneNumberPriv*>(JSObjectGetPrivate(constructor));
if (!priv) {
ThrowMsg(WrtDeviceApis::Commons::NullPointerException, "Private object is null");
const JSValueRef arguments[],
JSValueRef* exception)
{
- LoggerD("entered");
-
JSContactWebSitePriv *priv = static_cast<JSContactWebSitePriv*>(JSObjectGetPrivate(constructor));
if (!priv) {
ThrowMsg(WrtDeviceApis::Commons::NullPointerException, "Private object is null");
metadata_extractor_h m_extractor = NULL;
MediaLyricsUtil::MediaLyricsUtil()
{
- LoggerD("entered ");
if ( METADATA_EXTRACTOR_ERROR_NONE != metadata_extractor_create(&m_extractor))
{
LoggerD("MetaData Extractor create Fail...");
MediaLyricsUtil::~MediaLyricsUtil()
{
- LoggerD("entered ");
if ( m_extractor && METADATA_EXTRACTOR_ERROR_NONE != metadata_extractor_destroy(m_extractor))
{
LoggerD("Metadata extractor destory Fail...");
if (m_extractor)
{
- LoggerD("Valide Extractor");
-
- //setpath
- LoggerD("set Path : " << filepath);
-
if ( METADATA_EXTRACTOR_ERROR_NONE == metadata_extractor_set_path(m_extractor, filepath.c_str()) )
{
char* strSyncTextNum=NULL;
if ( METADATA_EXTRACTOR_ERROR_NONE == metadata_extractor_get_metadata(m_extractor, attr, &strSyncTextNum)
&& strSyncTextNum )
{
- LoggerD("SYNCHRONIZED");
int nSyncTextNum = 0;
istringstream(strSyncTextNum) >> nSyncTextNum;
- LoggerD("nSyncTextNum : " << nSyncTextNum);
-
free(strSyncTextNum);
strSyncTextNum = NULL;
}
else
{
- LoggerD("sync Lyrics Error. text num is 0");
-
char* unSyncText = NULL;
attr = METADATA_UNSYNCLYRICS;
return m_editableAttrList;
}
-void MediacontentAudio::display() const
-{
-
- MediacontentMedia::display();
-}
-
void MediacontentAudio::appendAudioArtist(const string &value)
{
m_audioArtist.push_back(value);
virtual vector<std::string> getEditableAttr() const;
- void display() const;
-
protected:
string m_audioAlbum;
vector<std::string> m_audioArtist;
EventUpdateMediaItemsAnswerReceiver(ThreadEnum::NULL_THREAD),
EventFindFolderAnswerReceiver(ThreadEnum::NULL_THREAD)
{
- LoggerD("create a MediacontentManagerController");
}
MediacontentManagerController::~MediacontentManagerController()
{
- LoggerD("<<<");
- LoggerD(">>>");
}
void MediacontentManagerController::OnAnswerReceived(const IEventUpdateMediaItemsPtr &event)
{
- LoggerD("MediacontentManagerController::IEventUpdateMediaItemsPtr:entered");
-
JSCallbackManagerPtr cbm = DPL::StaticPointerCast<JSCallbackManager>(event->getPrivateData());
- if(!cbm)
- {
+ if(!cbm)
+ {
LoggerE("no callback manager");
return;
}
Try
{
- MediaContentAsyncCallbackManagerSingleton::Instance().unregisterCallbackManager(cbm);
- if (event->getResult())
- {
- cbm->callOnSuccess();
+ MediaContentAsyncCallbackManagerSingleton::Instance().unregisterCallbackManager(cbm);
+ if (event->getResult())
+ {
+ cbm->callOnSuccess();
}
else
{
- JSValueRef errorObject = DeviceAPI::Common::JSTizenExceptionFactory::makeErrorObject(
- cbm->getContext(), DeviceAPI::Common::JSTizenException::UNKNOWN_ERROR);
- cbm->callOnError(errorObject);
+ JSValueRef errorObject = DeviceAPI::Common::JSTizenExceptionFactory::makeErrorObject(
+ cbm->getContext(), DeviceAPI::Common::JSTizenException::UNKNOWN_ERROR);
+ cbm->callOnError(errorObject);
}
return;
}
void MediacontentManagerController::OnAnswerReceived(const IEventBrowseFolderPtr &event)
{
-
- LoggerD("MediacontentManagerController::OnAnswerReceived:entered");
-
JSCallbackManagerPtr cbm = DPL::StaticPointerCast<JSCallbackManager>(event->getPrivateData());
if (!cbm)
- {
+ {
LoggerE("no callback manager");
return;
}
{
MediaContentAsyncCallbackManagerSingleton::Instance().unregisterCallbackManager(cbm);
if (event->getResult())
- {
+ {
MediaConverterFactory::ConverterType converter = MediaConverterFactory::getConverter(cbm->getContext());
const std::vector<MediacontentMediaPtr> &results = event->getMedia();
JSValueRef result = converter->toJSValueRef(results);
}
else
{
- JSValueRef errorObject = DeviceAPI::Common::JSTizenExceptionFactory::makeErrorObject(
- cbm->getContext(), DeviceAPI::Common::JSTizenException::UNKNOWN_ERROR);
- cbm->callOnError(errorObject);
- }
- return;
+ JSValueRef errorObject = DeviceAPI::Common::JSTizenExceptionFactory::makeErrorObject(
+ cbm->getContext(), DeviceAPI::Common::JSTizenException::UNKNOWN_ERROR);
+ cbm->callOnError(errorObject);
+ }
+ return;
}
Catch(Exception)
{
void MediacontentManagerController::OnAnswerReceived(const IEventFindFolderPtr &event)
{
-
- LoggerD("MediacontentManagerController::OnAnswerReceived:entered");
-
JSCallbackManagerPtr cbm = DPL::StaticPointerCast<JSCallbackManager>(event->getPrivateData());
- if (!cbm)
- {
+ if (!cbm)
+ {
LoggerE("no callback manager");
return;
}
Try
{
- MediaContentAsyncCallbackManagerSingleton::Instance().unregisterCallbackManager(cbm);
+ MediaContentAsyncCallbackManagerSingleton::Instance().unregisterCallbackManager(cbm);
if (event->getResult())
- {
+ {
MediaConverterFactory::ConverterType converter = MediaConverterFactory::getConverter(cbm->getContext());
const std::vector<MediacontentFolderPtr> &results = event->getFolder();
JSValueRef result = converter->toJSValueRef(results);
}
else
{
- JSValueRef errorObject = DeviceAPI::Common::JSTizenExceptionFactory::makeErrorObject(
- cbm->getContext(), DeviceAPI::Common::JSTizenException::UNKNOWN_ERROR);
- cbm->callOnError(errorObject);
- }
- return;
+ JSValueRef errorObject = DeviceAPI::Common::JSTizenExceptionFactory::makeErrorObject(
+ cbm->getContext(), DeviceAPI::Common::JSTizenException::UNKNOWN_ERROR);
+ cbm->callOnError(errorObject);
+ }
+ return;
}
Catch(Exception)
{
protected:
void OnAnswerReceived(const IEventFindFolderPtr &event);
void OnAnswerReceived(const IEventBrowseFolderPtr &event);
- void OnAnswerReceived(const IEventUpdateMediaItemsPtr &event);
+ void OnAnswerReceived(const IEventUpdateMediaItemsPtr &event);
private:
MediacontentManagerController();
- virtual ~MediacontentManagerController();
+ virtual ~MediacontentManagerController();
};
MediaConverter::MediaConverter(JSContextRef context) : Converter(context)
{
- LoggerD("entered");
}
JSValueRef MediaConverter::toFunctionOrNull(const JSValueRef& arg)
{
if (Validator(m_context).isCallback(arg))
- {
+ {
return arg;
} else if (!JSValueIsNull(m_context,arg) && !JSValueIsUndefined(m_context, arg))
{
JSValueRef MediaConverter::toFunction(const JSValueRef& arg)
{
if (Validator(m_context).isCallback(arg))
- {
+ {
return arg;
} else if (JSValueIsNull(m_context,arg) || JSValueIsUndefined(m_context, arg))
{
MediacontentMediaListPtr MediaConverter::toVectorOfMediaItem(JSValueRef events)
{
- LoggerD("entered");
MediacontentMediaListPtr result(new MediacontentMediaList());
std::vector<MediacontentMediaPtr> resultVector;
JSObjectRef objArg = toJSObjectRef(events);
- LoggerD("array length "<<JSGetArrayLength(m_context, objArg));
+
for (std::size_t i = 0; i < JSGetArrayLength(m_context, objArg); i++) {
JSValueRef element = JSGetArrayElement(m_context, objArg, i);
JSObjectRef arg = JSValueToObject(m_context, element, NULL);
FolderContentFilterConverter::~FolderContentFilterConverter()
{
- LoggerD("entered");
}
MediaContentFilterConverter::MediaContentFilterConverter(JSContextRef context) :
MediaContentFilterConverter::~MediaContentFilterConverter()
{
- LoggerD("entered");
}
} // Content
FilterValidatorPtr MediaFilterValidatorFactory::getMediaFilterValidator(QueryType value)
{
- static FilterValidatorPtr theValidatorInstance;
-
+ static FilterValidatorPtr theValidatorInstance;
if(value == QUERY_FOLDER)
- {
- LoggerD("create validator of folder");
- theValidatorInstance = FilterValidatorPtr(new FilterValidator(folderProperties));
- }
- else if(value == QUERY_MEDIA)
- {
- LoggerD("create validator of media item");
- theValidatorInstance = FilterValidatorPtr(new FilterValidator(mediaProperties));
- }
-
- return theValidatorInstance;
-}
+ {
+ theValidatorInstance = FilterValidatorPtr(new FilterValidator(folderProperties));
+ }
+ else if(value == QUERY_MEDIA)
+ {
+ theValidatorInstance = FilterValidatorPtr(new FilterValidator(mediaProperties));
+ }
+ return theValidatorInstance;
+ }
}
}
MediacontentFolder::MediacontentFolder()
{
m_modifiedDate = NULL;
-
}
MediacontentFolder::~MediacontentFolder()
return value;
}
-
-void MediacontentFolder::display() const
-{
- LoggerD("m_folderUUID: " << m_folderUUID);
- LoggerD("m_folderName: " << m_folderName);
- LoggerD("m_folderPath: " << m_folderPath);
- LoggerD("m_storageType: " << m_storageType);
-}
-
-
}
}
void insertValue(string attr, string value);
string findValue(string attr);
- void display() const;
-
protected:
string m_folderUUID;
MediacontentImage::MediacontentImage()
{
- LoggerD("enter");
-
m_editableAttrList.push_back("geolocation");
m_editableAttrList.push_back("orientation");
}
MediacontentImage::~MediacontentImage()
{
- LoggerD("enter");
}
double MediacontentImage::getImageLatitude() const
return m_isChangedLongitude;
}
-void MediacontentImage::display()
-{
- MediacontentMedia::display();
- LoggerD("m_imageWidth : " << m_imageWidth);
- LoggerD("m_imageHeight : " << m_imageHeight);
- LoggerD("m_imageOrientation : " << m_imageOrientation);
- LoggerD("m_imageLongitude : " << m_imageLongitude);
- LoggerD("m_imageLatitude : " << m_imageLatitude);
-
-}
-
-
}
}
bool isChangedOrientaion() const;
bool isChangedLatitude() const;
bool isChangedLongitude() const;
-
- void display();
virtual vector<std::string> getEditableAttr() const;
-
protected:
int m_imageWidth;
int m_imageHeight;
void ContentListener::oncontentadded(MediacontentMediaPtr content)
{
- LoggerI("ContentListener::oncontentadded is entered");
JSContextRef context = m_callback->getContext();
MediaConverterFactory::ConverterType converter = MediaConverterFactory::getConverter(context);
void ContentListener::oncontentupdated(MediacontentMediaPtr content)
{
- LoggerI("ContentListener::oncontentupdated is entered");
JSContextRef context = m_callback->getContext();
MediaConverterFactory::ConverterType converter = MediaConverterFactory::getConverter(context);
void ContentListener::oncontentremoved(std::string id)
{
- LoggerI("ContentListener::oncontentremoved is entered");
JSContextRef context = m_callback->getContext();
MediaConverterFactory::ConverterType converter = MediaConverterFactory::getConverter(context);
MediacontentManager::MediacontentManager()
{
- LoggerD("entered");
-
//protect for pararel execution
- DPL::Mutex::ScopedLock mx(&m_constructorMutex);
- if (m_instanceCount == 0)
- {
- //when it is first instance then connect to media content service.
- if( MEDIA_CONTENT_ERROR_NONE != media_content_connect())
- {
- LoggerD("Media Content Service Connect Fail...");
- return;
- }
- }
- //increase counter of instances
- m_instanceCount++;
-
+ DPL::Mutex::ScopedLock mx(&m_constructorMutex);
+ if (m_instanceCount == 0)
+ {
+ //when it is first instance then connect to media content service.
+ if( MEDIA_CONTENT_ERROR_NONE != media_content_connect())
+ {
+ LoggerD("Media Content Service Connect Fail...");
+ return;
+ }
+ }
+ //increase counter of instances
+ m_instanceCount++;
}
MediacontentManager::~MediacontentManager()
{
- LoggerD("entered : " << m_instanceCount);
- DPL::Mutex::ScopedLock mx(&m_constructorMutex);
- //decrease counter of instances
- m_instanceCount--;
- if (m_instanceCount == 0)
- {
- LoggerD("instance Count is zero ");
- //when it is last instance then clse connection to database
- if ( MEDIA_CONTENT_ERROR_NONE != media_content_disconnect())
- {
- LoggerD("Media Content Service Disconnect Fail...");
- }
- }
-}
-
-/*
-void MediacontentManager::OnRequestReceived(const IEventGetMediacontentPtr &event)
-{
- LoggerD( "OnRequestReceived::entered");
- //IMediacontentPtr newMediacontent(new Mediacontent());
- //IMediacontentPtr newMediacontent = MediacontentFactory::getInstance().createMediacontentObject();
-
- Try
- {
- LoggerD( "get Mediacontent \n");
-// event->setMediacontent(m_mediaContent);
- event->setResult(true);
- }
- Catch(Exception)
+ DPL::Mutex::ScopedLock mx(&m_constructorMutex);
+ //decrease counter of instances
+ m_instanceCount--;
+ if (m_instanceCount == 0)
{
- LogError("error occuered during obtaining data");
- event->setResult(false);
+ //when it is last instance then clse connection to database
+ if ( MEDIA_CONTENT_ERROR_NONE != media_content_disconnect())
+ {
+ LoggerD("Media Content Service Disconnect Fail...");
+ }
}
- event->setCancelAllowed(true);
}
-*/
tm* MediacontentManager::toDateTm(time_t date)
{
{
if ( tmpStr )
{
- LoggerD("Folder UUID : " << tmpStr);
newFolder->setFolderUUID(tmpStr);
free(tmpStr);
tmpStr = NULL;
{
if ( tmpStr )
{
- LoggerD("Folder path : " << tmpStr);
newFolder->setFolderPath(ContentUtility::convertPathToUri(tmpStr));
free(tmpStr);
tmpStr = NULL;
{
if ( tmpStr )
{
- LoggerD("Folder name : " << tmpStr);
newFolder->setFolderName(tmpStr);
free(tmpStr);
tmpStr = NULL;
if (MEDIA_CONTENT_ERROR_NONE == media_folder_get_modified_time(media_folder, &date))
{
- LoggerD("get Modified Time ");
newFolder->setFolderModifiedDate(toDateTm(date));
}
if (MEDIA_CONTENT_ERROR_NONE == media_folder_get_storage_type(media_folder, &storageType))
{
- LoggerD("storage Type=" << storageType);
string type;
if(storageType == MEDIA_CONTENT_STORAGE_INTERNAL )
{
unsigned long long tmpLongLong = 0;
bool tmpBool= false;
- LoggerD("enter Common Data type : " << newMedia->getMediaType());
-
if ( MEDIA_CONTENT_ERROR_NONE == media_info_get_media_id(info, &tmpStr) )
{
if (tmpStr)
{
newMedia->setMediaUUID(tmpStr);
- LoggerD("UUID : " << tmpStr);
free(tmpStr);
tmpStr = NULL;
}
if (tmpStr)
{
newMedia->setMimeType(tmpStr);
- LoggerD("MineType : " << tmpStr);
free(tmpStr);
tmpStr = NULL;
}
if (tmpStr)
{
newMedia->setDisplayName(tmpStr);
- LoggerD("Display Name : " << tmpStr);
free(tmpStr);
tmpStr = NULL;
}
if (tmpStr)
{
newMedia->setFilePath(ContentUtility::convertPathToUri(tmpStr));
- LoggerD("Path : " << newMedia->getFilePath());
free(tmpStr);
tmpStr = NULL;
}
if (tmpStr)
{
newMedia->setThumbnailPath(ContentUtility::convertPathToUri(tmpStr));
- LoggerD("Thumnail Path : " << newMedia->getThumbnailPath());
free(tmpStr);
tmpStr = NULL;
}
if (tmpStr)
{
newMedia->setDescription(tmpStr);
- LoggerD("Description : " << tmpStr);
free(tmpStr);
tmpStr = NULL;
}
if ( MEDIA_CONTENT_ERROR_NONE == media_info_get_favorite (info, &tmpBool) )
{
newMedia->setFavorite(tmpBool);
- LoggerD("favorite " << tmpBool);
}
if ( MEDIA_CONTENT_ERROR_NONE == media_info_get_rating (info, &tmpInt) )
{
newMedia->setRating(tmpInt);
- LoggerD("rating " << tmpInt);
}
if ( MEDIA_CONTENT_ERROR_NONE == media_info_get_size(info, &tmpLongLong) )
{
newMedia->setSize(tmpLongLong);
- LoggerD("Size : " << tmpLongLong);
}
}
LogError( "Couldn't convert supplied date.");
}
- LoggerD("image_meta_get_date_taken : " << tmpStr); //time??
newImage->setReleasedDate(result);
free(tmpStr);
tmpStr = NULL;
if( tmpStr )
{
newImage->setTitle(tmpStr);
- LoggerD(" Image Title: " << tmpStr);
free(tmpStr);
tmpStr = NULL;
}
if ( MEDIA_CONTENT_ERROR_NONE == image_meta_get_width(img, &tmpInt) )
{
newImage->setImageWidth(tmpInt);
- LoggerD("Image Width " << tmpInt);
}
if ( MEDIA_CONTENT_ERROR_NONE == image_meta_get_height(img, &tmpInt) )
{
newImage->setImageHeight(tmpInt);
- LoggerD("Image Height " << tmpInt);
}
if ( MEDIA_CONTENT_ERROR_NONE == media_info_get_latitude(info, &tmpDouble) )
{
newImage->setImageLatitude(tmpDouble);
- LoggerD("Image Latitude " << tmpDouble);
}
if ( MEDIA_CONTENT_ERROR_NONE == media_info_get_longitude(info, &tmpDouble) )
{
newImage->setImageLongitude(tmpDouble);
- LoggerD("Image Longitude " << tmpDouble);
}
media_content_orientation_e orientation;
}
newImage->setImageOrientation(orientationStr);
- LoggerD(" image Orientation. " << orientationStr);
}
}
newVideo->setReleasedDate(result);
- LoggerD("audio_meta_get_recorded_date : " << tmpStr);
free(tmpStr);
tmpStr = NULL;
}
if( tmpStr )
{
newVideo->setVideoAlbum(tmpStr);
- LoggerD(" Video Album. " << tmpStr);
free(tmpStr);
tmpStr = NULL;
}
if( tmpStr )
{
newVideo->setTitle(tmpStr);
- LoggerD(" Video Title. " << tmpStr);
free(tmpStr);
tmpStr = NULL;
}
for( unsigned int i=0; i < artists.size(); i++)
{
string artist = artists.at(i);
- LoggerD("Audio artist: " << artist);
newVideo->appendVideoArtist(artist);
}
}
newAudio->setReleasedDate(result);
- LoggerD("audio_meta_get_recorded_date : " << tmpStr);
free(tmpStr);
tmpStr = NULL;
}
if (tmpStr)
{
newAudio->setTitle(tmpStr);
- LoggerD("Audio Title : " << tmpStr);
free(tmpStr);
tmpStr = NULL;
}
if (tmpStr)
{
newAudio->setAudioAlbum(tmpStr);
- LoggerD("Audio Album : " << tmpStr);
free(tmpStr);
tmpStr = NULL;
}
for( unsigned int i=0; i < artists.size(); i++)
{
string artist = artists.at(i);
- LoggerD("Audio artist: " << artist);
newAudio->appendAudioArtist(artist);
}
for( unsigned int i=0; i < composers.size(); i++)
{
string composer = composers.at(i);
- LoggerD("Audio Composer : " << composer);
newAudio->appendAudioComposer(composer);
}
if ( MEDIA_CONTENT_ERROR_NONE == audio_meta_get_duration(audio, &tmpInt) )
{
newAudio->setAudioDuration(tmpInt);
- LoggerD("Audio Duration : " << tmpInt);
}
if ( MEDIA_CONTENT_ERROR_NONE == audio_meta_get_copyright(audio, &tmpStr) )
if (tmpStr)
{
newAudio->setAudioCopyright(tmpStr);
- LoggerD("Audio CopyRight: " << tmpStr);
free(tmpStr);
tmpStr = NULL;
}
int trackNum = 0;
if (tmpStr)
{
- LoggerD("trackNum: " << tmpStr);
try {
istringstream(tmpStr) >> trackNum;
} catch (...) {
if ( MEDIA_CONTENT_ERROR_NONE == media_info_get_size(info, &tmpLongLong) )
{
newAudio->setAudioSize(tmpLongLong);
- LoggerD("Audio Size: " << tmpLongLong);
}
if ( MEDIA_CONTENT_ERROR_NONE == audio_meta_get_bit_rate(audio, &tmpInt) )
{
newAudio->setAudioBitrate(tmpInt);
- LoggerD("Audio Bitrate: " << tmpInt);
}
if ( MEDIA_CONTENT_ERROR_NONE == audio_meta_get_genre(audio, &tmpStr) )
for( unsigned int i=0; i < genres.size(); i++)
{
string genre = genres.at(i);
- LoggerD("Audio Genre: " << genre);
newAudio->appendAudioGenre(genre);
}
//Callback.
bool MediacontentManager::mediaFolderCallback(media_folder_h folder, void *user_data)
{
- LoggerD("enter");
if (user_data != NULL){
IEventFindFolder* event = (IEventFindFolder*)user_data;
- LoggerD("user data is valide");
if ( folder )
{
- LoggerD("folder is valide");
MediacontentFolderPtr newFolder(new MediacontentFolder());
convertToPlatformFolder(folder, newFolder);
- LoggerD("folder type" << newFolder->getFolderStorageType());
event->addFolder(newFolder);
}
{
LoggerD("user data is NULL");
}
-
return true;
}
}
}
- else
+ else
{
- LoggerD("event is NULL");
+ LoggerD("event is NULL");
}
return true;
void MediacontentManager::OnRequestReceived(const IEventFindFolderPtr &eFolder)
{
- LoggerD("entered");
-
if ( MEDIA_CONTENT_ERROR_NONE !=
media_folder_foreach_folder_from_db (NULL, mediaFolderCallback, eFolder.Get()))
{
{
eFolder->setResult(true);
}
- LoggerD("end");
}
void MediacontentManager::OnRequestReceived(const IEventBrowseFolderPtr &eBrowse)
{
- LoggerD("OnRequestReceived::IEventBrowseFolderPtr entered");
-
MediaSearchVisitorPtr visitor(new MediaSearchVisitor());
visitor->setQueryType(MediaSearchVisitor::QUERY_MEDIA);
int ret = MEDIA_CONTENT_ERROR_NONE;
jsFilter->travel(IVisitor);
condition = visitor->getResult();
- LoggerD("execute condition [" << condition << "]");
media_filter_set_condition(filter, condition.c_str(), MEDIA_CONTENT_COLLATE_DEFAULT ); //set condition
}
{
string attriName = attr->getAttributeName();
attriName = visitor->getPlatformAttr(attriName);
- LoggerD("Attribute Name [" << attriName << "]");
if (attriName.compare("") != 0)
{
if (eBrowse->getLimitIsSet() ||eBrowse->getOffsetIsSet() )
{
- LoggerD("limit or offset");
-
int count = -1;
int offset = 0;
if ( eBrowse->getLimitIsSet() )
{
count = eBrowse->getLimit();
- LoggerD("limit is " << count);
}
if ( eBrowse->getOffsetIsSet() )
{
offset = eBrowse->getOffset();
- LoggerD("offset is " << offset);
}
if ( MEDIA_CONTENT_ERROR_NONE != media_filter_set_offset(filter, offset, count))
if ( eBrowse->getFolderIdIsSet())
{
string folderID = eBrowse->getFolderID();
- LoggerD("FolderID :" << folderID);
if ( MEDIA_CONTENT_ERROR_NONE !=
media_folder_foreach_media_from_db (folderID.c_str(), filter, mediaItemCallback, eBrowse.Get()))
string type = mediaPtr->getMediaType(); //media type.
string mediaId = mediaPtr->getMediaUUID();
- LoggerD("MediaId : " << mediaId);
media_info_h media = NULL;
bool ret = true;
video_meta_h video = NULL;
if ( MEDIA_CONTENT_ERROR_NONE == media_info_get_video(media, &video))
{
-#if 0 //NOT support
- if ( videoPtr->isChangedPlayCount() )
- {
- if ( MEDIA_CONTENT_ERROR_NONE !=
- video_meta_set_played_count (video, videoPtr->getVideoPlayCount()))
- {
- LoggerD("Error: set play count");
- ret = false;
-
- }
- }
-
- if (videoPtr->isChangedPlayedTime())
- {
- if ( MEDIA_CONTENT_ERROR_NONE !=
- video_meta_set_played_position (video, videoPtr->getVideoPlayedTime()))
- {
- LoggerD("Error: set played time");
- ret = false;
- }
- }
-
- if (videoPtr->isChangedAlbum())
- {
- LoggerD("Not support - Album API");
- ret = false;
- }
-
- if (videoPtr->isChangedArtists())
- {
- LoggerD("Not support - Artist API");
- ret = false;
- }
-#endif
if ( MEDIA_CONTENT_ERROR_NONE !=
media_info_set_latitude(media, videoPtr->getVideoLatitude())
)
audio_meta_h audio=NULL;
if ( MEDIA_CONTENT_ERROR_NONE == media_info_get_audio(media, &audio))
{
-#if 0 //NOT support
- if ( audioPtr->isChangedPlayCount() )
- {
- if ( MEDIA_CONTENT_ERROR_NONE !=
- audio_meta_set_played_count (audio, audioPtr->getAudioPlayCount()))
- {
- LoggerD("Error: set play count");
- ret = false;
- }
- }
-
- if (audioPtr->isChangedPlayedTime())
- {
- if ( MEDIA_CONTENT_ERROR_NONE !=
- audio_meta_set_played_position (audio, audioPtr->getAudioPlayedTime()))
- {
- LoggerD("Error: set played time");
- ret = false;
- }
- }
-
- if (audioPtr->isChangedAudioArtist())
- {
- LoggerD("Not Support API");
- ret = false;
- }
-
- if (audioPtr->isChangedAudioAlbum())
- {
- LoggerD("Not Support API");
- ret = false;
- }
-
- if (audioPtr->isChangedAudioGenre())
- {
- LoggerD("Not Support API");
- ret = false;
- }
-
- if (audioPtr->isChangedAudioComposer())
- {
- LoggerD("Not Support API");
- ret = false;
- }
-
- if (audioPtr->isChangedAudioTrackNumber())
- {
- LoggerD("Not Support API");
- ret = false;
- }
-#endif
if ( MEDIA_CONTENT_ERROR_NONE != audio_meta_update_to_db (audio) )
{
LoggerD("Error: update db");
void MediacontentManager::OnRequestReceived(const IEventUpdateMediaPtr &eMedia)
{
- LoggerD("OnRequestReceived::IEventUpdateMediaPtr entered");
try
{
MediacontentMediaPtr mediaPtr = eMedia->getMediaItem();
if(updateMediaToDB(mediaPtr))
{
eMedia->setResult(true);
- LoggerD("update success");
}
else
{
void MediacontentManager::OnRequestReceived(const IEventUpdateMediaItemsPtr &eItems)
{
- LoggerD("OnRequestReceived::IEventUpdateMediaItemsPtr entered");
-
try
{
MediacontentMediaListPtr mediaListPtr = eItems->getMediaItems();
if (mediaListPtr->empty())
- {
+ {
LoggerD("Item vector is empty");
- }
+ }
else
{
for(unsigned int i=0; i<mediaListPtr->size(); i++)
{
LogError("Exception: " << ex.DumpToString());
eItems->setResult(false);
- }
- //eItems->setCancelAllowed(false);
-
+ }
}
}
string MediacontentMedia::getMimeType()
{
- LoggerD("MediacontentMedia::getMimeType");
return m_mimeType;
}
m_mediaType = value;
}
-void MediacontentMedia::display() const
-{
-
- LoggerD("m_mediaUUID : " << m_mediaUUID);
- LoggerD("m_mediaType : " << m_mediaType);
-// LoggerD("m_mimeType : " << m_mimeType);
- LoggerD("m_displayName : " << m_displayName);
- LoggerD("m_filePath : " << m_filePath);
- LoggerD("m_thumbnailPath : " << m_thumbnailPath);
- LoggerD("m_description : " << m_description);
-// LoggerD("m_createdDate : " << m_createdDate);
-// LoggerD("m_releasedDate : " << m_releasedDate);
-// LoggerD("m_modifiedDate : " << m_modifiedDate);
- LoggerD("m_favorite : " << m_favorite);
-
-
-}
string MediacontentMedia::getDescription() const
{
return m_description;
virtual void setSize(unsigned long long value);
virtual void setRating(int value, bool isChanged=false);
- void display() const;
virtual vector<std::string> getEditableAttr() const;
private:
{
string platformAttr;
map<string, string>::iterator pos;
- LoggerD("attrName=" << attrName);
- LoggerD("queryType=" << queryType);
if( queryType == QUERY_FOLDER)
{
time = mktime(&date);
stringstream ss;
ss << time;
-// ss << setfill('0') << setiosflags(ios::right) << setw(4) << (date.tm_year + 1900);
-// ss << setfill('0') << setiosflags(ios::right) << setw(2) << (date.tm_mon + 1);
-// ss << setfill('0') << setiosflags(ios::right) << setw(2) << date.tm_mday;
-
return ss.str();
}
}
else
{
- //STARTSWITH('%, ENDSWITH, EXISTS
- //valueStr = matchValue->getString();
-
ostringstream os;
if(matchFlag == MATCH_STARTSWITH)
return m_editableAttrList;
}
-void MediacontentVideo::display() const
-{
-
- LoggerD("m_videoLongitude: " << m_videoLongitude;);
- LoggerD("m_videoLatitude: " << m_videoLatitude);
- LoggerD("m_videoAlbum: " << m_videoAlbum;);
- //LoggerD("m_videoArtist: " << m_videoArtist);
- //LoggerD("m_videoPlayedTime: " << m_videoPlayedTime);
- LoggerD("m_videoDuration: " << m_videoDuration);
- LoggerD("m_videoWidth: " << m_videoWidth);
- LoggerD("m_videoHeight: " << m_videoHeight);
- MediacontentMedia::display();
-}
-
}
}
virtual vector<std::string> getEditableAttr() const;
- void display() const;
-
private:
double m_videoLongitude;
double m_videoLatitude;
void IMediacontentManager::findFolder(IEventFindFolderPtr &ptr)
{
- LoggerD("IMediacontentManager::called findFolders");
WrtDeviceApis::Commons::EventRequestReceiver<IEventFindFolder>::PostRequest(ptr);
}
void IMediacontentManager::updateMedia(IEventUpdateMediaPtr &ptr)
{
- LoggerD("IMediacontentManager::called updateMedia");
WrtDeviceApis::Commons::EventRequestReceiver<IEventUpdateMedia>::PostRequest(ptr);
}
void IMediacontentManager::browseFolder(IEventBrowseFolderPtr &ptr)
{
- LoggerD("IMediacontentManager::called IEventBrowseFolder");
WrtDeviceApis::Commons::EventRequestReceiver<IEventBrowseFolder>::PostRequest(ptr);
}
void IMediacontentManager::updateMediaItems(IEventUpdateMediaItemsPtr &ptr)
{
- LoggerD("IMediacontentManager::called IEventBrowseFolder");
WrtDeviceApis::Commons::EventRequestReceiver<IEventUpdateMediaItems>::PostRequest(ptr);
}
static gboolean _scan_file_completed_cb(void *user_data)
{
- LoggerD("called _scan_file_completed_cb:");
-
scanCallbackData *data = static_cast<scanCallbackData*>(user_data);
if(data != NULL)
static void _scan_file_thread(void *user_data, Ecore_Thread *thread){
- LoggerD("_scan_file_thread::called");
scanCallbackData *data = static_cast<scanCallbackData*>(user_data);
data->result = media_content_scan_file(data->path.c_str());
- LoggerD("native error code:" << data->result);
g_idle_add(_scan_file_completed_cb, data);
}
bool IMediacontentManager::scanFile(scanCompletedCallback callback, std::string path, void* user_data)
{
- LoggerD("ContentManager::called scan");
bool ret = false;
if( !path.empty() )
{
- LoggerD("ContentManager::path:" << path);
-
scanCallbackData *data = new scanCallbackData();
data->path = path;
data->callback = callback;
static bool mediaItemCallback(media_info_h info, void* user_data)
{
media_content_type_e type;
- LoggerD("mediaItemCallback is called");
if ( MEDIA_CONTENT_ERROR_NONE == media_info_get_media_type( info, &type) )
{
void *user_data)
{
- ContentListener *listener = static_cast<ContentListener*>(user_data);
- std::string err_msg;
- if( error == MEDIA_CONTENT_ERROR_NONE)
- {
- err_msg = "";
- if( update_item == MEDIA_ITEM_FILE)
- {
- string condition = "MEDIA_ID=\"";
- condition += uuid;
- condition += "\"";
-
- MediacontentMedia *p_content;
- if(update_type == MEDIA_CONTENT_INSERT)
- {
- filter_h filter = NULL;
- if ( MEDIA_CONTENT_ERROR_NONE == media_filter_create(&filter))
- {
- media_filter_set_condition(filter, condition.c_str(), MEDIA_CONTENT_COLLATE_DEFAULT);
-
- if(media_type == MEDIA_CONTENT_TYPE_IMAGE)
- {
- p_content = new MediacontentImage();
- }
- else if(media_type == MEDIA_CONTENT_TYPE_VIDEO)
- {
- p_content = new MediacontentVideo();
- }
- else if(media_type == MEDIA_CONTENT_TYPE_SOUND || media_type == MEDIA_CONTENT_TYPE_MUSIC)
- {
- p_content = new MediacontentAudio();
- }
- else
- {
- p_content = new MediacontentMedia();
- }
-
- if( MEDIA_CONTENT_ERROR_NONE == media_info_foreach_media_from_db(filter,mediaItemCallback,(void*)p_content))
- {
- MediacontentMediaPtr result(p_content);
- listener->oncontentadded(result);
- }
- media_filter_destroy(filter);
- }
- }
- else if(update_type == MEDIA_CONTENT_UPDATE)
- {
-
- filter_h filter = NULL;
- if ( MEDIA_CONTENT_ERROR_NONE == media_filter_create(&filter))
- {
- media_filter_set_condition(filter, condition.c_str(), MEDIA_CONTENT_COLLATE_DEFAULT);
-
- if(media_type == MEDIA_CONTENT_TYPE_IMAGE)
- {
- p_content = new MediacontentImage();
- }
- else if(media_type == MEDIA_CONTENT_TYPE_VIDEO)
- {
- p_content = new MediacontentVideo();
- }
- else if(media_type == MEDIA_CONTENT_TYPE_SOUND || media_type == MEDIA_CONTENT_TYPE_MUSIC)
- {
- p_content = new MediacontentAudio();
- }
- else
- {
- p_content = new MediacontentMedia();
- }
-
- if( MEDIA_CONTENT_ERROR_NONE == media_info_foreach_media_from_db(filter,mediaItemCallback,(void*)p_content))
- {
- MediacontentMediaPtr result(p_content);
- listener->oncontentupdated(result);
- }
- media_filter_destroy(filter);
- }
-
- }
- else if(update_type == MEDIA_CONTENT_DELETE)
- {
- listener->oncontentremoved(uuid);
- }
- }
- }
- else if( error == MEDIA_CONTENT_ERROR_OUT_OF_MEMORY)
- {
- err_msg = "scanning is failed by out of memory";
- }
- else if( error == MEDIA_CONTENT_ERROR_INVALID_OPERATION)
- {
- err_msg = "scanning is failed by invalid operation";
- }
- else if( error == MEDIA_CONTENT_ERROR_DB_FAILED)
- {
- err_msg = "scanning is failed because db operation is failed";
- }
- else if( error == MEDIA_CONTENT_ERROR_DB_BUSY)
- {
- err_msg = "scanning is failed because db operation is failed";
- }
- else
- {
- err_msg = "scanning is failed by unknown reason";
- }
-
- LoggerD("ContentListener is called:" + err_msg );
-
+ ContentListener *listener = static_cast<ContentListener*>(user_data);
+ std::string err_msg;
+ if( error == MEDIA_CONTENT_ERROR_NONE)
+ {
+ err_msg = "";
+ if( update_item == MEDIA_ITEM_FILE)
+ {
+ string condition = "MEDIA_ID=\"";
+ condition += uuid;
+ condition += "\"";
+
+ MediacontentMedia *p_content;
+ if(update_type == MEDIA_CONTENT_INSERT)
+ {
+ filter_h filter = NULL;
+ if ( MEDIA_CONTENT_ERROR_NONE == media_filter_create(&filter))
+ {
+ media_filter_set_condition(filter, condition.c_str(), MEDIA_CONTENT_COLLATE_DEFAULT);
+
+ if(media_type == MEDIA_CONTENT_TYPE_IMAGE)
+ {
+ p_content = new MediacontentImage();
+ }
+ else if(media_type == MEDIA_CONTENT_TYPE_VIDEO)
+ {
+ p_content = new MediacontentVideo();
+ }
+ else if(media_type == MEDIA_CONTENT_TYPE_SOUND || media_type == MEDIA_CONTENT_TYPE_MUSIC)
+ {
+ p_content = new MediacontentAudio();
+ }
+ else
+ {
+ p_content = new MediacontentMedia();
+ }
+
+ if( MEDIA_CONTENT_ERROR_NONE == media_info_foreach_media_from_db(filter,mediaItemCallback,(void*)p_content))
+ {
+ MediacontentMediaPtr result(p_content);
+ listener->oncontentadded(result);
+ }
+ media_filter_destroy(filter);
+ }
+ }
+ else if(update_type == MEDIA_CONTENT_UPDATE)
+ {
+
+ filter_h filter = NULL;
+ if ( MEDIA_CONTENT_ERROR_NONE == media_filter_create(&filter))
+ {
+ media_filter_set_condition(filter, condition.c_str(), MEDIA_CONTENT_COLLATE_DEFAULT);
+
+ if(media_type == MEDIA_CONTENT_TYPE_IMAGE)
+ {
+ p_content = new MediacontentImage();
+ }
+ else if(media_type == MEDIA_CONTENT_TYPE_VIDEO)
+ {
+ p_content = new MediacontentVideo();
+ }
+ else if(media_type == MEDIA_CONTENT_TYPE_SOUND || media_type == MEDIA_CONTENT_TYPE_MUSIC)
+ {
+ p_content = new MediacontentAudio();
+ }
+ else
+ {
+ p_content = new MediacontentMedia();
+ }
+
+ if( MEDIA_CONTENT_ERROR_NONE == media_info_foreach_media_from_db(filter,mediaItemCallback,(void*)p_content))
+ {
+ MediacontentMediaPtr result(p_content);
+ listener->oncontentupdated(result);
+ }
+ media_filter_destroy(filter);
+ }
+
+ }
+ else if(update_type == MEDIA_CONTENT_DELETE)
+ {
+ listener->oncontentremoved(uuid);
+ }
+ }
+ }
+ else if( error == MEDIA_CONTENT_ERROR_OUT_OF_MEMORY)
+ {
+ err_msg = "scanning is failed by out of memory";
+ }
+ else if( error == MEDIA_CONTENT_ERROR_INVALID_OPERATION)
+ {
+ err_msg = "scanning is failed by invalid operation";
+ }
+ else if( error == MEDIA_CONTENT_ERROR_DB_FAILED)
+ {
+ err_msg = "scanning is failed because db operation is failed";
+ }
+ else if( error == MEDIA_CONTENT_ERROR_DB_BUSY)
+ {
+ err_msg = "scanning is failed because db operation is failed";
+ }
+ else
+ {
+ err_msg = "scanning is failed by unknown reason";
+ }
}
bool IMediacontentManager::setListener( void* user_data)
{
- LoggerD("ContentManager::called setListener");
- bool ret = false;
+ bool ret = false;
- if(media_content_set_db_updated_cb(content_notification_cb,user_data) == MEDIA_CONTENT_ERROR_NONE)
- {
- ret = true;
- }
- return ret;
+ if(media_content_set_db_updated_cb(content_notification_cb,user_data) == MEDIA_CONTENT_ERROR_NONE)
+ {
+ ret = true;
+ }
+ return ret;
}
bool IMediacontentManager::unsetListener()
{
- LoggerD("ContentManager::called unsetListener");
- bool ret = false;
+ bool ret = false;
- if(media_content_unset_db_updated_cb() == MEDIA_CONTENT_ERROR_NONE)
- {
- ret = true;
- }
-
- return ret;
+ if(media_content_unset_db_updated_cb() == MEDIA_CONTENT_ERROR_NONE)
+ {
+ ret = true;
+ }
+ return ret;
}
class IEventUpdateMedia : public WrtDeviceApis::Commons::IEvent<IEventUpdateMedia>
{
- public:
- IEventUpdateMedia():m_result(false), m_media(NULL)
+ public:
+ IEventUpdateMedia():m_result(false), m_media(NULL)
{
- LoggerD("entered");
}
- ~IEventUpdateMedia(){}
+ ~IEventUpdateMedia(){}
void setMediaItem(MediacontentMediaPtr value)
{
- LoggerD("setMediaItem11");
m_media = value;
}
- MediacontentMediaPtr getMediaItem()
- {
- return m_media;
- }
+ MediacontentMediaPtr getMediaItem()
+ {
+ return m_media;
+ }
void setResult(bool value)
return m_result;
}
- private:
- bool m_result;
- MediacontentMediaPtr m_media; //OUTPUT: result list
+ private:
+ bool m_result;
+ MediacontentMediaPtr m_media; //OUTPUT: result list
};
typedef DPL::SharedPtr<IEventUpdateMedia> IEventUpdateMediaPtr;
class IEventUpdateMediaItems : public WrtDeviceApis::Commons::IEvent<IEventUpdateMediaItems>
{
- public:
- IEventUpdateMediaItems():m_result(false)
+ public:
+ IEventUpdateMediaItems():m_result(false)
{
- LoggerD("entered");
}
- virtual ~IEventUpdateMediaItems(){}
+ virtual ~IEventUpdateMediaItems(){}
void setResult(bool value)
{
}
- private:
- bool m_result;
- MediacontentMediaListPtr m_mediaList;
+ private:
+ bool m_result;
+ MediacontentMediaListPtr m_mediaList;
};
typedef DPL::SharedPtr<IEventUpdateMediaItems> IEventUpdateMediaItemsPtr;
void JSAudio::initialize(JSContextRef context, JSObjectRef object)
{
- LoggerD( "entered" );
AudioPrivObject *priv = static_cast<AudioPrivObject*>( JSObjectGetPrivate( object ) );
if (!priv)
{
void JSAudio::finalize(JSObjectRef object)
{
- LoggerD( "entered" );
- AudioPrivObject *priv = static_cast<AudioPrivObject*>( JSObjectGetPrivate( object ) ) ;
- if (priv != NULL)
- {
- delete (priv);
- priv = NULL;
- JSObjectSetPrivate(object, NULL);
- }
+ AudioPrivObject *priv = static_cast<AudioPrivObject*>( JSObjectGetPrivate( object ) ) ;
+ if (priv != NULL)
+ {
+ delete (priv);
+ priv = NULL;
+ JSObjectSetPrivate(object, NULL);
+ }
}
const JSClassRef JSAudio::getClassRef()
{
- LoggerD("JSAudio::getClassRef()");
-
- if (!m_jsClassRef)
+ if (!m_jsClassRef)
{
- m_jsClassRef = JSClassCreate(&m_classInfo);
+ m_jsClassRef = JSClassCreate(&m_classInfo);
}
return m_jsClassRef;
}
MediacontentAudioPtr JSAudio::getAudioObject(JSObjectRef object)
{
- LoggerD("entered");
AudioPrivObject *priv = static_cast<AudioPrivObject*>(JSObjectGetPrivate(object));
if(!priv)
{
JSStringRef propertyName,
JSValueRef* exception)
{
- LoggerD("entered");
Try
{
Converter converter(context);
JSStringRef propertyName,
JSValueRef* exception)
{
- LoggerD("getPropertyArtist::entered");
Try
{
Converter converter(context);
}
for( unsigned int i=0; i < audio->getAudioArtist().size(); i++){
string artist = audio->getAudioArtist().at(i);
- LoggerD("artist : " << artist);
JSValueRef val = converter.toJSValueRef(artist);
if(!JSSetArrayElement(context, jsResult, i, val)){
ThrowMsg(UnknownException, "Could not insert value into js array");
JSStringRef propertyName,
JSValueRef* exception)
{
- LoggerD("getPropertyGenre::entered");
Try
{
Converter converter(context);
JSStringRef propertyName,
JSValueRef* exception)
{
- LoggerD("getPropertyComposer::entered");
Try
{
Converter converter(context);
JSStringRef propertyName,
JSValueRef* exception)
{
- LoggerD("entered");
Try
{
Converter converter(context);
JSStringRef propertyName,
JSValueRef* exception)
{
- LoggerD("entered");
Try
{
- MediaConverterFactory::ConverterType converter = MediaConverterFactory::getConverter(context);
+ MediaConverterFactory::ConverterType converter = MediaConverterFactory::getConverter(context);
AudioPrivObject *priv = static_cast<AudioPrivObject*>(JSObjectGetPrivate(object));
if(!priv)
JSContextRef globalContext = priv->getContext();
- //check lyrics state
- LoggerD("lyrics state : " << audio->getLyricsState());
-
if ( CONTENT_LYRIC_UNKNOWN == audio->getLyricsState() ||
CONTENT_LYRIC_EXISTENT == audio->getLyricsState() )
{
if (mediaContent && (audio->getLyricsState() != CONTENT_LYRIC_NON_EXISTENT))
{
- LoggerD(" lyrics success ");
JSObjectRef jsobject;
jsobject = JSMediaLyrics::createJSObject(globalContext, mediaContent);
return jsobject;
}
else
{
- LoggerD(" lyrics success ");
audio->setAudioLyricNonExistent();
}
}
JSStringRef propertyName,
JSValueRef* exception)
{
- LoggerD("entered");
Try
{
Converter converter(context);
JSStringRef propertyName,
JSValueRef* exception)
{
- LoggerD("entered");
Try
{
Converter converter(context);
JSStringRef propertyName,
JSValueRef* exception)
{
- LoggerD("entered");
Try
{
Converter converter(context);
JSStringRef propertyName,
JSValueRef* exception)
{
- LoggerD("entered");
Try
{
Converter converter(context);
JSValueRef value,
JSValueRef* exception)
{
- LoggerD("entered");
Try
{
Converter converter(context);
JSValueRef value,
JSValueRef* exception)
{
- LoggerD("entered");
Try
{
Converter converter(context);
JSValueRef value,
JSValueRef* exception)
{
- LoggerD("entered");
Try
{
Converter converter(context);
}
Catch(Exception)
{
- LoggerW("trying to set incorrect value");
return DeviceAPI::Common::JSTizenExceptionFactory::postException(context, exception, DeviceAPI::Common::JSTizenException::TYPE_MISMATCH_ERROR);
}
JSValueRef value,
JSValueRef* exception)
{
- LoggerD("entered");
Try
{
Converter converter(context);
JSValueRef value,
JSValueRef* exception)
{
- LoggerD("entered");
Try
{
Converter converter(context);
void JSMediaLyrics::initialize(JSContextRef context, JSObjectRef object)
{
- LoggerD( "entered" );
LyricsPrivObject *priv = static_cast<LyricsPrivObject*>( JSObjectGetPrivate( object ) );
if (!priv)
{
MediacontentLyricsPtr privateData(new MediacontentLyrics());
priv = new LyricsPrivObject(context, privateData);
JSObjectSetPrivate(object, static_cast<void*>(priv));
- LoggerD("private object is created");
}
else
- {
+ {
LoggerD("private object already exists");
}
}
void JSMediaLyrics::finalize(JSObjectRef object)
{
- LoggerD( "entered" );
LyricsPrivObject *priv = static_cast<LyricsPrivObject*>( JSObjectGetPrivate( object ) ) ;
delete priv;
}
const JSClassRef JSMediaLyrics::getClassRef()
{
- LoggerD("JSMediaLyrics::getClassRef()");
if (!m_jsClassRef)
- {
+ {
m_jsClassRef = JSClassCreate(&m_classInfo);
}
return m_jsClassRef;
MediacontentLyricsPtr JSMediaLyrics::getLyricsObject(JSObjectRef object)
{
- LoggerD("entered");
LyricsPrivObject *priv = static_cast<LyricsPrivObject*>(JSObjectGetPrivate(object));
if(!priv)
- {
+ {
ThrowMsg(NullPointerException, "Private object is null");
}
MediacontentLyricsPtr result = priv->getObject();
if (!result)
- {
+ {
ThrowMsg(NullPointerException, "Private object is null");
}
return result;
JSStringRef propertyName,
JSValueRef* exception)
{
- LoggerD("entered");
Try
{
- Converter converter(context);
-
+ Converter converter(context);
MediacontentLyricsPtr lyrics = getLyricsObject(object);
return converter.toJSValueRef(lyrics->getMediaLyricsType());
JSStringRef propertyName,
JSValueRef* exception)
{
- LoggerD("entered");
Try
{
- Converter converter(context);
+ Converter converter(context);
MediacontentLyricsPtr lyrics = getLyricsObject(object);
- if ( 0 == (lyrics->getMediaLyricsType()).compare("SYNCHRONIZED") )
- {
+ if ( 0 == (lyrics->getMediaLyricsType()).compare("SYNCHRONIZED") )
+ {
- JSObjectRef jsResult = JSCreateArrayObject(context, 0, NULL);
- vector<unsigned long> timeStamps = lyrics->getMediaLyricsTimeStamps();
+ JSObjectRef jsResult = JSCreateArrayObject(context, 0, NULL);
+ vector<unsigned long> timeStamps = lyrics->getMediaLyricsTimeStamps();
if(timeStamps.size() > 0)
- {
- if (NULL == jsResult)
- {
+ {
+ if (NULL == jsResult)
+ {
ThrowMsg(NullPointerException, "Could not create js array object");
}
for(unsigned int i=0; i<timeStamps.size(); i++)
{
- JSValueRef val = converter.toJSValueRef(timeStamps.at(i));
- if(!JSSetArrayElement(context, jsResult, i, val))
+ JSValueRef val = converter.toJSValueRef(timeStamps.at(i));
+ if(!JSSetArrayElement(context, jsResult, i, val))
{
- ThrowMsg(UnknownException, "Could not insert value into js array");
+ ThrowMsg(UnknownException, "Could not insert value into js array");
}
}
-
return jsResult;
}
}
-
}
Catch(Exception)
{
JSStringRef propertyName,
JSValueRef* exception)
{
- LoggerD("entered");
Try
{
- Converter converter(context);
+ Converter converter(context);
MediacontentLyricsPtr lyrics = getLyricsObject(object);
- JSObjectRef jsResult = JSCreateArrayObject(context, 0, NULL);
- vector<string> texts = lyrics->getMediaLyricsTexts();
- if(texts.size() >0)
- {
- if (NULL == jsResult)
- {
+ JSObjectRef jsResult = JSCreateArrayObject(context, 0, NULL);
+ vector<string> texts = lyrics->getMediaLyricsTexts();
+ if(texts.size() >0)
+ {
+ if (NULL == jsResult)
+ {
ThrowMsg(NullPointerException, "Could not create js array object");
}
for(unsigned int i=0; i<texts.size(); i++)
{
- JSValueRef val = converter.toJSValueRef(texts.at(i));
+ JSValueRef val = converter.toJSValueRef(texts.at(i));
if(!JSSetArrayElement(context, jsResult, i, val))
{
- ThrowMsg(UnknownException, "Could not insert value into js array");
+ ThrowMsg(UnknownException, "Could not insert value into js array");
}
}
- }
-
+ }
return jsResult;
}
Catch(Exception)
void JSMedia::initialize(JSContextRef context, JSObjectRef object)
{
- LoggerD( "entered" );
MediaPrivObject *priv = static_cast<MediaPrivObject*>( JSObjectGetPrivate( object ) );
if (!priv)
{
MediacontentMediaPtr privateData(new MediacontentMedia());
priv = new MediaPrivObject(context, privateData);
JSObjectSetPrivate(object, static_cast<void*>(priv));
- LoggerD("new event is created" );
}
else
- {
+ {
LoggerD("private object already exists");
}
}
void JSMedia::finalize(JSObjectRef object)
{
- LoggerD( "entered" );
MediaPrivObject *priv = static_cast<MediaPrivObject*>( JSObjectGetPrivate( object ) ) ;
- if (priv != NULL)
- {
- delete (priv);
- priv = NULL;
- JSObjectSetPrivate(object, NULL);
- }
-
+ if (priv != NULL)
+ {
+ delete (priv);
+ priv = NULL;
+ JSObjectSetPrivate(object, NULL);
+ }
}
const JSClassRef JSMedia::getClassRef()
{
- LoggerD("JSMedia::getClassRef()");
if (!m_jsClassRef)
- {
- m_jsClassRef = JSClassCreate(&m_classInfo);
+ {
+ m_jsClassRef = JSClassCreate(&m_classInfo);
}
return m_jsClassRef;
}
MediacontentMediaPtr JSMedia::getMediaObject(JSObjectRef object)
{
- LoggerD("entered");
MediaPrivObject *priv = static_cast<MediaPrivObject*>(JSObjectGetPrivate(object));
if(!priv)
- {
+ {
ThrowMsg(NullPointerException, "Private object is null");
}
MediacontentMediaPtr result = priv->getObject();
if (!result)
- {
+ {
ThrowMsg(NullPointerException, "Private object is null");
}
return result;
JSStringRef propertyName,
JSValueRef* exception)
{
- LoggerD("entered");
Try
{
Converter converter(context);
MediacontentMediaPtr media = getMediaObject(object);
-
return converter.toJSValueRef(media->getMediaUUID());
}
Catch(Exception)
JSStringRef propertyName,
JSValueRef* exception)
{
- LoggerD("entered");
Try
{
Converter converter(context);
JSStringRef propertyName,
JSValueRef* exception)
{
- LoggerD("getPropertyDisplayName::entered");
Try
{
Converter converter(context);
MediacontentMediaPtr media = getMediaObject(object);
- LoggerD("getDisplayName:"<<media->getDisplayName());
return converter.toJSValueRef(media->getDisplayName());
}
Catch(Exception)
JSStringRef propertyName,
JSValueRef* exception)
{
- LoggerD("getPropertyDisplayName::entered");
Try
{
Converter converter(context);
MediacontentMediaPtr media = getMediaObject(object);
- LoggerD("getTitle:"<<media->getTitle());
return converter.toJSValueRef(media->getTitle());
}
Catch(Exception)
JSStringRef propertyName,
JSValueRef* exception)
{
- LoggerD("entered");
Try
{
Converter converter(context);
JSStringRef propertyName,
JSValueRef* exception)
{
- LoggerD("entered");
Try
{
Converter converter(context);
JSStringRef propertyName,
JSValueRef* exception)
{
- LoggerD("getPropertyDescription::entered");
Try
{
Converter converter(context);
JSStringRef propertyName,
JSValueRef* exception)
{
- LoggerD("entered");
Try
{
Converter converter(context);
JSStringRef propertyName,
JSValueRef* exception)
{
- LoggerD("entered");
Try
{
Converter converter(context);
JSStringRef propertyName,
JSValueRef* exception)
{
- LoggerD("entered");
Try
{
Converter converter(context);
JSStringRef propertyName,
JSValueRef* exception)
{
- LoggerD("getPropertyType::entered");
Try
{
Converter converter(context);
JSStringRef propertyName,
JSValueRef* exception)
{
- LoggerD("getPropertyType::entered");
Try
{
Converter converter(context);
MediacontentMediaPtr media = getMediaObject(object);
- LoggerD("size:" << media->getSize());
- double var = (double)media->getSize(); //casting.
- return converter.toJSValueRef(var);
+ double var = (double)media->getSize();
+ return converter.toJSValueRef(var);
}
Catch(Exception)
{
{
Try
{
- Converter converter(context);
- MediacontentMediaPtr media = getMediaObject(object);
- vector<std::string> editableAttrList = media->getEditableAttr();
- JSObjectRef jsResult = JSCreateArrayObject(context, 0, NULL);
-
- if (NULL == jsResult)
- {
- ThrowMsg(NullPointerException, "Could not create js array object");
- }
- for(unsigned int i=0; i<editableAttrList.size(); i++)
- {
- JSValueRef val = converter.toJSValueRef(editableAttrList.at(i));
- if(!JSSetArrayElement(context, jsResult, i, val))
- {
- ThrowMsg(UnknownException, "Could not insert value into js array");
- }
- }
+ Converter converter(context);
+ MediacontentMediaPtr media = getMediaObject(object);
+ vector<std::string> editableAttrList = media->getEditableAttr();
+ JSObjectRef jsResult = JSCreateArrayObject(context, 0, NULL);
+
+ if (NULL == jsResult)
+ {
+ ThrowMsg(NullPointerException, "Could not create js array object");
+ }
+ for(unsigned int i=0; i<editableAttrList.size(); i++)
+ {
+ JSValueRef val = converter.toJSValueRef(editableAttrList.at(i));
+ if(!JSSetArrayElement(context, jsResult, i, val))
+ {
+ ThrowMsg(UnknownException, "Could not insert value into js array");
+ }
+ }
return jsResult;
- }
- Catch(Exception)
- {
- LoggerW("trying to get incorrect value");
- }
- return JSValueMakeUndefined(context);
+ }
+ Catch(Exception)
+ {
+ LoggerW("trying to get incorrect value");
+ }
+ return JSValueMakeUndefined(context);
}
JSValueRef value,
JSValueRef* exception)
{
- LoggerD("entered");
Try
{
Converter converter(context);
MediacontentMediaPtr objMedia = getMediaObject(object);
int rating = converter.toInt(value);
- LoggerD("Inserted value : " << rating);
-
if(rating < 0)
{
rating = 0;
- LoggerD("Rating value set 0 as inserted value is too small");
}
-
if ( objMedia->getRating() != rating)
{
objMedia->setRating(rating, true);
JSValueRef value,
JSValueRef* exception)
{
- LoggerD("entered");
Try
{
Converter converter(context);
MediacontentMediaPtr objMedia = getMediaObject(object);
string displayName = converter.toString(value);
- LoggerD("Inserted value : " << displayName);
-
if ((objMedia->getDescription()).compare(displayName) != 0)
{
objMedia->setDisplayName(displayName, true);
JSValueRef value,
JSValueRef* exception)
{
- LoggerD("entered");
Try
{
Converter converter(context);
MediacontentMediaPtr objMedia = getMediaObject(object);
string description = converter.toString(value);
-
- LoggerD("Inserted value : " << description);
-
+
if ( (objMedia->getDescription()).compare(description) != 0 )
{
objMedia->setDescription(description, true);
const JSValueRef arguments[],
JSValueRef* exception )
{
- LoggerD("JSContentManagerManager::getFolders entered");
- TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0);
+ TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0);
MediacontentManagerPrivObject *privateObject;
privateObject = static_cast<MediacontentManagerPrivObject*>(JSObjectGetPrivate(thisObject));
const JSValueRef arguments[],
JSValueRef* exception )
{
- LoggerD("JSContentManagerManager::find entered");
- TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0);
+
+ TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0);
MediacontentManagerPrivObject *privateObject;
privateObject = static_cast<MediacontentManagerPrivObject*>(JSObjectGetPrivate(thisObject));
const JSValueRef arguments[],
JSValueRef* exception)
{
- LoggerD("JSContentManagerManager::updateItemsBatch entered");
- TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0);
+ TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0);
MediacontentManagerPrivObject *privateObject;
privateObject = static_cast<MediacontentManagerPrivObject*>(JSObjectGetPrivate(thisObject));
if(!privateObject) {
const JSValueRef arguments[],
JSValueRef* exception)
{
- LoggerD("JSContentManagerManager::updateItem entered");
- TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0);
+
+ TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0);
MediacontentManagerPrivObject *privateObject;
privateObject = static_cast<MediacontentManagerPrivObject*>(JSObjectGetPrivate(thisObject));
const JSValueRef arguments[],
JSValueRef* exception)
{
- LoggerD("JSContentManagerManager::scanFile entered");
- TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0);
+ TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0);
MediacontentManagerPrivObject *privateObject;
privateObject = static_cast<MediacontentManagerPrivObject*>(JSObjectGetPrivate(thisObject));
const JSValueRef arguments[],
JSValueRef* exception)
{
- LoggerD("JSContentManagerManager::setChangeListener entered");
- TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0);
+ TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0);
MediacontentManagerPrivObject *privateObject;
privateObject = static_cast<MediacontentManagerPrivObject*>(JSObjectGetPrivate(thisObject));
const JSValueRef arguments[],
JSValueRef* exception)
{
- LoggerD("JSContentManagerManager::unsetChangeListener entered");
- TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0);
+ TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0);
MediacontentManagerPrivObject *privateObject;
privateObject = static_cast<MediacontentManagerPrivObject*>(JSObjectGetPrivate(thisObject));
if(!privateObject) {
void JSMediacontentManager::initialize(JSContextRef context, JSObjectRef object)
{
- LoggerD("JSContentManager initialize entered");
MediacontentManagerPrivObject *privateObject = static_cast<MediacontentManagerPrivObject*>(JSObjectGetPrivate(object));
if (NULL == privateObject)
{
- LoggerD("Create ContenttManagerPrivObject");
IMediacontentManagerPtr contentManager = MediacontentFactory::getInstance().createMediacontentManagerObject();
privateObject = new MediacontentManagerPrivObject(context, contentManager);
if (!JSObjectSetPrivate(object, static_cast<void*>(privateObject)))
void JSMediacontentManager::finalize(JSObjectRef object)
{
- LoggerD("Entered");
MediacontentManagerPrivObject* priv = static_cast<MediacontentManagerPrivObject*> (JSObjectGetPrivate(object));
if(priv != NULL)
{
- LoggerD("Deleting coordinates object");
delete priv;
JSObjectSetPrivate(object, NULL);
priv = NULL;
void JSFolder::initialize(JSContextRef context, JSObjectRef object)
{
- LoggerD( "entered" );
FolderPrivObject *priv = static_cast<FolderPrivObject*>( JSObjectGetPrivate( object ) );
if (!priv)
- {
+ {
MediacontentFolderPtr privateData(new MediacontentFolder());
priv = new FolderPrivObject(context, privateData);
JSObjectSetPrivate(object, static_cast<void*>(priv));
- LoggerD("new event is created" );
}
- else
- {
+ else
+ {
LoggerD("private object already exists");
}
}
void JSFolder::finalize(JSObjectRef object)
{
- LoggerD( "entered" );
FolderPrivObject *priv = static_cast<FolderPrivObject*>( JSObjectGetPrivate( object ) ) ;
- if (priv != NULL)
- {
- delete (priv);
- priv = NULL;
- JSObjectSetPrivate(object, NULL);
- }
-
+ if (priv != NULL)
+ {
+ delete (priv);
+ priv = NULL;
+ JSObjectSetPrivate(object, NULL);
+ }
}
const JSClassRef JSFolder::getClassRef()
{
if (!m_jsClassRef)
- {
- m_jsClassRef = JSClassCreate(&m_classInfo);
+ {
+ m_jsClassRef = JSClassCreate(&m_classInfo);
}
return m_jsClassRef;
}
MediacontentFolderPtr JSFolder::getFolderObject(JSObjectRef object)
{
- LoggerD("entered");
FolderPrivObject *priv = static_cast<FolderPrivObject*>(JSObjectGetPrivate(object));
if(!priv) {
ThrowMsg(NullPointerException, "Private object is null");
JSStringRef propertyName,
JSValueRef* exception)
{
- LoggerD("entered");
Try
{
Converter converter(context);
MediacontentFolderPtr folder = getFolderObject(object);
-
return converter.toJSValueRef(folder->getFolderUUID());
}
Catch(Exception)
JSStringRef propertyName,
JSValueRef* exception)
{
- LoggerD("entered");
Try
{
Converter converter(context);
JSStringRef propertyName,
JSValueRef* exception)
{
- LoggerD("getPropertyPath::entered");
Try
{
Converter converter(context);
JSStringRef propertyName,
JSValueRef* exception)
{
- LoggerD("entered");
Try
{
Converter converter(context);
JSStringRef propertyName,
JSValueRef* exception)
{
- LoggerD("entered");
Try
{
Converter converter(context);
JSStringRef propertyName,
JSValueRef* exception)
{
- LoggerD("entered");
Try
{
Converter converter(context);
MediacontentFolderPtr folder = getFolderObject(object);
- //folder->getMediaIdList()
- //MediaIdListPtr getMediaIdList() const;
- //typedef vector<std::string> MediaIdList;
- //typedef DPL::SharedPtr<MediaIdList> MediaIdListPtr;
- MediaIdListPtr mediaIdLstPtr = folder->getMediaIdList();
- JSObjectRef jsResult = JSCreateArrayObject(context, 0, NULL);
-
- if(mediaIdLstPtr)
- {
- if (NULL == jsResult)
- {
+ MediaIdListPtr mediaIdLstPtr = folder->getMediaIdList();
+ JSObjectRef jsResult = JSCreateArrayObject(context, 0, NULL);
+
+ if(mediaIdLstPtr)
+ {
+ if (NULL == jsResult)
+ {
ThrowMsg(NullPointerException, "Could not create js array object");
}
for(unsigned int i=0; i<mediaIdLstPtr->size(); i++)
{
- JSValueRef val = converter.toJSValueRef(mediaIdLstPtr->at(i));
+ JSValueRef val = converter.toJSValueRef(mediaIdLstPtr->at(i));
if(!JSSetArrayElement(context, jsResult, i, val))
{
- ThrowMsg(UnknownException, "Could not insert value into js array");
+ ThrowMsg(UnknownException, "Could not insert value into js array");
}
}
- }
+ }
return jsResult;
}
Catch(Exception)
JSStaticValue JSImage::m_property[] =
{
-// { TIZEN_CONTENT_IMAGE_UID, getPropertyUid, NULL, kJSPropertyAttributeReadOnly},
-// { TIZEN_CONTENT_IMAGE_GEOLOCATION, getPropertyGeoLocation, setPropertyGeolocation, kJSPropertyAttributeNone},
{ TIZEN_CONTENT_IMAGE_WIDTH, getPropertyWidth, NULL, kJSPropertyAttributeReadOnly},
{ TIZEN_CONTENT_IMAGE_HEIGHT, getPropertyHeight, NULL, kJSPropertyAttributeReadOnly},
{ TIZEN_CONTENT_IMAGE_ORIENTATION, getPropertyOrientation, setPropertyOrientation, kJSPropertyAttributeNone},
void JSImage::initialize(JSContextRef context, JSObjectRef object)
{
- LoggerD( "entered" );
+
ImagePrivObject *priv = static_cast<ImagePrivObject*>( JSObjectGetPrivate( object ) );
if (!priv) {
MediacontentImagePtr privateData(new MediacontentImage());
priv = new ImagePrivObject(context, privateData);
JSObjectSetPrivate(object, static_cast<void*>(priv));
- LoggerD("new private object is created" );
}
else {
- LoggerD("private object already exists");
- MediacontentImagePtr image = getImageObject(object);
- DeviceAPI::Tizen::SimpleCoordinatesPtr geoPtr(new SimpleCoordinates(image->getImageLatitude(),image->getImageLongitude()));
- JSUtil::setProperty(context, object, TIZEN_CONTENT_IMAGE_GEOLOCATION,
- JSSimpleCoordinates::createJSObject(context,geoPtr),
- kJSPropertyAttributeNone);
+ MediacontentImagePtr image = getImageObject(object);
+ DeviceAPI::Tizen::SimpleCoordinatesPtr geoPtr(new SimpleCoordinates(image->getImageLatitude(),image->getImageLongitude()));
+ JSUtil::setProperty(context, object, TIZEN_CONTENT_IMAGE_GEOLOCATION,
+ JSSimpleCoordinates::createJSObject(context,geoPtr),
+ kJSPropertyAttributeNone);
}
}
void JSImage::finalize(JSObjectRef object)
{
- LoggerD( "entered" );
- ImagePrivObject *priv = static_cast<ImagePrivObject*>( JSObjectGetPrivate( object ) ) ;
- if (priv != NULL)
- {
- delete (priv);
- priv = NULL;
- JSObjectSetPrivate(object, NULL);
- }
+ ImagePrivObject *priv = static_cast<ImagePrivObject*>( JSObjectGetPrivate( object ) ) ;
+ if (priv != NULL)
+ {
+ delete (priv);
+ priv = NULL;
+ JSObjectSetPrivate(object, NULL);
+ }
}
const JSClassRef JSImage::getClassRef()
{
- LoggerD("JSImage::getClassRef()");
-
if (!m_jsClassRef) {
- m_jsClassRef = JSClassCreate(&m_classInfo);
+ m_jsClassRef = JSClassCreate(&m_classInfo);
}
return m_jsClassRef;
}
MediacontentImagePtr JSImage::getImageObject(JSObjectRef object)
{
- LoggerD("entered");
ImagePrivObject *priv = static_cast<ImagePrivObject*>(JSObjectGetPrivate(object));
if(!priv) {
ThrowMsg(NullPointerException, "Private object is null");
JSValueRef* exception)
{
- LoggerD("entered");
Try
{
Converter converter(context);
MediacontentImagePtr image = getImageObject(object);
-
- LoggerD("lati :" << image->getImageLatitude());
- LoggerD("longi :" << image->getImageLongitude());
- DeviceAPI::Tizen::SimpleCoordinatesPtr geoPtr(new SimpleCoordinates(image->getImageLatitude(),image->getImageLongitude()));
- return JSSimpleCoordinates::createJSObject(context,geoPtr);
+ DeviceAPI::Tizen::SimpleCoordinatesPtr geoPtr(new SimpleCoordinates(image->getImageLatitude(),image->getImageLongitude()));
+ return JSSimpleCoordinates::createJSObject(context,geoPtr);
}
Catch(Exception)
JSStringRef propertyName,
JSValueRef* exception)
{
- LoggerD("entered");
Try
{
Converter converter(context);
JSStringRef propertyName,
JSValueRef* exception)
{
- LoggerD("entered");
Try
{
Converter converter(context);
JSStringRef propertyName,
JSValueRef* exception)
{
- LoggerD("entered");
Try
{
Converter converter(context);
JSValueRef value,
JSValueRef* exception)
{
- LoggerD("entered");
- Try
- {
- Converter converter(context);
- MediacontentImagePtr objImg = getImageObject(object);
-
- string orientation = converter.toString(value);
- LoggerD("Inserted value : " << orientation);
-
- if ((objImg->getImageOrientation()).compare(orientation) !=0 )
- {
- objImg->setImageOrientation(orientation, true);
- }
-
- return true;
- }
- Catch(Exception)
- {
- LoggerW("trying to get incorrect value");
- return JSTizenExceptionFactory::postException(context, exception, JSTizenException::TYPE_MISMATCH_ERROR);
- }
-
- return false;
+ Try
+ {
+ Converter converter(context);
+ MediacontentImagePtr objImg = getImageObject(object);
+
+ string orientation = converter.toString(value);
+
+ if ((objImg->getImageOrientation()).compare(orientation) !=0 )
+ {
+ objImg->setImageOrientation(orientation, true);
+ }
+
+ return true;
+ }
+ Catch(Exception)
+ {
+ LoggerW("trying to get incorrect value");
+ return JSTizenExceptionFactory::postException(context, exception, JSTizenException::TYPE_MISMATCH_ERROR);
+ }
+
+ return false;
}
bool JSImage::setPropertyGeolocation(
JSValueRef value,
JSValueRef* exception)
{
- LoggerD("entered");
-
Try
{
Converter converter(context);
JSStaticValue JSVideo::m_property[] =
{
-// { TIZEN_CONTENT_VIDEO_GEOLOCATION, getPropertyGeoLocation, setPropertyGeoLocation, kJSPropertyAttributeNone},
{ TIZEN_CONTENT_VIDEO_ALBUM, getPropertyAlbum, NULL, kJSPropertyAttributeReadOnly},
{ TIZEN_CONTENT_VIDEO_ARTIST, getPropertyArtist, NULL, kJSPropertyAttributeReadOnly},
{ TIZEN_CONTENT_VIDEO_DURATION, getPropertyDuration, NULL, kJSPropertyAttributeReadOnly},
void JSVideo::initialize(JSContextRef context, JSObjectRef object)
{
- LoggerD( "entered" );
VideoPrivObject *priv = static_cast<VideoPrivObject*>( JSObjectGetPrivate( object ) );
if (!priv)
{
void JSVideo::finalize(JSObjectRef object)
{
- LoggerD( "entered" );
- VideoPrivObject *priv = static_cast<VideoPrivObject*>( JSObjectGetPrivate( object ) ) ;
- if (priv != NULL)
- {
- delete (priv);
- priv = NULL;
- JSObjectSetPrivate(object, NULL);
- }
-
- priv = NULL;
-
+ VideoPrivObject *priv = static_cast<VideoPrivObject*>( JSObjectGetPrivate( object ) ) ;
+ if (priv != NULL)
+ {
+ delete (priv);
+ priv = NULL;
+ JSObjectSetPrivate(object, NULL);
+ }
+ priv = NULL;
}
const JSClassRef JSVideo::getClassRef()
{
- LoggerD("JSVideo::getClassRef()");
-
if (!m_jsClassRef)
{
- m_jsClassRef = JSClassCreate(&m_classInfo);
+ m_jsClassRef = JSClassCreate(&m_classInfo);
}
return m_jsClassRef;
}
MediacontentVideoPtr JSVideo::getVideoObject(JSObjectRef object)
{
- LoggerD("entered");
VideoPrivObject *priv = static_cast<VideoPrivObject*>(JSObjectGetPrivate(object));
if(!priv)
{
JSStringRef propertyName,
JSValueRef* exception)
{
- LoggerD("entered");
Try
{
Converter converter(context);
JSValueRef value,
JSValueRef* exception)
{
- LoggerD("entered");
Try
{
Converter converter(context);
MediacontentVideoPtr video = getVideoObject(object);
DeviceAPI::Tizen::SimpleCoordinatesPtr geoLocation =
- DeviceAPI::Tizen::JSSimpleCoordinates::getSimpleCoordinates(context, value);
+ DeviceAPI::Tizen::JSSimpleCoordinates::getSimpleCoordinates(context, value);
if(geoLocation){
video->setVideoLatitude(geoLocation->getLatitude());
JSStringRef propertyName,
JSValueRef* exception)
{
- LoggerD("entered");
Try
{
Converter converter(context);
JSStringRef propertyName,
JSValueRef* exception)
{
- LoggerD("entered");
Try
{
- Converter converter(context);
- MediacontentVideoPtr video = getVideoObject(object);
- JSObjectRef jsResult = JSCreateArrayObject(context, 0, NULL);
- if (NULL == jsResult) {
- ThrowMsg(NullPointerException, "Could not create js array object");
- }
-
- for( unsigned int i=0; i < video->getVideoArtist().size(); i++) {
- string artist = video->getVideoArtist().at(i);
- LoggerD("artist : " << artist);
- JSValueRef val = converter.toJSValueRef(artist);
-
- if(!JSSetArrayElement(context, jsResult, i, val)){
- ThrowMsg(NullPointerException, "Could not insert value into js array");
- }
- }
- return jsResult;
+ Converter converter(context);
+ MediacontentVideoPtr video = getVideoObject(object);
+ JSObjectRef jsResult = JSCreateArrayObject(context, 0, NULL);
+ if (NULL == jsResult) {
+ ThrowMsg(NullPointerException, "Could not create js array object");
+ }
+
+ for( unsigned int i=0; i < video->getVideoArtist().size(); i++) {
+ string artist = video->getVideoArtist().at(i);
+ JSValueRef val = converter.toJSValueRef(artist);
+
+ if(!JSSetArrayElement(context, jsResult, i, val)){
+ ThrowMsg(NullPointerException, "Could not insert value into js array");
+ }
+ }
+ return jsResult;
}
- Catch(Exception){
+ Catch(Exception){
LoggerW("trying to get incorrect value");
}
return JSValueMakeNull(context);
JSStringRef propertyName,
JSValueRef* exception)
{
- LoggerD("entered");
Try
{
Converter converter(context);
MediacontentVideoPtr video = getVideoObject(object);
- if(video){
- return converter.toJSValueRef(video->getVideoDuration());
- }
+ if(video){
+ return converter.toJSValueRef(video->getVideoDuration());
+ }
}
Catch(Exception)
{
JSStringRef propertyName,
JSValueRef* exception)
{
- LoggerD("entered");
+
Try
{
Converter converter(context);
MediacontentVideoPtr video = getVideoObject(object);
- if(video){
- return converter.toJSValueRef(video->getVideoWidth());
- }
+ if(video){
+ return converter.toJSValueRef(video->getVideoWidth());
+ }
}
Catch(Exception)
{
JSStringRef propertyName,
JSValueRef* exception)
{
- LoggerD("entered");
Try
{
Converter converter(context);
MediacontentVideoPtr video = getVideoObject(object);
- if(video){
- return converter.toJSValueRef(video->getVideoHeight());
- }
+ if(video){
+ return converter.toJSValueRef(video->getVideoHeight());
+ }
}
Catch(Exception)
{
JSValueRef value,
JSValueRef* exception)
{
- LoggerD("entered");
Try
{
Converter converter(context);
MediacontentVideoPtr video = getVideoObject(object);
- vector<std::string> artists;
- if (!JSValueIsNull(context, value)) {
-
- if (JSIsArrayValue(context, value)){
- JSObjectRef jsObject = converter.toJSObjectRef(value);
- for (std::size_t i = 0; i < JSGetArrayLength(context, jsObject); ++i) {
- JSValueRef element = JSGetArrayElement(context, jsObject, i);
- artists.push_back(converter.toString(element));
- }
- }
- else{
- DeviceAPI::Common::JSTizenExceptionFactory::postException(context, exception, DeviceAPI::Common::JSTizenException::TYPE_MISMATCH_ERROR);
- }
- video->setVideoArtist(artists, true);
- return true;
- }
+ vector<std::string> artists;
+ if (!JSValueIsNull(context, value)) {
+
+ if (JSIsArrayValue(context, value)){
+ JSObjectRef jsObject = converter.toJSObjectRef(value);
+ for (std::size_t i = 0; i < JSGetArrayLength(context, jsObject); ++i) {
+ JSValueRef element = JSGetArrayElement(context, jsObject, i);
+ artists.push_back(converter.toString(element));
+ }
+ }
+ else{
+ DeviceAPI::Common::JSTizenExceptionFactory::postException(context, exception, DeviceAPI::Common::JSTizenException::TYPE_MISMATCH_ERROR);
+ }
+ video->setVideoArtist(artists, true);
+ return true;
+ }
+ }
+ Catch(Exception)
+ {
+ LoggerW("trying to set incorrect value");
+ DeviceAPI::Common::JSTizenExceptionFactory::postException(context, exception, DeviceAPI::Common::JSTizenException::TYPE_MISMATCH_ERROR);
}
- Catch(Exception)
- {
- LoggerW("trying to set incorrect value");
- DeviceAPI::Common::JSTizenExceptionFactory::postException(context, exception, DeviceAPI::Common::JSTizenException::TYPE_MISMATCH_ERROR);
- }
return false;
}
JSValueRef value,
JSValueRef* exception)
{
- LoggerD("entered");
Try
{
Converter converter(context);
MediacontentVideoPtr video = getVideoObject(object);
string album = converter.toString(value);
- if(video){
- video->setVideoAlbum(album, true);
- return true;
- }
- }
+ if(video){
+ video->setVideoAlbum(album, true);
+ return true;
+ }
+ }
Catch(Exception)
{
LoggerW("trying to set incorrect value");
ACE_CREATE_FEATURE_LIST(CONTENT_FEATURES_CONTENT_WRITE);
ACE_ADD_API_FEATURE(CONTENT_FEATURES_CONTENT_WRITE, FEATURE_CONTENT_WRITE);
-#if 0
- ACE_CREATE_FEATURE_LIST(CONTENT_FEATURES_CONTENT);
- ACE_ADD_API_FEATURE(CONTENT_FEATURES_CONTENT,
- FEATURE_CONTENT);
-
- ACE_CREATE_FEATURE_LIST(CONTENT_FEATURES_READ);
- ACE_ADD_API_FEATURE(CONTENT_FEATURES_READ,
- FEATURE_CONTENT_READ);
-
- ACE_CREATE_FEATURE_LIST(CONTENT_FEATURES_WRITE);
- ACE_ADD_API_FEATURE(CONTENT_FEATURES_WRITE,
- FEATURE_CONTENT_WRITE);
-#endif
/**
* Functions
*/
void on_frame_load_callback(const void * context)
{
LoggerD("[Tizen\\content] on_frame_load_callback (" << context << ")");
- GlobalContextManager::getInstance()->addGlobalContext(static_cast<JSContextRef>(context));
+ GlobalContextManager::getInstance()->addGlobalContext(static_cast<JSContextRef>(context));
}
void on_frame_unload_callback(const void * context)
void on_widget_start_callback(int widgetId)
{
LoggerD("[Tizen\\content] on_widget_start_callback (" << widgetId << ")");
- TIME_TRACER_INIT();
+ TIME_TRACER_INIT();
- Try
+ Try
{
WrtAccessSingleton::Instance().initialize(widgetId);
}
void on_widget_stop_callback(int widgetId)
{
LoggerD("[Tizen\\content] on_widget_stop_callback (" << widgetId << ")");
- TIME_TRACER_EXPORT_REPORT_TO(TIME_TRACER_EXPORT_FILE,"Content");
- TIME_TRACER_RELEASE();
+ TIME_TRACER_EXPORT_REPORT_TO(TIME_TRACER_EXPORT_FILE,"Content");
+ TIME_TRACER_RELEASE();
Try
{
WrtAccessSingleton::Instance().deinitialize(widgetId);
- }
- Catch(WrtDeviceApis::Commons::Exception)
+ }
+ Catch(WrtDeviceApis::Commons::Exception)
{
LoggerE("WrtAccess deinitialization failed");
}
#define OSP_K_APPCONTROL_URI "__OSP_APPCONTROL_URI__"
#define OSP_K_DATACONTROL_PROVIDER "__OSP_DATACONTROL_PROVIDER__"
#define OSP_K_DATACONTROL_REQUEST_TYPE "__OSP_DATACONTROL_REQUEST_TYPE__"
+#define OSP_K_DATACONTROL_PROTOCOL_VERSION "__OSP_DATACONTROL_PROTOCOL_VERSION__"
+
#define RESULT_TRUE_FROM_OSP "1"
#define RESULT_FALSE_FROM_OSP "0"
EventGetValuePtr event;
int count = 0;
size_t index = 0;
-
+ std::ifstream getValueStream;
+ std::string getValueFilePath;
+
try
{
if (data == NULL)
// 3 ~ value...
if (count > 0)
{
- for (index = 3; index < result.size(); index++)
+ getValueFilePath = result[3];
+ getValueStream.open(getValueFilePath.c_str(), std::ios::binary);
+ int memorizedSize = 255;
+ int size = 0;
+ char *buf = NULL;
+ buf = new char[memorizedSize + 1];
+
+ if (getValueStream.is_open())
{
- event->addResultValue(result[index]);
+ LoggerD("open ok");
}
+ else
+ {
+ LoggerD("fail open" << getValueFilePath);
+ ThrowMsg(WrtDeviceApis::Commons::PlatformException, "get value error");
+ }
+
+ for (index = 0; index < count; index++)
+ {
+ getValueStream.read((char*)&size, sizeof(int)); // read size
+ //LoggerD(size);
+
+ if (memorizedSize < size)
+ {
+ memorizedSize = size;
+
+ if (buf)
+ {
+ delete[] buf;
+ }
+
+ buf = new char[memorizedSize + 1];
+ }
+
+ if (buf == NULL)
+ {
+ ThrowMsg(WrtDeviceApis::Commons::NullPointerException, "Out of memory");
+ }
+ memset(buf, memorizedSize + 1, 0);
+ getValueStream.read((char*)buf, size);
+ buf[size] = '\0';
+
+ //LoggerD(buf);
+
+ event->addResultValue(buf);
+ }
+
+/* for (index = 3; index < result.size(); index++)
+ {
+ event->addResultValue(result[index]);
+ }
+*/
}
}
event->setExceptionCode(ex.getCode());
event->setErrorMsg(ex.GetMessage());
}
+ getValueStream.close();
+ if (unlink(getValueFilePath.c_str()) != 0)
+ {
+ LoggerE("Error while removing SelectDataObject.");
+ }
+
consumer->handlePendingEvent(event);
if (pendingEvent)
bundle_add(passData, OSP_K_LAUNCH_TYPE, OSP_V_LAUNCH_TYPE_DATACONTROL);
bundle_add(passData, OSP_K_DATACONTROL_REQUEST_TYPE, reqtypestr.c_str());
bundle_add(passData, OSP_K_DATACONTROL_PROVIDER, m_providerId.c_str());
+ bundle_add(passData, OSP_K_DATACONTROL_PROTOCOL_VERSION, "ver_2.1.0.1");
queryItem.push_back(dataId); // dataid
queryItem.push_back(key);
ThrowMsg(NullPointerException, "SyncProfileInfo is NULL.");
}
- LoggerD("url: "<<profile->getSyncInfo()->getUrl());
-
ret = sync_agent_ds_create_profile_info(&profile_h);
if (SYNC_AGENT_DS_SUCCESS!=ret) {
ThrowMsg(PlatformException, "Platform error while creating a profile: "<<ret);
profile->getSyncInfo()->setId(server_info.id);
profile->getSyncInfo()->setPassword(server_info.password);
- LoggerD("Url: "<<profile->getSyncInfo()->getUrl());
-
sync_agent_ds_sync_info sync_info;
ret = sync_agent_ds_get_sync_info(profile_h, &sync_info);
if (SYNC_AGENT_DS_SUCCESS!=ret) {
serviceInfo->setServerDatabaseUri(category_info->tgt_uri);
}
- LoggerD("Service type: "<<serviceInfo->getSyncServiceType()<<", DB URI: "<<serviceInfo->getServerDatabaseUri());
+ LoggerD("Service type: "<<serviceInfo->getSyncServiceType());
profile->getServiceInfo()->push_back(serviceInfo);
}
if(category_list) {
profile->getSyncInfo()->setId(server_info.id);
profile->getSyncInfo()->setPassword(server_info.password);
- LoggerD("Url: "<<profile->getSyncInfo()->getUrl());
-
sync_agent_ds_sync_info sync_info;
ret = sync_agent_ds_get_sync_info(profile_h, &sync_info);
if (SYNC_AGENT_DS_SUCCESS!=ret) {
serviceInfo->setServerDatabaseUri(category_info->tgt_uri);
}
- LoggerD("Service type: "<<serviceInfo->getSyncServiceType()<<", DB URI: "<<serviceInfo->getServerDatabaseUri());
+ LoggerD("Service type: "<<serviceInfo->getSyncServiceType());
profile->getServiceInfo()->push_back(serviceInfo);
}
if(category_list) {
syncInfo->setSyncMode(converter.toSyncMode(converter.toString(arguments[3])));
}
- LoggerD("url: "<<syncInfo->getUrl()<<", id: "<<syncInfo->getId()<<", password: "<<syncInfo->getPassword()<<", mode: "<<syncInfo->getSyncMode());
+ LoggerD("mode: "<<syncInfo->getSyncMode());
if (SyncInfo::MANUAL_MODE==syncInfo->getSyncMode()) {
if (argumentCount>=5) {
syncProfileInfo->setServiceInfo(converter.toServiceInfoList(arguments[2]));
}
- LoggerD("profileName: "<<syncProfileInfo->getProfileName()<<", syncInfo url: "<<syncProfileInfo->getSyncInfo()->getUrl()<<", serviceInfo.length: "<<syncProfileInfo->getServiceInfo()->size());
+ LoggerD("profileName: "<<syncProfileInfo->getProfileName()<<", serviceInfo.length: "<<syncProfileInfo->getServiceInfo()->size());
return createJSSyncProfileInfo(context, syncProfileInfo);
}
syncServiceInfo->setPassword(converter.toString(arguments[4]));
}
- LoggerD("enable: "<<syncServiceInfo->getEnable()<<", serviceType: "<<syncServiceInfo->getSyncServiceType()<<", serverDatabaseUri: "<<syncServiceInfo->getServerDatabaseUri()<<", id: "<<syncServiceInfo->getId()<<", password: "<<syncServiceInfo->getPassword());
+ LoggerD("enable: "<<syncServiceInfo->getEnable()<<", serviceType: "<<syncServiceInfo->getSyncServiceType());
return createJSSyncServiceInfo(context, syncServiceInfo);
}
}
if (!success) {
- LoggerE("Platform error %d <%s>", err, msg.c_str());
+ LOGE("Platform error %d <%s>", err, msg.c_str());
}
return msg;
ret = download_destroy(downloadId);
if (ret != DOWNLOAD_ERROR_NONE) {
- LoggerW("Platform error while destroying download handle. downloadId=" << downloadId);
+ LOGW("Platform error while destroying download handle. downloadId=%d", downloadId);
}
std::string virtualPath;
try {
virtualPath = DeviceAPI::Filesystem::Utils::toVirtualPath(NULL, fullPath);
} catch (...) {
- LoggerW("Platform error while converting fullPath.");
+ LOGW("Platform error while converting fullPath.");
virtualPath = fullPath;
}
std::string errMessage;
ret = download_get_error(downloadId, (download_error_e*)&err);
if (ret != DOWNLOAD_ERROR_NONE) {
- LoggerW("Platform error while getting download error. ");
+ LOGW("Platform error while getting download error. ");
} else {
errMessage = _get_download_error(err);
}
ret = download_destroy(downloadId);
if (ret != DOWNLOAD_ERROR_NONE) {
- LoggerW("Platform error while destroying download handle. downloadId=" << downloadId);
+ LOGW("Platform error while destroying download handle. downloadId=%d", downloadId);
}
UnknownException error(errMessage.c_str());
ret = download_destroy(downloadId);
if (ret != DOWNLOAD_ERROR_NONE) {
- LoggerW("Platform error while destroying download handle. downloadId=" << downloadId);
+ LOGW("Platform error while destroying download handle. downloadId=%d", downloadId);
}
callback->oncanceled(downloadId);
break;
}
default:
- LoggerW("State changed is ignored.");
+ LOGW("State changed is ignored.");
break;
}
} catch (const BasePlatformException &err) {
- LoggerE("download_state_changed_cb: %s", err.getMessage().c_str());
+ LOGE("download_state_changed_cb: %s", err.getMessage().c_str());
}
delete fnData;
static void download_state_changed_cb(int downloadId, download_state_e state, void *user_data)
{
- LoggerD("download_state_changed_cb, downloadId=%d, state=%d", downloadId, (int)state);
DOWNLOAD_EVENT_DATA_T *data = new DOWNLOAD_EVENT_DATA_T;
data->downloadId = downloadId;
data->state = state;
static void download_progress_cb(int downloadId, unsigned long long received, void *user_data)
{
- LoggerD("download_progress_cb, downloadId=%d, received=%ld", downloadId, received);
DOWNLOAD_EVENT_DATA_T *data = new DOWNLOAD_EVENT_DATA_T;
data->downloadId = downloadId;
data->state = DOWNLOAD_STATE_DOWNLOADING;
long DownloadManager::start(DownloadRequest *request, DownloadCallback *downloadCallback)
{
-
int ret;
int downloadId = 0;
- LoggerD("entered");
-
if (!request) {
throw TypeMismatchException("request is NULL.");
}
std::string networkType = request->getNetworkType();
std::map<std::string, std::string> httpHeader = request->getHttpHeader();
- LoggerD("url <%s>, destination <%s>, fileName <%s>", url.c_str(), destination.c_str(), fileName.c_str());
-
if (url.empty()) {
throw InvalidValuesException("Invalid DownloadRequest.url.");
}
DeviceAPI::Filesystem::IPathPtr path = DeviceAPI::Filesystem::Utils::fromVirtualPath(NULL, destination);
fullPath = path->getFullPath();
} catch (...) {
- LoggerW("Converting virtual path is failed. [%s]", destination.c_str());
+ LOGW("Converting virtual path is failed. [%s]", destination.c_str());
fullPath = destination;
}
- LoggerD("Converted FullPath = <%s>", fullPath.c_str());
ret = download_set_destination(downloadId, fullPath.c_str());
if (ret != DOWNLOAD_ERROR_NONE) {
throw UnknownException(("Platform error while setting destination. " + _get_download_error(ret)).c_str());
throw UnknownException(("Platform error while starting download. " + _get_download_error(ret)).c_str());
}
- LoggerD("downloadId: %d", downloadId);
-
setCallbackToMap(downloadId, downloadCallback);
return downloadId;
{
int ret;
- LoggerD("entered. downloadId = %d", downloadId);
-
ret = download_cancel(downloadId);
if (ret != DOWNLOAD_ERROR_NONE) {
if (ret == DOWNLOAD_ERROR_ID_NOT_FOUND) {
{
int ret;
- LoggerD("entered. downloadId = %d", downloadId);
-
ret = download_pause(downloadId);
if (ret != DOWNLOAD_ERROR_NONE) {
if (ret == DOWNLOAD_ERROR_ID_NOT_FOUND) {
{
int ret;
- LoggerD("entered. downloadId = %d", downloadId);
-
ret = download_start(downloadId);
if (ret != DOWNLOAD_ERROR_NONE) {
if (ret == DOWNLOAD_ERROR_ID_NOT_FOUND) {
download_state_e state;
std::string result;
- LoggerD("entered. downloadId = %d", downloadId);
-
ret = download_get_state(downloadId, &state);
if (ret != DOWNLOAD_ERROR_NONE) {
if (ret == DOWNLOAD_ERROR_ID_NOT_FOUND) {
break;
default:
result = "undefined";
- LoggerW("Unknown DownloadState was returned.");
+ LOGW("Unknown DownloadState was returned.");
break;
}
char *fieldValue = NULL;
int fieldLength = 0;
- LoggerD("entered. downloadId = %d", downloadId);
-
ret = download_get_url(downloadId, &url);
if (ret != DOWNLOAD_ERROR_NONE) {
if (ret == DOWNLOAD_ERROR_ID_NOT_FOUND) {
for (i = 0; i < fieldLength; i++) {
ret = download_get_http_header_field(downloadId, fieldNames[i], &fieldValue);
if (ret != DOWNLOAD_ERROR_NONE) {
- LoggerW("Platform error while getting http header field. " << _get_download_error(ret));
+ LOGW("Platform error while getting http header field. %s", _get_download_error(ret).c_str());
}
httpHeader.insert(make_pair(std::string(fieldNames[i]), std::string(fieldValue)));
free(fieldNames[i]);
try {
virtualPath = DeviceAPI::Filesystem::Utils::toVirtualPath(NULL, destination);
} catch (...) {
- LoggerW("Platform error while converting destination path.");
+ LOGW("Platform error while converting destination path.");
virtualPath = destination;
}
request->setDestination(virtualPath);
char *mimeType = NULL;
std::string result("");
- LoggerD("entered. downloadId = %d", downloadId);
-
ret = download_get_mime_type(downloadId, &mimeType);
if (ret != DOWNLOAD_ERROR_NONE) {
if (ret == DOWNLOAD_ERROR_ID_NOT_FOUND) {
{
int ret;
- LoggerD("entered. downloadId = %d", downloadId);
-
ret = download_set_state_changed_cb(downloadId, download_state_changed_cb, this);
if (ret != DOWNLOAD_ERROR_NONE) {
if (ret == DOWNLOAD_ERROR_ID_NOT_FOUND) {
TIME_TRACER_ITEM_END(__FUNCTION__, 0);
return JSUtil::toJSValueRef(context, downloadId);
} catch (const BasePlatformException &err) {
- LoggerE(err.getName() << ": " << err.getMessage());
+ LOGE("%s : %s", err.getName().c_str(), err.getMessage().c_str());
return JSWebAPIException::throwException(context, exception, err);
} catch (...) {
DeviceAPI::Common::UnknownException err("Unknown Error in tizen.download.start().");
- LoggerE(err.getName() << ": " << err.getMessage());
+ LOGE("%s : %s", err.getName().c_str(), err.getMessage().c_str());
return JSWebAPIException::throwException(context, exception, err);
}
}
TIME_TRACER_ITEM_END(__FUNCTION__, 0);
return JSValueMakeUndefined(context);
} catch (const BasePlatformException &err) {
- LoggerE(err.getName() << ": " << err.getMessage());
+ LOGE("%s : %s", err.getName().c_str(), err.getMessage().c_str());
return JSWebAPIException::throwException(context, exception, err);
} catch (...) {
DeviceAPI::Common::UnknownException err("Unknown Error in tizen.download.setListener().");
- LoggerE(err.getName() << ": " << err.getMessage());
+ LOGE("%s : %s", err.getName().c_str(), err.getMessage().c_str());
return JSWebAPIException::throwException(context, exception, err);
}
}
TIME_TRACER_ITEM_END(__FUNCTION__, 0);
return JSValueMakeUndefined(context);
} catch (const BasePlatformException &err) {
- LoggerE(err.getName() << ": " << err.getMessage());
+ LOGE("%s : %s", err.getName().c_str(), err.getMessage().c_str());
return JSWebAPIException::throwException(context, exception, err);
} catch (...) {
DeviceAPI::Common::UnknownException err("Unknown Error in tizen.download.cancel().");
- LoggerE(err.getName() << ": " << err.getMessage());
+ LOGE("%s : %s", err.getName().c_str(), err.getMessage().c_str());
return JSWebAPIException::throwException(context, exception, err);
}
}
TIME_TRACER_ITEM_END(__FUNCTION__, 0);
return JSValueMakeUndefined(context);
} catch (const BasePlatformException &err) {
- LoggerE(err.getName() << ": " << err.getMessage());
+ LOGE("%s : %s", err.getName().c_str(), err.getMessage().c_str());
return JSWebAPIException::throwException(context, exception, err);
} catch (...) {
DeviceAPI::Common::UnknownException err("Unknown Error in tizen.download.pause().");
- LoggerE(err.getName() << ": " << err.getMessage());
+ LOGE("%s : %s", err.getName().c_str(), err.getMessage().c_str());
return JSWebAPIException::throwException(context, exception, err);
}
}
TIME_TRACER_ITEM_END(__FUNCTION__, 0);
return JSValueMakeUndefined(context);
} catch (const BasePlatformException &err) {
- LoggerE(err.getName() << ": " << err.getMessage());
+ LOGE("%s : %s", err.getName().c_str(), err.getMessage().c_str());
return JSWebAPIException::throwException(context, exception, err);
} catch (...) {
DeviceAPI::Common::UnknownException err("Unknown Error in tizen.download.resume().");
- LoggerE(err.getName() << ": " << err.getMessage());
+ LOGE("%s : %s", err.getName().c_str(), err.getMessage().c_str());
return JSWebAPIException::throwException(context, exception, err);
}
}
TIME_TRACER_ITEM_END(__FUNCTION__, 0);
return JSUtil::toJSValueRef(context, ret);
} catch (const BasePlatformException &err) {
- LoggerE(err.getName() << ": " << err.getMessage());
+ LOGE("%s : %s", err.getName().c_str(), err.getMessage().c_str());
return JSWebAPIException::throwException(context, exception, err);
} catch (...) {
DeviceAPI::Common::UnknownException err("Unknown Error in tizen.download.resume().");
- LoggerE(err.getName() << ": " << err.getMessage());
+ LOGE("%s : %s", err.getName().c_str(), err.getMessage().c_str());
return JSWebAPIException::throwException(context, exception, err);
}
}
TIME_TRACER_ITEM_END(__FUNCTION__, 0);
return obj;
} catch (const BasePlatformException &err) {
- LoggerE(err.getName() << ": " << err.getMessage());
+ LOGE("%s : %s", err.getName().c_str(), err.getMessage().c_str());
return JSWebAPIException::throwException(context, exception, err);
} catch (...) {
DeviceAPI::Common::UnknownException err("Unknown Error in tizen.download.resume().");
- LoggerE(err.getName() << ": " << err.getMessage());
+ LOGE("%s : %s", err.getName().c_str(), err.getMessage().c_str());
return JSWebAPIException::throwException(context, exception, err);
}
}
TIME_TRACER_ITEM_END(__FUNCTION__, 0);
return JSUtil::toJSValueRef(context, ret);
} catch (const BasePlatformException &err) {
- LoggerE(err.getName() << ": " << err.getMessage());
+ LOGE("%s : %s", err.getName().c_str(), err.getMessage().c_str());
return JSWebAPIException::throwException(context, exception, err);
} catch (...) {
DeviceAPI::Common::UnknownException err("Unknown Error in tizen.download.resume().");
- LoggerE(err.getName() << ": " << err.getMessage());
+ LOGE("%s : %s", err.getName().c_str(), err.getMessage().c_str());
return JSWebAPIException::throwException(context, exception, err);
}
}
bool JSDownloadRequest::setProperty(JSContextRef context, JSObjectRef object,
JSStringRef propertyName, JSValueRef value, JSValueRef* exception)
{
- if (JSStringIsEqualToUTF8CString(propertyName, "networkType")) {
- if (JSUtil::JSValueToString(context, value).compare("CELLULAR") &&
- JSUtil::JSValueToString(context, value).compare("WIFI") &&
- JSUtil::JSValueToString(context, value).compare("ALL"))
- {
- return true;
+ try {
+ // check url
+ if (JSStringIsEqualToUTF8CString(propertyName, TIZEN_DOWNLOAD_REQUEST_URL)) {
+ JSUtil::JSValueToString(context, value);
+ }
+
+ // check destination
+ if (JSStringIsEqualToUTF8CString(propertyName, TIZEN_DOWNLOAD_REQUEST_DESTINATION)) {
+ JSUtil::JSValueToString(context, value);
+ }
+
+ // check fileName
+ if (JSStringIsEqualToUTF8CString(propertyName, TIZEN_DOWNLOAD_REQUEST_FILE_NAME)) {
+ JSUtil::JSValueToString(context, value);
+ }
+
+ // check networkType
+ if (JSStringIsEqualToUTF8CString(propertyName, TIZEN_DOWNLOAD_REQUEST_NETWORK_TYPE)) {
+ if (!JSValueIsNull(context, value)) {
+ std::string networkType = JSUtil::JSValueToString(context, value);
+ if (networkType != "CELLULAR" && networkType != "WIFI" && networkType != "ALL")
+ {
+ throw TypeMismatchException("Invalid networkType");
+ }
+ }
+ }
+
+ // check httpHeader
+ if (JSStringIsEqualToUTF8CString(propertyName, TIZEN_DOWNLOAD_REQUEST_HTTP_HEADER)) {
+ if (!JSValueIsNull(context, value)) {
+ if (!JSValueIsObject(context, value)) {
+ throw TypeMismatchException("Value is not Object");
+ }
+ JSUtil::JSValueToObject(context, value);
+ }
}
+ } catch (const BasePlatformException &err) {
+ LOGE("%s : %s", err.getName().c_str(), err.getMessage().c_str());
+ return true;
}
+
return false;
}
try {
priv->setUrl(validator.toString(0, true, ""));
} catch (const BasePlatformException& err) {
- LoggerW("url convertion is failed. %s", err.getMessage().c_str());
+ LOGW("url convertion is failed. %s", err.getMessage().c_str());
}
try {
priv->setDestination(validator.toString(1, true, ""));
} catch (const BasePlatformException& err) {
- LoggerW("destination convertion is failed. %s", err.getMessage().c_str());
+ LOGW("destination convertion is failed. %s", err.getMessage().c_str());
}
try {
priv->setFileName(validator.toString(2, true, ""));
} catch (const BasePlatformException& err) {
- LoggerW("fileName convertion is failed. %s", err.getMessage().c_str());
+ LOGW("fileName convertion is failed. %s", err.getMessage().c_str());
}
try {
}
priv->setNetworkType(networkType);
} catch (const BasePlatformException& err) {
- LoggerW("networkType convertion is failed. %s", err.getMessage().c_str());
+ LOGW("networkType convertion is failed. %s", err.getMessage().c_str());
}
try {
priv->setHttpHeader(validator.toStringMap(4, true));
} catch (const BasePlatformException& err) {
- LoggerW("httpHeader convertion is failed. %s", err.getMessage().c_str());
+ LOGW("httpHeader convertion is failed. %s", err.getMessage().c_str());
}
setPrivateObject(context, obj, priv);
// networkType
JSValueRef networkType = JSUtil::getProperty(context, object, TIZEN_DOWNLOAD_REQUEST_NETWORK_TYPE);
- priv->setNetworkType(JSUtil::JSValueToString(context, networkType));
+ if (JSValueIsNull(context, networkType)) {
+ priv->setNetworkType("ALL");
+ } else {
+ priv->setNetworkType(JSUtil::JSValueToString(context, networkType));
+ }
// httpHeader
JSValueRef httpHeader = JSUtil::getProperty(context, object, TIZEN_DOWNLOAD_REQUEST_HTTP_HEADER);
- priv->setHttpHeader(JSUtil::JSValueToStringMap(context, httpHeader));
+ if (JSValueIsNull(context, httpHeader)) {
+ priv->setHttpHeader(std::map<std::string, std::string>());
+ } else {
+ priv->setHttpHeader(JSUtil::JSValueToStringMap(context, httpHeader));
+ }
return priv;
}
void on_widget_start_callback(int widgetId)
{
- LoggerD("[Tizen\\Download] on_widget_start_callback (%d)", widgetId);
+ LOGD("[Tizen\\Download] on_widget_start_callback (%d)", widgetId);
TIME_TRACER_INIT();
try {
WrtAccessSingleton::Instance().initialize(widgetId);
} catch (...) {
- LoggerE("WrtAccess initialization failed");
+ LOGE("WrtAccess initialization failed");
}
}
void on_widget_stop_callback(int widgetId)
{
- LoggerD("[Tizen\\Download] on_widget_stop_callback (%d)", widgetId);
+ LOGD("[Tizen\\Download] on_widget_stop_callback (%d)", widgetId);
TIME_TRACER_EXPORT_REPORT_TO(TIME_TRACER_EXPORT_FILE,"Download");
TIME_TRACER_RELEASE();
try {
WrtAccessSingleton::Instance().deinitialize(widgetId);
} catch (...) {
- LoggerE("WrtAccess deinitialization failed");
+ LOGE("WrtAccess deinitialization failed");
}
}
void on_frame_load_callback(const void * context)
{
- LoggerD("[Tizen\\Download] on_frame_load_callback (%p)", context);
+ LOGD("[Tizen\\Download] on_frame_load_callback (%p)", context);
GlobalContextManager::getInstance()->addGlobalContext(static_cast<JSContextRef>(context));
}
void on_frame_unload_callback(const void * context)
{
- LoggerD("[Tizen\\Download] on_frame_unload_callback (%p)", context);
+ LOGD("[Tizen\\Download] on_frame_unload_callback (%p)", context);
GlobalContextManager::getInstance()->removeGlobalContext(static_cast<JSContextRef>(context));
}
#include <GlobalContextManager.h>
#include <PlatformException.h>
#include <JSWebAPIError.h>
+#include <JSWebAPIException.h>
#include <JSUtil.h>
#include <ArgumentValidator.h>
// ====
LoggerI("Main setProperty()");
int index = 0;
// for non-NULL property names
- while(m_property[index].name != NULL) {
- // if property name matches
- if(JSStringIsEqualToUTF8CString(propertyName,m_property[index].name)) {
- if(m_property[index].setProperty != NULL) {
- // if setProperty() function exists - call it
- return m_property[index].setProperty(context, object, propertyName, value, exception);
- } else {
- // otherwise return true (lack of function - readonly attribute)
- return true;
+ try{
+ while(m_property[index].name != NULL) {
+ // if property name matches
+ if(JSStringIsEqualToUTF8CString(propertyName,m_property[index].name)) {
+ if(m_property[index].setProperty != NULL) {
+ if (JSStringIsEqualToUTF8CString(propertyName, MESSAGE_ATTRIBUTE_TO)){
+ if (JSValueIsNull(context, value))
+ {
+ throw TypeMismatchException("Value is null");
+ }
+ JSUtil::JSArrayToStringVector(context, value);
+ }
+ if (JSStringIsEqualToUTF8CString(propertyName, MESSAGE_ATTRIBUTE_CC)){
+ if (JSValueIsNull(context, value))
+ {
+ throw TypeMismatchException("Value is null");
+ }
+ JSUtil::JSArrayToStringVector(context, value);
+ }
+ if (JSStringIsEqualToUTF8CString(propertyName, MESSAGE_ATTRIBUTE_BCC)){
+ if (JSValueIsNull(context, value))
+ {
+ throw TypeMismatchException("Value is null");
+ }
+ JSUtil::JSArrayToStringVector(context, value);
+ }
+ if (JSStringIsEqualToUTF8CString(propertyName, MESSAGE_ATTRIBUTE_BODY)){
+ if (!JSValueIsNull(context, value)) {
+ if (!JSValueIsObject(context, value)) {
+ throw TypeMismatchException("Value is not Object");
+ }
+ JSUtil::JSValueToObject(context, value);
+ }
+ }
+ if (JSStringIsEqualToUTF8CString(propertyName, MESSAGE_ATTRIBUTE_IS_READ)){
+ JSUtil::JSValueToBoolean(context, value);
+ }
+ if (JSStringIsEqualToUTF8CString(propertyName, MESSAGE_ATTRIBUTE_IS_HIGH_PRIORITY)){
+ JSUtil::JSValueToBoolean(context, value);
+ }
+ if (JSStringIsEqualToUTF8CString(propertyName, MESSAGE_ATTRIBUTE_SUBJECT)){
+ JSUtil::JSValueToString(context, value);
+ }
+ if (JSStringIsEqualToUTF8CString(propertyName, MESSAGE_ATTRIBUTE_ATTACHMENTS)){
+ if (!JSValueIsNull(context, value)) {
+ if (!JSValueIsObject(context, value)) {
+ throw TypeMismatchException("Value is not Object");
+ }
+ JSUtil::JSValueToObject(context, value);
+ }
+ }
+ // if setProperty() function exists - call it
+ return m_property[index].setProperty(context, object, propertyName, value, exception);
+ } else {
+ // otherwise return true (lack of function - readonly attribute)
+ return true;
+ }
}
+ index++;
}
- index++;
+ } catch (const BasePlatformException &err) {
+ LoggerW(err.getName() << ": " << err.getMessage());
+ return true;
}
return false;
}
}
catch(BasePlatformException &bex) {
LoggerE("Message creation failed: " << bex.getMessage());
- JSObjectRef error = JSWebAPIError::makeJSWebAPIError(context, bex);
+ JSObjectRef error = JSWebAPIException::makeJSWebAPIException(context, bex);
*exception = error;
- return NULL;
+ return error;
}
catch(...) {
DeviceAPI::Common::UnknownException err("UnknownError in Message constructor.");
- JSObjectRef error = JSWebAPIError::makeJSWebAPIError(context, err);
+ JSObjectRef error = JSWebAPIException::makeJSWebAPIException(context, err);
*exception = error;
- return NULL;
+ return error;
}
return NULL;
}
if (msg->getMessageType() != EMAIL)
{
LoggerD("not EMAIL type return empty string");
- return converter->toJSValueRef("");
+ return JSValueMakeNull(context);
}
IEmailPtr email = MessageFactory::convertToEmail(msg);
if (convId == msgId)
{
LoggerD("Not forwared and replied, return empty string");
- return converter->toJSValueRef("");
+ return JSValueMakeNull(context);
}
return converter->toJSValueRef(converter->convertIntToString(convId));
#include "Attachment.h"
#include <JSWebAPIError.h>
+#include <JSWebAPIException.h>
#include <ArgumentValidator.h>
#include <Logger.h>
}
}catch(BasePlatformException & e) {
LoggerE("Message creation failed: " << e.getMessage());
- JSObjectRef error = JSWebAPIError::makeJSWebAPIError(context, e);
+ JSObjectRef error = JSWebAPIException::makeJSWebAPIException(context, e);
*exception = error;
+ return error;
}
catch(...) {
DeviceAPI::Common::UnknownException err("UnknownError in Message constructor.");
- JSObjectRef error = JSWebAPIError::makeJSWebAPIError(context, err);
+ JSObjectRef error = JSWebAPIException::makeJSWebAPIException(context, err);
*exception = error;
+ return error;
}
return NULL;
}
ConverterMessageFactory::ConverterType converter = ConverterMessageFactory::getConverter(context);
-
- switch(multiCallbacks->getFunctionIndex())
+ Try
{
- case MESSAGES_MULTI_FUNCTION:
+ switch(multiCallbacks->getFunctionIndex())
{
+ case MESSAGES_MULTI_FUNCTION:
+ {
- DeviceAPI::Tizen::FilterPtr filter = multiCallbacks->getFilter();
- IMessagePtr msg = event->getMessage();
+ DeviceAPI::Tizen::FilterPtr filter = multiCallbacks->getFilter();
+ IMessagePtr msg = event->getMessage();
- if(filter != NULL && msg->getMessageType() != EMPTY_MESSAGE)
- {
- LoggerD("Filter exist");
- StorageChangesMessageGeneratorPtr queryGenerator(new StorageChangesMessageGenerator(event->getMessage(), event->getConversation()));
-
- DeviceAPI::Tizen::IFilterVisitorPtr filterVisitor = DPL::StaticPointerCast<DeviceAPI::Tizen::IFilterVisitor>(queryGenerator);
- filter->travel(filterVisitor, 0);
- std::vector<IMessagePtr> msgs; // for msg
-// IMessagePtr msg = event->getMessage();
- if(queryGenerator->getCompareResult())
+ if(filter != NULL && msg->getMessageType() != EMPTY_MESSAGE)
{
- LoggerD("Message call back");
- msgs.push_back(msg);
- jsMsg = converter->toJSValueRef(msgs, this);
+ LoggerD("Filter exist");
+ StorageChangesMessageGeneratorPtr queryGenerator(new StorageChangesMessageGenerator(event->getMessage(), event->getConversation()));
+
+ DeviceAPI::Tizen::IFilterVisitorPtr filterVisitor = DPL::StaticPointerCast<DeviceAPI::Tizen::IFilterVisitor>(queryGenerator);
+ filter->travel(filterVisitor, 0);
+ std::vector<IMessagePtr> msgs; // for msg
+ // IMessagePtr msg = event->getMessage();
+ if(queryGenerator->getCompareResult())
+ {
+ LoggerD("Message call back");
+ msgs.push_back(msg);
+ jsMsg = converter->toJSValueRef(msgs, this);
+ }
+ else
+ {
+ LoggerD("skip");
+ return;
+ }
}
- else
+ else
{
- LoggerD("skip");
- return;
+ LoggerD("Filter not exist or empty message");
+ std::vector<IMessagePtr> msgs; // for msg
+ IMessagePtr msg = event->getMessage();
+ msgs.push_back(msg);
+ jsMsg = converter->toJSValueRef(msgs, this);
}
}
- else
+ break;
+ case CONVERSATIONS_MULTI_FUNCTION:
{
- LoggerD("Filter not exist or empty message");
- std::vector<IMessagePtr> msgs; // for msg
+ DeviceAPI::Tizen::FilterPtr filter = multiCallbacks->getFilter();
IMessagePtr msg = event->getMessage();
- msgs.push_back(msg);
- jsMsg = converter->toJSValueRef(msgs, this);
- }
- }
- break;
- case CONVERSATIONS_MULTI_FUNCTION:
- {
- DeviceAPI::Tizen::FilterPtr filter = multiCallbacks->getFilter();
- IMessagePtr msg = event->getMessage();
- if(filter != NULL && msg->getMessageType() != EMPTY_MESSAGE)
- {
- LoggerD("Filter exist");
- StorageChangesConversationGeneratorPtr queryGenerator(new StorageChangesConversationGenerator(event->getConversation()));
-
- DeviceAPI::Tizen::IFilterVisitorPtr filterVisitor = DPL::StaticPointerCast<DeviceAPI::Tizen::IFilterVisitor>(queryGenerator);
- filter->travel(filterVisitor, 0);
- std::vector<IConversationPtr> convPtrs; // for conversation
- IConversationPtr conversation = event->getConversation();
- if(queryGenerator->getCompareResult())
+ if(filter != NULL && msg->getMessageType() != EMPTY_MESSAGE)
{
- LoggerD("Message call back");
- convPtrs.push_back(conversation);
- jsMsg = converter->toJSValueRef(convPtrs);
+ LoggerD("Filter exist");
+ StorageChangesConversationGeneratorPtr queryGenerator(new StorageChangesConversationGenerator(event->getConversation()));
+
+ DeviceAPI::Tizen::IFilterVisitorPtr filterVisitor = DPL::StaticPointerCast<DeviceAPI::Tizen::IFilterVisitor>(queryGenerator);
+ filter->travel(filterVisitor, 0);
+ std::vector<IConversationPtr> convPtrs; // for conversation
+ IConversationPtr conversation = event->getConversation();
+ if(queryGenerator->getCompareResult())
+ {
+ LoggerD("Message call back");
+ convPtrs.push_back(conversation);
+ jsMsg = converter->toJSValueRef(convPtrs);
+ }
+ else
+ {
+ LoggerD("skip");
+ return;
+ }
}
- else
+ else
{
- LoggerD("skip");
- return;
- }
- }
- else
- {
- LoggerD("Filter not exist or empty conversation");
- std::vector<IConversationPtr> convPtrs; // for conversation
- IConversationPtr conversation = event->getConversation();
+ LoggerD("Filter not exist or empty conversation");
+ std::vector<IConversationPtr> convPtrs; // for conversation
+ IConversationPtr conversation = event->getConversation();
- LoggerD("Conversation call back");
+ LoggerD("Conversation call back");
- convPtrs.push_back(conversation);
- jsMsg = converter->toJSValueRef(convPtrs);
+ convPtrs.push_back(conversation);
+ jsMsg = converter->toJSValueRef(convPtrs);
+ }
}
- }
- break;
- case FOLDERS_MULTI_FUNCTION:
- {
- DeviceAPI::Tizen::FilterPtr filter = multiCallbacks->getFilter();
- if(filter != NULL)
+ break;
+ case FOLDERS_MULTI_FUNCTION:
{
- LoggerD("Filter exist");
- StorageChangesFolderGeneratorPtr queryGenerator(new StorageChangesFolderGenerator(event->getMessageFolder()));
-
- DeviceAPI::Tizen::IFilterVisitorPtr filterVisitor = DPL::StaticPointerCast<DeviceAPI::Tizen::IFilterVisitor>(queryGenerator);
- filter->travel(filterVisitor, 0);
- std::vector<IMessageFolderPtr> folderPtrs; // for messagefoldeer
- IMessageFolderPtr messagefolder = event->getMessageFolder();
- if(queryGenerator->getCompareResult())
+ DeviceAPI::Tizen::FilterPtr filter = multiCallbacks->getFilter();
+ if(filter != NULL)
{
- LoggerD("Message call back");
- folderPtrs.push_back(messagefolder);
- jsMsg = converter->toJSValueRef(folderPtrs);
+ LoggerD("Filter exist");
+ StorageChangesFolderGeneratorPtr queryGenerator(new StorageChangesFolderGenerator(event->getMessageFolder()));
+
+ DeviceAPI::Tizen::IFilterVisitorPtr filterVisitor = DPL::StaticPointerCast<DeviceAPI::Tizen::IFilterVisitor>(queryGenerator);
+ filter->travel(filterVisitor, 0);
+ std::vector<IMessageFolderPtr> folderPtrs; // for messagefoldeer
+ IMessageFolderPtr messagefolder = event->getMessageFolder();
+ if(queryGenerator->getCompareResult())
+ {
+ LoggerD("Message call back");
+ folderPtrs.push_back(messagefolder);
+ jsMsg = converter->toJSValueRef(folderPtrs);
+ }
+ else
+ {
+ LoggerD("skip");
+ return;
+ }
}
- else
+ else
{
- LoggerD("skip");
- return;
+ LoggerD("Filter not exist");
+ std::vector<IMessageFolderPtr> folderPtrs; // for messagefoldeer
+ IMessageFolderPtr messagefolder = event->getMessageFolder();
+
+ LoggerD("MessageFolder call back");
+
+ folderPtrs.push_back(messagefolder);
+ jsMsg = converter->toJSValueRef(folderPtrs);
}
}
- else
- {
- LoggerD("Filter not exist");
- std::vector<IMessageFolderPtr> folderPtrs; // for messagefoldeer
- IMessageFolderPtr messagefolder = event->getMessageFolder();
-
- LoggerD("MessageFolder call back");
-
- folderPtrs.push_back(messagefolder);
- jsMsg = converter->toJSValueRef(folderPtrs);
- }
+ break;
}
- break;
- }
- switch(event->getMsg_Event_Type())
- {
- case EventMessageReceived::MSG_ADDED:
+ switch(event->getMsg_Event_Type())
{
- if(multiCallbacks->getMessagesAdded())
+ case EventMessageReceived::MSG_ADDED:
{
- multiCallbacks->getMessagesAdded()->callOnSuccess(jsMsg);
+ if(multiCallbacks->getMessagesAdded())
+ {
+ multiCallbacks->getMessagesAdded()->callOnSuccess(jsMsg);
+ }
}
- }
- break;
- case EventMessageReceived::MSG_UPDATED:
- {
- if(multiCallbacks->getMessagesUpdated())
+ break;
+ case EventMessageReceived::MSG_UPDATED:
{
- defaultCbm = multiCallbacks->getMessagesUpdated();
- defaultCbm->callOnSuccess(jsMsg);
+ if(multiCallbacks->getMessagesUpdated())
+ {
+ defaultCbm = multiCallbacks->getMessagesUpdated();
+ defaultCbm->callOnSuccess(jsMsg);
+ }
}
- }
- break;
- case EventMessageReceived::MSG_DELETED:
- {
- if(multiCallbacks->getMessagesRemoved())
+ break;
+ case EventMessageReceived::MSG_DELETED:
{
- defaultCbm = multiCallbacks->getMessagesRemoved();
- defaultCbm->callOnSuccess(jsMsg);
+ if(multiCallbacks->getMessagesRemoved())
+ {
+ defaultCbm = multiCallbacks->getMessagesRemoved();
+ defaultCbm->callOnSuccess(jsMsg);
+ }
}
- }
- break;
- default:
- {
break;
+ default:
+ {
+ break;
+ }
+
}
-
}
+ catch(...) {
+ LoggerW("Exception: occured");
+ return;
+ }
}
long MessagingListener::addIncomingMsgCallback(const WrtDeviceApis::CommonsJavaScript::JSCallbackManagerPtr& cbManager, int funtionIndex)
Converter convert(context);
std::string result(uri);
free(uri);
- LoggerD("uri : " << result);
return convert.toJSValueRef(result);
}
LoggerD("This record is not URI Type");
NFCUtil util;
unsigned char * recordPayload = util.toCharPtr(payload);
+ int payloadSize = (payload.size() > (1<<32 -1)) ? (1<<32 -1) : payload.size();
unsigned char * typeName = util.toCharPtr(ndefRecordProperties.typeName);
+ int typeSize = (ndefRecordProperties.typeName.size() > 255) ? 255 : ndefRecordProperties.typeName.size();
unsigned char * id = util.toCharPtr(ndefRecordProperties.id);
+ int idSize = (ndefRecordProperties.id.size() > 255) ? 255 : ndefRecordProperties.id.size();
- LoggerD("typeName : " << util.byteToString(typeName, ndefRecordProperties.typeName.size()));
- int result = nfc_ndef_record_create(&handle, static_cast<nfc_record_tnf_e>(util.convertToTNF(ndefRecordProperties.tnf)), typeName, ndefRecordProperties.typeName.size(),
- id, ndefRecordProperties.id.size(), recordPayload, payload.size()) ;
+ int result = nfc_ndef_record_create(&handle, static_cast<nfc_record_tnf_e>(util.convertToTNF(ndefRecordProperties.tnf)), typeName, typeSize,
+ id, idSize, recordPayload, payloadSize) ;
if (recordPayload)
free(recordPayload);
if (typeName)
NFCUtil util;
props.tnf = getTNF();
- LoggerD("tnf : " << props.tnf);
props.typeName = getTypeName();
props.id = getID();
- LoggerD("typeName : " << util.byteToString(&props.typeName));
return props;
}
if (result != NFC_ERROR_NONE)
util.throwNFCException(result, "Can't get text of record");
- LoggerD("text : " << *text);
return true;
}
if (result != NFC_ERROR_NONE)
util.throwNFCException(result, "Can't get langcode of record");
- LoggerD("langCode : " << *langCode);
return true;
}
bool NdefRecord::getEncodeType(nfcTextEncodeUTF *encodeType) {
util.throwNFCException(result, "Can't get encode type of record");
*encodeType = _convertToNfcEncodeType(type);
- LoggerD("encodeType : " << *encodeType);
return true;
}
if (result != NFC_ERROR_NONE)
util.throwNFCException(result, "Can't get uri of record");
- LoggerD("uri : " << *uri);
return true;
}
if (result != NFC_ERROR_NONE)
util.throwNFCException(result, "Can't get mime type of record");
- LoggerD("mimeType : " << *mimeType);
return true;
}
std::vector<unsigned char> NdefRecord::getPayload() {
if (result != NFC_ERROR_NONE)
util.throwNFCException(result, "Can't get record's payload");
- LoggerD("payload : " << util.byteToString(recordbuffer, size));
return util.toVector(recordbuffer, size);
}
bundle *service_data = NULL;
service_h service = notification->getService();
+
+ LoggerI("Service :" << service << " Flag :" << notification->getLaunchFlag());
- if (service)
+ if (service && notification->getLaunchFlag())
{
if (service_to_bundle(service, &service_data)!= SERVICE_ERROR_NONE)
{
}
else
{
- if (notification->getLaunchFlag())
- {
- LoggerI("Notification Launch Flag True");
- notification_set_property(handle, 0);
- notification_set_execute_option(handle, NOTIFICATION_EXECUTE_TYPE_SINGLE_LAUNCH, NULL, NULL, service_data);
- }
- else
- {
- LoggerI("Notification Launch Flag False");
- notification_set_property(handle, NOTIFICATION_PROP_DISABLE_APP_LAUNCH);
- }
-
- //bundle_free(service_data);
+ LoggerI("Notification Launch Flag True");
+ notification_set_property(handle, 0);
+ notification_set_execute_option(handle, NOTIFICATION_EXECUTE_TYPE_SINGLE_LAUNCH, NULL, NULL, service_data);
}
}
+ else
+ {
+ LoggerI("Notification Launch Flag False");
+ notification_set_property(handle, NOTIFICATION_PROP_DISABLE_APP_LAUNCH);
+ }
//check layout.
int type = (int)notification->getNotiType();
JSValueRef JSPackageInformation::createJSObject(JSContextRef context, PackageInformation *pkgInfo)
{
- //LoggerE("createJSObject enter");
JSObjectRef jsValueRef = JSObjectMake(context, getClassRef(), static_cast<void*>(pkgInfo));
if (NULL == jsValueRef) {
LoggerE("object creation error");
void JSPackageInformation::initialize(JSContextRef context, JSObjectRef object)
{
- LoggerD(">> initialize");
}
void JSPackageInformation::finalize(JSObjectRef object)
{
- LoggerD(">> finalize");
}
bool JSPackageInformation::isObjectOfClass(JSContextRef context, JSValueRef value)
const JSValueRef arguments[],
JSValueRef* exception)
{
- LoggerD("entered");
TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0);
AceSecurityStatus status = PACKAGE_CHECK_ACCESS(PACKAGE_FUNCTION_API_INSTALL);
const JSValueRef arguments[],
JSValueRef* exception)
{
- LoggerD("entered");
TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0);
AceSecurityStatus status = PACKAGE_CHECK_ACCESS(PACKAGE_FUNCTION_API_INSTALL);
const JSValueRef arguments[],
JSValueRef* exception)
{
- LoggerD("entered");
TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0);
AceSecurityStatus status = PACKAGE_CHECK_ACCESS(PACKAGE_FUNCTION_API_GET_PACKAGES_INFO);
const JSValueRef arguments[],
JSValueRef* exception)
{
- LoggerD("entered");
TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0);
AceSecurityStatus status = PACKAGE_CHECK_ACCESS(PACKAGE_FUNCTION_API_GET_PACKAGE_INFO);
try {
ArgumentValidator validator(context, argumentCount, arguments);
string id = validator.toString(0, true);
- //LoggerD("id = " << id);
PackageInformation* pkgInfo = PackageManager::getInstance()->getPackageInfo(id);
TIME_TRACER_ITEM_END(__FUNCTION__, 0);
const JSValueRef arguments[],
JSValueRef* exception)
{
- LoggerD("entered");
TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0);
AceSecurityStatus status = PACKAGE_CHECK_ACCESS(PACKAGE_FUNCTION_API_SET_PACKAGE_INFO_EVENT_LISTENER);
const JSValueRef arguments[],
JSValueRef* exception)
{
- LoggerD("entered");
TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0);
AceSecurityStatus status = PACKAGE_CHECK_ACCESS(PACKAGE_FUNCTION_API_UNSET_PACKAGE_INFO_EVENT_LISTENER);
const JSValueRef arguments[],
JSValueRef* exception)
{
- LoggerD("entered");
//AceSecurityStatus status = PACKAGE_CHECK_ACCESS(PACKAGE_FUNCTION_API_MOVE);
//TIZEN_SYNC_ACCESS_HANDLER(status, context, exception);
PackageManager::getInstance()->move(id, storage, pkgInstallEventCB);
} Catch (NotFoundException) {
- LoggerW("Exception: "<<_rethrown_exception.GetMessage());
+ LoggerE("Exception: "<<_rethrown_exception.GetMessage());
return JSTizenExceptionFactory::postException(context, exception, JSTizenException::NOT_FOUND_ERROR, _rethrown_exception.GetMessage());
} Catch (ConversionException) {
- LoggerW("Exception: "<<_rethrown_exception.GetMessage());
+ LoggerE("Exception: "<<_rethrown_exception.GetMessage());
return JSTizenExceptionFactory::postException(context, exception, JSTizenException::TYPE_MISMATCH_ERROR, _rethrown_exception.GetMessage());
} Catch (Exception) {
- LoggerW("Exception: "<<_rethrown_exception.GetMessage());
+ LoggerE("Exception: "<<_rethrown_exception.GetMessage());
return JSTizenExceptionFactory::postException(context, exception, JSTizenException::UNKNOWN_ERROR, _rethrown_exception.GetMessage());
}
const JSValueRef arguments[],
JSValueRef* exception)
{
- LoggerD("entered");
-
//AceSecurityStatus status = PACKAGE_CHECK_ACCESS(PACKAGE_FUNCTION_API_IS_INSTALLED);
//TIZEN_SYNC_ACCESS_HANDLER(status, context, exception);
return converter.toJSValueRef(PackageManager::getInstance()->isInstalled(id));
} Catch (NotFoundException) {
- LoggerW("Exception: "<<_rethrown_exception.GetMessage());
+ LoggerE("Exception: "<<_rethrown_exception.GetMessage());
return JSTizenExceptionFactory::postException(context, exception, JSTizenException::NOT_FOUND_ERROR, _rethrown_exception.GetMessage());
} Catch (ConversionException) {
- LoggerW("Exception: "<<_rethrown_exception.GetMessage());
+ LoggerE("Exception: "<<_rethrown_exception.GetMessage());
return JSTizenExceptionFactory::postException(context, exception, JSTizenException::TYPE_MISMATCH_ERROR, _rethrown_exception.GetMessage());
} Catch (Exception) {
- LoggerW("Exception: "<<_rethrown_exception.GetMessage());
+ LoggerE("Exception: "<<_rethrown_exception.GetMessage());
return JSTizenExceptionFactory::postException(context, exception, JSTizenException::UNKNOWN_ERROR, _rethrown_exception.GetMessage());
}
const JSValueRef arguments[],
JSValueRef* exception)
{
- LoggerD("entered");
-
//AceSecurityStatus status = PACKAGE_CHECK_ACCESS(PACKAGE_FUNCTION_API_GET_PACKAGE_ID_FROM_APP_ID);
//TIZEN_SYNC_ACCESS_HANDLER(status, context, exception);
return converter.toJSValueRef(PackageManager::getInstance()->getPackageIdFromAppId(id));
} Catch (NotFoundException) {
- LoggerW("Exception: "<<_rethrown_exception.GetMessage());
+ LoggerE("Exception: "<<_rethrown_exception.GetMessage());
return JSTizenExceptionFactory::postException(context, exception, JSTizenException::NOT_FOUND_ERROR, _rethrown_exception.GetMessage());
} Catch (ConversionException) {
- LoggerW("Exception: "<<_rethrown_exception.GetMessage());
+ LoggerE("Exception: "<<_rethrown_exception.GetMessage());
return JSTizenExceptionFactory::postException(context, exception, JSTizenException::TYPE_MISMATCH_ERROR, _rethrown_exception.GetMessage());
} Catch (Exception) {
- LoggerW("Exception: "<<_rethrown_exception.GetMessage());
+ LoggerE("Exception: "<<_rethrown_exception.GetMessage());
return JSTizenExceptionFactory::postException(context, exception, JSTizenException::UNKNOWN_ERROR, _rethrown_exception.GetMessage());
}
PackageInstallEventCallback::~PackageInstallEventCallback()
{
if (m_request_handle != NULL) {
- LoggerD("destroy client handle");
//package_manager_request_destroy(m_request_handle);
package_manager_client_destroy(m_request_handle);
}
static int get_current_pkg_id(char** pkg_id)
{
- LoggerD("get_current_pkg_id enter");
- int parent_pid = getppid();
- LoggerD("parent pid : " << parent_pid);
- char* app_id = NULL;
app_info_h handle;
- int ret = app_manager_get_app_id(parent_pid, &app_id);
- if ((ret != APP_MANAGER_ERROR_NONE) || (app_id == NULL)) {
- LoggerD("Cannot get app id from pid : " << parent_pid);
- return ret;
- } else {
- LoggerD("app_id : " << app_id);
- }
+ string appId = PackageManager::getInstance()->getCurrentAppId();
- ret = app_manager_get_app_info(app_id, &handle);
+ int ret = app_manager_get_app_info(appId.c_str(), &handle);
if (ret != APP_MANAGER_ERROR_NONE) {
- LoggerD("Fail to get appinfo by " << app_id);
+ LoggerE("Fail to get appinfo");
return ret;
}
ret = app_info_get_package(handle, pkg_id);
if ((ret != APP_MANAGER_ERROR_NONE) || (*pkg_id == NULL)) {
- LoggerD("Fail to get pkg_id by " << app_id);
+ LoggerE("Fail to get pkg_id");
return ret;
}
ret = app_info_destroy(handle);
if (ret != APP_MANAGER_ERROR_NONE) {
- LoggerD("Fail to get destory appinfo");
+ LoggerE("Fail to get destory appinfo");
return ret;
}
static bool app_callback(package_info_app_component_type_e comp_type, const char *app_id, void *user_data)
{
- //LoggerD("app_callback enter : " << app_id);
PackageInformation* pkgInfo = (PackageInformation*)user_data;
pkgInfo->m_appIds.push_back(app_id);
return true;
static PackageInformation* create_pkg_info(pkgmgrinfo_pkginfo_h handle)
{
- //LoggerD("enter");
-
PackageInformation *pkgInfo = new PackageInformation();
char* id = NULL;
ret = pkgmgrinfo_pkginfo_get_pkgid(handle, &id);
if ((ret != PMINFO_R_OK) || (id == NULL)) {
- LoggerD("Fail to get id. return NULL.");
+ LoggerE("Fail to get id. return NULL.");
delete pkgInfo;
return NULL;
} else {
ret = pkgmgrinfo_pkginfo_get_label(handle, &name);
if ((ret != PMINFO_R_OK) || (name == NULL)) {
- LoggerD("Fail to get labe");
+ LoggerE("Fail to get labe");
} else {
pkgInfo->m_name = name;
}
ret = pkgmgrinfo_pkginfo_get_icon(handle, &iconPath);
if ((ret != PMINFO_R_OK) || (iconPath == NULL)) {
- LoggerD("Fail to get iconPath");
+ LoggerE("Fail to get iconPath");
} else {
pkgInfo->m_iconPath = iconPath;
}
ret = pkgmgrinfo_pkginfo_get_version(handle, &version);
if ((ret != PMINFO_R_OK) || (version == NULL)) {
- LoggerD("Fail to get version");
+ LoggerE("Fail to get version");
} else {
pkgInfo->m_version = version;
}
ret = pkgmgrinfo_pkginfo_get_total_size(handle, &totalSize);
if (ret != PMINFO_R_OK) {
- LoggerD("Fail to get totalSize");
+ LoggerE("Fail to get totalSize");
} else {
pkgInfo->m_totalSize = totalSize;
}
ret = pkgmgrinfo_pkginfo_get_data_size(handle, &dataSize);
if (ret != PMINFO_R_OK) {
- LoggerD("Fail to get dataSize");
+ LoggerE("Fail to get dataSize");
} else {
pkgInfo->m_dataSize = dataSize;
}
ret = pkgmgrinfo_pkginfo_get_installed_time(handle, &lastModified);
if (ret != PMINFO_R_OK) {
- LoggerD("Fail to get lastModified");
+ LoggerE("Fail to get lastModified");
} else {
pkgInfo->m_lastModified = lastModified;
}
ret = pkgmgrinfo_pkginfo_get_type(handle, &type);
if ((ret != PMINFO_R_OK) || (type == NULL)) {
- LoggerD("Fail to get type");
+ LoggerE("Fail to get type");
} else {
pkgInfo->m_type = type;
}
ret = pkgmgrinfo_pkginfo_get_author_name(handle, &author);
if ((ret != PMINFO_R_OK) || (author == NULL)) {
- LoggerD("Fail to get author");
+ LoggerE("Fail to get author");
} else {
pkgInfo->m_author = author;
}
ret = pkgmgrinfo_pkginfo_get_description(handle, &description);
if ((ret != PMINFO_R_OK) || (description == NULL)) {
- LoggerD("Fail to get description");
+ LoggerE("Fail to get description");
} else {
pkgInfo->m_description = description;
}
ret = package_manager_get_package_info(id, &package_info);
if (ret != PACKAGE_MANAGER_ERROR_NONE) {
- LoggerD("Cannot create package info by : " << id);
+ LoggerE("Cannot create package info");
delete pkgInfo;
return NULL;
}
ret = package_info_foreach_app_from_package(package_info, PACKAGE_INFO_ALLAPP, app_callback, (void*)pkgInfo);
if (ret != PACKAGE_MANAGER_ERROR_NONE) {
- LoggerD("failed while getting appids");
+ LoggerE("failed while getting appids");
}
ret = package_info_destroy(package_info);
if (ret != PACKAGE_MANAGER_ERROR_NONE) {
- LoggerD("Cannot destroy package info");
+ LoggerE("Cannot destroy package info");
}
// REMARK: do not destroy handle. because handle is comes from outside!!
static gboolean getCompleteCB(void *data)
{
- LoggerD("entered");
-
PackageInfoCallbackData *callback = (PackageInfoCallbackData *)data;
JSContextRef context = callback->getContext();
return false;
}
- for (std::size_t i = 0; i < pkgInfoList.size(); ++i) {
+ for (size_t i = 0; i < pkgInfoList.size(); ++i) {
JSValueRef tmpVal = JSPackageInformation::createJSObject(context, &pkgInfoList[i]);
if (!JSSetArrayElement(context, jsResult, i, tmpVal)) {
JSValueRef error = JSTizenExceptionFactory::makeErrorObject(callback->getContext(), JSTizenException::UNKNOWN_ERROR, "platform exception");
callback->callSuccessCallback(jsResult);
} else {
- LoggerD("Fail!!");
JSValueRef error = JSTizenExceptionFactory::makeErrorObject(callback->getContext(), JSTizenException::UNKNOWN_ERROR, "platform exception");
callback->callErrorCallback(error);
}
- // TODO: cleanup each packageInformation items
delete callback;
return false;
static int get_package_list_cb(pkgmgrinfo_pkginfo_h handle, void *user_data)
{
- //LoggerD("entered");
PackageInfoCallbackData *callback = (PackageInfoCallbackData *)user_data;
PackageInformation* pkgInfo = create_pkg_info(handle);
if (pkgInfo != NULL) {
static void getThreadCB(void *data, Ecore_Thread *thread)
{
- LoggerD("entered");
-
PackageInfoCallbackData *callback = (PackageInfoCallbackData *)data;
int ret = pkgmgrinfo_pkginfo_get_list(get_package_list_cb, data);
if (ret != PMINFO_R_OK) {
- LoggerD("Fail to get package info");
+ LoggerE("Fail to get package info");
callback->setExceptionCode(WrtDeviceApis::Commons::ExceptionCodes::PlatformException);
}
pkgmgrinfo_pkginfo_h handle;
int ret = pkgmgrinfo_pkginfo_get_pkginfo(package, &handle);
if (ret != PMINFO_R_OK) {
- LoggerD("fail to find pkg info with given pkg : " << package);
+ LoggerE("fail to find pkg info with given pkg");
// Do not throw exception. No one can handle exception because this code is called from async callback.
//throw NotFoundException("Can't find given package");
break;
pkgmgrinfo_appinfo_destroy_appinfo(handle);
if (pkgInfo == NULL) {
- LoggerD("Fail to get pkg info. skip callback call for pkgid " << package);
+ LoggerE("Fail to get pkg info. skip callback call");
} else {
CallbackUserData *callback = eventCB->getOnInstalled();
if (callback) {
break;
}
case APP_MANAGER_EVENT_UNINSTALLED: {
- LoggerD("uninstall : " << package);
CallbackUserData *callback = eventCB->getOnUninstalled();
if (callback) {
Converter converter(callback->getContext());
pkgmgrinfo_appinfo_destroy_appinfo(handle);
if (pkgInfo == NULL) {
- LoggerD("Fail to get pkg info. skip callback call for pkgid " << package);
+ LoggerE("Fail to get pkg info. skip callback call");
} else {
CallbackUserData *callback = eventCB->getOnUpdated();
if (callback) {
break;
}
default:
- LoggerD("Fail!! Unknown event type is entered : " << event_type);
+ LoggerE("Fail!! Unknown event type is entered : " << event_type);
break;
}
PackageInfoEventCallback * callback = (PackageInfoEventCallback *)data;
pkgmgr_client ** handler_p = callback->getEventHandler();
if (*handler_p == NULL) {
- LoggerD("handler is NULL");
+ LoggerE("handler is NULL");
return -1;
}
- LoggerD("handler is not NULL");
+ LoggerE("handler is not NULL");
}
}
package_manager_error_e error,
void *user_data)
{
- LoggerD("install_request_cb ");
PackageInstallEventCallback *callback = (PackageInstallEventCallback *)user_data;
JSContextRef context = callback->getContext();;
void PackageManager::install(string pkgPath, PackageInstallEventCallback* callback)
{
- LoggerD("install");
int ret = 0;
int id = 0;
package_manager_request_h request_h;
ret = package_manager_request_install(request_h, pkgPath.c_str(), &id);
if (ret != PACKAGE_MANAGER_ERROR_NONE) {
- LoggerD("error : " << pkgPath);
if (errCallback) {
JSValueRef error =
JSTizenExceptionFactory::makeErrorObject(globalCtx, JSTizenException::NOT_FOUND_ERROR, "Not proper file");
void PackageManager::uninstall(string pkgPath, PackageInstallEventCallback* callback)
{
- LoggerD("uninstall");
int ret = 0;
int id = 0;
package_manager_request_h request_h;
ret = package_manager_request_uninstall(request_h, pkgPath.c_str(), &id);
if (ret != PACKAGE_MANAGER_ERROR_NONE) {
- LoggerD("error : " << pkgPath);
if (errCallback) {
JSValueRef error =
JSTizenExceptionFactory::makeErrorObject(globalCtx, JSTizenException::NOT_FOUND_ERROR, "Not proper file");
int ret = get_current_pkg_id(&pkg_id);
if((ret != APP_MANAGER_ERROR_NONE) || (pkg_id == NULL)) {
- LoggerE("Can not get app id from current pid (" << ret << ")");
+ LoggerE("Can not get app id from current pid");
throw NotFoundException("Can't find given package");
}
pkgId = pkg_id;
void PackageManager::getPackagesInfo(PackageInfoCallbackData *user_data)
{
- LoggerD("entered");
-
// getting info of all package from other thread. the result callback will be called on main thread
ecore_thread_run(getThreadCB, NULL, NULL, user_data);
}
void PackageManager::setPackageInfoEventListener(PackageInfoEventCallback * eventCB)
{
- LoggerD("enter");
-
if (m_manager_handle == NULL) {
m_manager_handle = pkgmgr_client_new(PC_LISTENING);
if (m_manager_handle == NULL) {
void PackageManager::unsetPackageInfoEventListener()
{
- LoggerD("enter");
-
if (m_manager_handle == NULL) {
- LoggerD("no package manager handle registered");
+ LoggerE("no package manager handle registered");
return;
}
m_manager_handle = NULL;
}
-PackageManager* PackageManager::getInstance(){
- LoggerD("enter to getInstance()");
+PackageManager* PackageManager::getInstance()
+{
static PackageManager instance;
return &instance;
}
+void PackageManager::setCurrentAppId(string appId)
+{
+ m_curr_app_id = appId;
+}
+
+string PackageManager::getCurrentAppId() const
+{
+ return m_curr_app_id;
+}
+
PackageManager::PackageManager()
{
- LoggerD("Create PackageManager");
}
PackageManager::~PackageManager()
{
- LoggerD("Destroy PackageManager");
-
if (m_manager_handle != NULL) {
pkgmgr_client_free(m_manager_handle);
m_manager_handle = NULL;
#if 0
void PackageManager::move(string pkgPath, string target, PackageInstallEventCallback* callback)
{
- LoggerD("entered : " << pkgPath);
int ret = 0;
package_manager_move_type_e type = PACAKGE_MANAGER_REQUEST_MOVE_TO_INTERNAL;
bool PackageManager::isInstalled(string pkgId)
{
- LoggerD("pkgId = " << pkgId);
package_info_h handle;
int ret = 0;
ret = package_manager_get_package_info(pkgId.c_str(), &handle);
if (ret == PACKAGE_MANAGER_ERROR_NO_SUCH_PACKAGE) {
- LoggerE("No patched package: " << pkgId);
return false;
} else if (ret == PACKAGE_MANAGER_ERROR_NONE) {
// TODO: Should I exception handling while destory handle? what should I do for that time?
string PackageManager::getPackageIdFromAppId(string appId)
{
- LoggerD("appId = " << appId);
char *pkg_id = NULL;
string pkgId;
int ret = 0;
ret = package_manager_get_package_id_by_app_id(appId.c_str(), &pkg_id);
if (ret != PACKAGE_MANAGER_ERROR_NONE) {
- LoggerE("Error on get pkgId from appId : " << appId);
ThrowMsg(NotFoundException, "Not found pkg");
}
string getPackageIdFromAppId(string appId);
void setPackageInfoEventListener(PackageInfoEventCallback * eventCB);
void unsetPackageInfoEventListener();
+
+ // get the current application id from WRT
+ void setCurrentAppId(string appId);
+ string getCurrentAppId() const;
static PackageManager* getInstance();
PackageManager();
~PackageManager();
pkgmgr_client *m_manager_handle;
+ string m_curr_app_id;
};
// limitations under the License.
//
+#include <dpl/wrt-dao-ro/widget_dao_read_only.h>
+#include <dpl/string.h>
+
#include <Commons/plugin_initializer_def.h>
#include <Commons/WrtAccess/WrtAccess.h>
#include <GlobalContextManager.h>
#include <TimeTracer.h>
#include "JSPackageManager.h"
+#include "PackageManager.h"
#include <Logger.h>
using namespace WrtDeviceApis;
LoggerD("[Tizen2_1\\Package] on_widget_start_callback ("<<widgetId<<")");
TIME_TRACER_INIT();
Try {
+ WrtDB::WidgetDAOReadOnly dao(widgetId);
+ std::string tzAppId = DPL::ToUTF8String(dao.getTzAppId());
+ PackageManager::getInstance()->setCurrentAppId(tzAppId);
+
WrtAccessSingleton::Instance().initialize(widgetId);
} Catch(WrtDeviceApis::Commons::Exception) {
LoggerE("WrtAccess initialization failed");
namespace DeviceAPI {
namespace Push {
+std::string PushManager::m_appId;
+std::string PushManager::m_pkgId;
+
static std::string _get_internal_error(int err)
{
bool success = false;
}
}
-static int get_current_app_id_and_pkg_id(char **app_id, char **pkg_id)
-{
- LoggerD("get_current_pkg_id enter");
- int parent_pid = getppid();
- LoggerD("parent pid : " << parent_pid);
- char *_app_id = NULL;
- char *_pkg_id = NULL;
-
- app_info_h handle;
-
- int ret = app_manager_get_app_id(parent_pid, &_app_id);
- if ((ret != APP_MANAGER_ERROR_NONE) || (_app_id == NULL)) {
- LoggerD("Cannot get app id from pid : " << parent_pid);
- return ret;
- } else {
- LoggerD("app_id : " << _app_id);
- }
-
- ret = app_manager_get_app_info(_app_id, &handle);
- if (ret != APP_MANAGER_ERROR_NONE)
- {
- LoggerD("Fail to get appinfo by " << _app_id);
- return ret;
- }
-
- ret = app_info_get_package(handle, &_pkg_id);
- if ((ret != APP_MANAGER_ERROR_NONE) || (_pkg_id == NULL))
- {
- LoggerD("Fail to get pkg_id by " << _app_id);
- }
-
- ret = app_info_destroy(handle);
- if (ret != APP_MANAGER_ERROR_NONE)
- {
- LoggerD("Fail to get destory appinfo");
- return ret;
- }
-
- *app_id = _app_id;
- *pkg_id = _pkg_id;
-
- return ret;
-}
-
static void push_connection_state_cb(push_state_e state, const char *err, void *user_data)
{
LoggerI("Push connection state cb with state: "<< state <<", err: "<< err);
}
PushManager::PushManager():
- m_pkgId(NULL),
- m_appId(NULL),
m_connectionState(PUSH_STATE_UNREGISTERED),
m_connectionHandle(NULL)
{
LoggerI("Connecting to the push service...");
- int ret;
-
- ret = get_current_app_id_and_pkg_id(&m_appId, &m_pkgId);
- if (APP_ERROR_NONE != ret) {
- LoggerE("Error while getting app id: "<<ret);
- return;
- }
-
LoggerI("Push App id: " << m_appId);
LoggerI("Push Package id: " << m_pkgId);
- ret = push_connect(m_pkgId, push_connection_state_cb, push_notify_cb, this, &m_connectionHandle);
+ int ret = push_connect(m_pkgId.c_str(), push_connection_state_cb, push_notify_cb, this, &m_connectionHandle);
if (PUSH_ERROR_NONE!=ret) {
LoggerE("Error while connecting to the push service: "<< ret);
return;
{
LoggerI("Disconnecting to the push service...");
- if(m_appId) {
- free(m_appId);
- }
-
- if(m_pkgId) {
- free(m_pkgId);
- }
-
push_disconnect(m_connectionHandle);
}
return &instance;
}
+void PushManager::setAppId(std::string appId) {
+ app_info_h handle;
+ char *_pkg_id = NULL;
+
+ int ret = app_manager_get_app_info(appId.c_str(), &handle);
+ if (ret != APP_MANAGER_ERROR_NONE) {
+ LoggerE("WrtAccess initialization failed");
+ return;
+ }
+
+ ret = app_info_get_package(handle, &_pkg_id);
+ if ((ret != APP_MANAGER_ERROR_NONE) || (_pkg_id == NULL)) {
+ LoggerD("Fail to get pkg_id by " << appId.c_str());
+ }
+
+ ret = app_info_destroy(handle);
+ if (ret != APP_MANAGER_ERROR_NONE) {
+ LoggerE("WrtAccess initialization failed");
+ return;
+ }
+
+ m_appId = appId;
+ m_pkgId = _pkg_id;
+}
+
void PushManager::registerService(ApplicationControlPtr appControl, MultiCallbackUserDataPtr callback)
{
int ret;
}
}
- ret = service_set_app_id(service, m_appId);
+ ret = service_set_app_id(service, m_appId.c_str());
if (ret != SERVICE_ERROR_NONE) {
throw UnknownException(("Platform error while setting appId to appControl. " + _get_internal_error(ret)).c_str());
}
std::string getRegistrationId();
static PushManager* getInstance();
+ static void setAppId(std::string appId);
private:
PushManager();
MultiCallbackUserDataPtr m_notificationCallback;
private:
- char *m_appId;
- char *m_pkgId;
-
+ static std::string m_appId;
+ static std::string m_pkgId;
};
} // Push
// limitations under the License.
//
+#include <dpl/wrt-dao-ro/widget_dao_read_only.h>
+#include <dpl/string.h>
#include <Commons/plugin_initializer_def.h>
#include <Commons/WrtAccess/WrtAccess.h>
#include <GlobalContextManager.h>
#include "JSPushManager.h"
+#include "PushManager.h"
#include <TimeTracer.h>
#include <Logger.h>
LoggerD("[Tizen\\Push] on_widget_start_callback (%d)", widgetId);
TIME_TRACER_INIT();
try {
+ WrtDB::WidgetDAOReadOnly dao(widgetId);
+ PushManager::setAppId(DPL::ToUTF8String(dao.getTzAppId()));
WrtAccessSingleton::Instance().initialize(widgetId);
} catch (...) {
LoggerE("WrtAccess initialization failed");