From 699166950f4817516693be01115b6285d7e07f1c Mon Sep 17 00:00:00 2001 From: Kisub Song Date: Sat, 27 Apr 2013 20:41:48 +0900 Subject: [PATCH] Update change log and spec for wrt-plugins-tizen_0.4.25-1 [model] REDWOOD [binary_type] PDA [customer] OPEN [Issue#] N/A [Problem] plugin is crashed when launched by livebox [Cause] wrong app id is set when try to get appid with pid [Solution] get appId from WRT [Issue#] N/A [Problem] plugin is crashed when launched by livebox [Cause] wrong app id is set when try to get appid with pid [Solution] get appId from WRT [Issue#] N_SE-36221 [Problem] Force close occur in chatter when try to send messge. [Cause] EventMessageReceived exception miscatch [Solution] Catch exception on EventMessageReceived [team] WebAPI [request] N/A [horizontal_expansion] N/A Change-Id: I10e7e28fc2756b5e938d73b10f98bbd088d3954f --- debian_DEPRECATED/changelog | 1198 -------------------- debian_DEPRECATED/compat | 1 - debian_DEPRECATED/control | 18 - debian_DEPRECATED/rules | 135 --- debian_DEPRECATED/wrt-plugins-tizen.install.in | 2 - packaging/wrt-plugins-tizen.spec | 2 +- src/.project | 11 - src/Alarm/AlarmAbsolute.cpp | 1 - src/Alarm/AlarmConverter.cpp | 12 +- src/Alarm/AlarmRelative.cpp | 4 - src/Alarm/JSAlarmAbsolute.cpp | 8 +- src/Alarm/JSAlarmManager.cpp | 154 +-- src/Alarm/JSAlarmRelative.cpp | 2 +- src/Alarm/plugin_initializer.cpp | 4 +- src/Application/AppManagerWrapper.cpp | 72 +- src/Application/AppManagerWrapper.h | 5 + src/Application/Application.cpp | 10 +- src/Application/ApplicationControl.cpp | 5 +- src/Application/ApplicationControlData.cpp | 3 - src/Application/ApplicationController.cpp | 20 +- src/Application/ApplicationConverter.cpp | 6 - src/Application/ApplicationManager.cpp | 366 ++---- src/Application/ApplicationManager.h | 8 +- src/Application/JSApplication.cpp | 9 +- src/Application/JSApplicationCert.cpp | 5 +- src/Application/JSApplicationContext.cpp | 3 - src/Application/JSApplicationControl.cpp | 12 - src/Application/JSApplicationControlData.cpp | 6 - .../JSApplicationEventCallbackManager.cpp | 8 +- src/Application/JSApplicationInformation.cpp | 4 - src/Application/JSApplicationManager.cpp | 29 +- src/Application/JSRequestedApplicationControl.cpp | 25 +- src/Application/RequestedApplicationControl.cpp | 13 +- src/Application/plugin_initializer.cpp | 8 + src/Bluetooth/BluetoothAdapter.cpp | 104 +- src/Bluetooth/BluetoothCallbackUtil.cpp | 2 - src/Bluetooth/BluetoothClass.cpp | 7 - src/Bluetooth/BluetoothClassDeviceMajor.cpp | 6 - src/Bluetooth/BluetoothClassDeviceMinor.cpp | 7 - src/Bluetooth/BluetoothClassDeviceService.cpp | 8 - src/Bluetooth/BluetoothDevice.cpp | 17 - src/Bluetooth/BluetoothServiceHandler.cpp | 8 - src/Bluetooth/BluetoothSocket.cpp | 22 - src/Bluetooth/JSBluetoothAdapter.cpp | 13 - src/Bluetooth/JSBluetoothClass.cpp | 6 +- src/Bluetooth/JSBluetoothClassDeviceMajor.cpp | 2 - src/Bluetooth/JSBluetoothClassDeviceMinor.cpp | 4 +- src/Bluetooth/JSBluetoothClassDeviceService.cpp | 4 +- src/Bluetooth/JSBluetoothDevice.cpp | 2 - src/Bluetooth/JSBluetoothManager.cpp | 1 - src/Bluetooth/JSBluetoothServiceHandler.cpp | 10 +- src/Bluetooth/JSBluetoothSocket.cpp | 7 +- src/Calendar/CalendarConverter.cpp | 6 +- src/Calendar/CalendarEvent.cpp | 18 + src/Calendar/CalendarEvent.h | 5 + src/Calendar/JSCalendarItemProperties.cpp | 19 +- src/Callhistory/CallHistory.cpp | 41 +- src/Callhistory/CallHistoryFilter.cpp | 11 - src/Callhistory/Converter.cpp | 2 +- src/Callhistory/plugin_initializer.cpp | 8 +- src/Contact/ContactsSvcWrapper.cpp | 1 + src/Contact/JSContact.cpp | 2 - src/Contact/JSContactAddress.cpp | 2 - src/Contact/JSContactAnniversary.cpp | 2 - src/Contact/JSContactEmailAddress.cpp | 2 - src/Contact/JSContactGroup.cpp | 2 - src/Contact/JSContactName.cpp | 2 - src/Contact/JSContactOrganization.cpp | 2 - src/Contact/JSContactPhoneNumber.cpp | 2 - src/Contact/JSContactWebSite.cpp | 2 - src/Content/AudioLyricsUtil.cpp | 12 - src/Content/ContentAudio.cpp | 6 - src/Content/ContentAudio.h | 2 - src/Content/ContentController.cpp | 61 +- src/Content/ContentController.h | 4 +- src/Content/ContentConverter.cpp | 8 +- src/Content/ContentFilterConverter.cpp | 2 - src/Content/ContentFilterValidator.cpp | 24 +- src/Content/ContentFolder.cpp | 11 - src/Content/ContentFolder.h | 2 - src/Content/ContentImage.cpp | 15 - src/Content/ContentImage.h | 3 - src/Content/ContentListener.cpp | 3 - src/Content/ContentManager.cpp | 226 +--- src/Content/ContentMedia.cpp | 18 - src/Content/ContentMedia.h | 1 - src/Content/ContentSearchVisitor.cpp | 9 - src/Content/ContentVideo.cpp | 14 - src/Content/ContentVideo.h | 2 - src/Content/IContentManager.cpp | 250 ++-- src/Content/IEventUpdate.h | 22 +- src/Content/IEventUpdateBatch.h | 13 +- src/Content/JSAudio.cpp | 47 +- src/Content/JSAudioLyrics.cpp | 64 +- src/Content/JSContent.cpp | 107 +- src/Content/JSContentManager.cpp | 27 +- src/Content/JSFolder.cpp | 58 +- src/Content/JSImage.cpp | 93 +- src/Content/JSVideo.cpp | 143 +-- src/Content/plugin_config.cpp | 13 - src/Content/plugin_initializer.cpp | 14 +- src/DataControl/MappedDataControlConsumer.cpp | 65 +- src/DataSync/DataSyncManager.cpp | 10 +- src/DataSync/JSSyncInfo.cpp | 2 +- src/DataSync/JSSyncProfileInfo.cpp | 2 +- src/DataSync/JSSyncServiceInfo.cpp | 2 +- src/Download/DownloadManager.cpp | 48 +- src/Download/JSDownloadManager.cpp | 32 +- src/Download/JSDownloadRequest.cpp | 67 +- src/Download/plugin_initializer.cpp | 12 +- src/Messaging/JSMessage.cpp | 84 +- src/Messaging/JSMessageAttachment.cpp | 7 +- src/Messaging/MessagingListener.cpp | 238 ++-- src/NFC/JSNdefRecordURI.cpp | 1 - src/NFC/NdefRecord.cpp | 16 +- src/Notification/NotificationManager.cpp | 25 +- src/Package/JSPackageInformation.cpp | 3 - src/Package/JSPackageManager.cpp | 30 +- src/Package/PackageManager.cpp | 111 +- src/Package/PackageManager.h | 5 + src/Package/plugin_initializer.cpp | 8 + src/Push/PushManager.cpp | 94 +- src/Push/PushManager.h | 6 +- src/Push/plugin_initializer.cpp | 5 + 124 files changed, 1129 insertions(+), 3546 deletions(-) delete mode 100644 debian_DEPRECATED/changelog delete mode 100755 debian_DEPRECATED/compat delete mode 100755 debian_DEPRECATED/control delete mode 100755 debian_DEPRECATED/rules delete mode 100755 debian_DEPRECATED/wrt-plugins-tizen.install.in delete mode 100644 src/.project mode change 100644 => 100755 src/Calendar/CalendarConverter.cpp mode change 100644 => 100755 src/Calendar/CalendarEvent.cpp mode change 100644 => 100755 src/Callhistory/CallHistory.cpp mode change 100644 => 100755 src/Callhistory/CallHistoryFilter.cpp mode change 100644 => 100755 src/Callhistory/Converter.cpp mode change 100644 => 100755 src/Callhistory/plugin_initializer.cpp mode change 100644 => 100755 src/Content/AudioLyricsUtil.cpp mode change 100644 => 100755 src/Content/ContentController.cpp mode change 100644 => 100755 src/Content/ContentConverter.cpp mode change 100644 => 100755 src/Content/ContentFilterConverter.cpp mode change 100644 => 100755 src/Content/ContentFilterValidator.cpp mode change 100644 => 100755 src/Content/ContentFolder.cpp mode change 100644 => 100755 src/Content/ContentImage.cpp mode change 100644 => 100755 src/Content/ContentManager.cpp mode change 100644 => 100755 src/Content/ContentMedia.cpp mode change 100644 => 100755 src/Content/ContentSearchVisitor.cpp mode change 100644 => 100755 src/Content/ContentVideo.cpp mode change 100644 => 100755 src/Content/IContentManager.cpp mode change 100644 => 100755 src/Content/IEventUpdate.h mode change 100644 => 100755 src/Content/IEventUpdateBatch.h mode change 100644 => 100755 src/Content/JSAudio.cpp mode change 100644 => 100755 src/Content/JSAudioLyrics.cpp mode change 100644 => 100755 src/Content/JSContent.cpp mode change 100644 => 100755 src/Content/JSContentManager.cpp mode change 100644 => 100755 src/Content/JSFolder.cpp mode change 100644 => 100755 src/Content/JSImage.cpp mode change 100644 => 100755 src/Content/JSVideo.cpp mode change 100644 => 100755 src/Content/plugin_initializer.cpp mode change 100644 => 100755 src/NFC/NdefRecord.cpp mode change 100644 => 100755 src/Notification/NotificationManager.cpp diff --git a/debian_DEPRECATED/changelog b/debian_DEPRECATED/changelog deleted file mode 100644 index d7ecb7d..0000000 --- a/debian_DEPRECATED/changelog +++ /dev/null @@ -1,1198 +0,0 @@ -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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 Thu, 01 Dec 2011 14:04:56 +0900 - diff --git a/debian_DEPRECATED/compat b/debian_DEPRECATED/compat deleted file mode 100755 index 7ed6ff8..0000000 --- a/debian_DEPRECATED/compat +++ /dev/null @@ -1 +0,0 @@ -5 diff --git a/debian_DEPRECATED/control b/debian_DEPRECATED/control deleted file mode 100755 index 48af26e..0000000 --- a/debian_DEPRECATED/control +++ /dev/null @@ -1,18 +0,0 @@ -Source: wrt-plugins-tizen -Section: devel -Priority: extra -Maintainer: Taehee Lee , Sangtai Kim , Jaehyun Park , KeeDuck Kim , Kisub Song -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 , Kisub Song - -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 diff --git a/debian_DEPRECATED/rules b/debian_DEPRECATED/rules deleted file mode 100755 index 15d7a3b..0000000 --- a/debian_DEPRECATED/rules +++ /dev/null @@ -1,135 +0,0 @@ -#!/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 diff --git a/debian_DEPRECATED/wrt-plugins-tizen.install.in b/debian_DEPRECATED/wrt-plugins-tizen.install.in deleted file mode 100755 index a0c4cc5..0000000 --- a/debian_DEPRECATED/wrt-plugins-tizen.install.in +++ /dev/null @@ -1,2 +0,0 @@ -@PREFIX@/* -@CONFIG_DTD@/* diff --git a/packaging/wrt-plugins-tizen.spec b/packaging/wrt-plugins-tizen.spec index f516d34..10f1fe1 100755 --- a/packaging/wrt-plugins-tizen.spec +++ b/packaging/wrt-plugins-tizen.spec @@ -1,7 +1,7 @@ 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 diff --git a/src/.project b/src/.project deleted file mode 100644 index 71966cf..0000000 --- a/src/.project +++ /dev/null @@ -1,11 +0,0 @@ - - - wrt-plugins-tizen - - - - - - - - diff --git a/src/Alarm/AlarmAbsolute.cpp b/src/Alarm/AlarmAbsolute.cpp index 31e0aa5..8c2071a 100644 --- a/src/Alarm/AlarmAbsolute.cpp +++ b/src/Alarm/AlarmAbsolute.cpp @@ -77,7 +77,6 @@ void AlarmAbsolute::setDate(struct tm date) 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 diff --git a/src/Alarm/AlarmConverter.cpp b/src/Alarm/AlarmConverter.cpp index 3b3ad1b..53c93b4 100644 --- a/src/Alarm/AlarmConverter.cpp +++ b/src/Alarm/AlarmConverter.cpp @@ -95,7 +95,6 @@ service_h AlarmConverter::toService(std::string id) { 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()); @@ -106,8 +105,6 @@ service_h AlarmConverter::toService(std::string id, std::string page) 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; @@ -121,8 +118,6 @@ bool AlarmConverter::toAlarmAbsolutePtr(int id, service_h handle, AlarmAbsoluteP 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); @@ -155,7 +150,7 @@ bool AlarmConverter::toAlarmAbsolutePtr(int id, service_h handle, AlarmAbsoluteP result = convertFlagToDaysOfTheWeek(byDayValue); privateData->setByDayRecurrence(result); } else { - LoggerI("Can't get the recurrence week flag."); + LoggerE("Can't get the recurrence week flag."); } } @@ -213,7 +208,6 @@ int AlarmConverter::toNativeInterval(std::string freq, std::string interval) bool AlarmConverter::toAlarmService(service_h service, DeviceAPI::Application::ApplicationControlPtr appservice) { if (appservice->getOperation().compare("") != 0) { - LoggerD("operation is "<getOperation()); service_set_operation(service, appservice->getOperation().c_str() ); } else { LoggerD("Error. operation is madatory field. cannot be null"); @@ -221,22 +215,18 @@ bool AlarmConverter::toAlarmService(service_h service, DeviceAPI::Application::A } 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 "<getMime()); service_set_mime(service, appservice->getMime().c_str() ); } - LoggerD(">>> appservice->getAppControlDataArray"); std::vector appControlDataArray = appservice->getAppControlDataArray(); if (!appControlDataArray.empty()) { std::string key; const char** arr = NULL; - LoggerD("serviceDataArray.size() : "<getKey(); diff --git a/src/Alarm/AlarmRelative.cpp b/src/Alarm/AlarmRelative.cpp index ef4c741..1f2dcd7 100644 --- a/src/Alarm/AlarmRelative.cpp +++ b/src/Alarm/AlarmRelative.cpp @@ -20,7 +20,6 @@ #include "alarm_common.h" #include #include -#include namespace DeviceAPI { namespace Alarm { @@ -81,14 +80,11 @@ int AlarmRelative::getDelay() 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; } diff --git a/src/Alarm/JSAlarmAbsolute.cpp b/src/Alarm/JSAlarmAbsolute.cpp index c53342d..e5618bd 100644 --- a/src/Alarm/JSAlarmAbsolute.cpp +++ b/src/Alarm/JSAlarmAbsolute.cpp @@ -282,7 +282,7 @@ JSValueRef JSAlarmAbsolute::getDate(JSContextRef ctx, JSObjectRef result = JSObjectMakeDate(ctx, 6, args, exception); return result; } catch (...) { - LoggerW("Exception: occured"); + LoggerE("Exception: occured"); } return JSValueMakeUndefined(ctx); @@ -308,7 +308,7 @@ JSValueRef JSAlarmAbsolute::getId(JSContextRef ctx, return JSValueMakeNull(ctx); } } catch (...) { - LoggerW("Exception: occured"); + LoggerE("Exception: occured"); } return JSValueMakeUndefined(ctx); @@ -334,7 +334,7 @@ JSValueRef JSAlarmAbsolute::getInterval(JSContextRef ctx, return JSValueMakeNull(ctx); } } catch (...) { - LoggerW("Exception: occured"); + LoggerI("Exception: occured"); } return JSValueMakeUndefined(ctx); @@ -371,7 +371,7 @@ JSValueRef JSAlarmAbsolute::getDaysOfTheWeek(JSContextRef ctx, return jsResult; } catch (...) { - LoggerW("Exception: occured"); + LoggerI("Exception: occured"); } return JSValueMakeUndefined(ctx); diff --git a/src/Alarm/JSAlarmManager.cpp b/src/Alarm/JSAlarmManager.cpp index d4ae5e7..61c6b59 100644 --- a/src/Alarm/JSAlarmManager.cpp +++ b/src/Alarm/JSAlarmManager.cpp @@ -124,7 +124,6 @@ JSContextRef JSAlarmManager::gContext = NULL; void JSAlarmManager::initialize(JSContextRef ctx, JSObjectRef object) { gContext = ctx; - LoggerI("GContext = " << gContext); } void JSAlarmManager::finalize(JSObjectRef object) @@ -156,7 +155,6 @@ JSValueRef JSAlarmManager::add(JSContextRef ctx, JSObjectRef object, JSObjectRef // applicationId std::string appId = validator.toString(1); - LoggerD("appId:[" << appId << "]"); // alarm JSObjectRef alarmObj = validator.toObject(0); @@ -262,141 +260,6 @@ JSValueRef JSAlarmManager::add(JSContextRef ctx, JSObjectRef object, JSObjectRef 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(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(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) @@ -415,7 +278,6 @@ JSValueRef JSAlarmManager::remove(JSContextRef ctx, JSObjectRef object, JSObject std::stringstream(id) >> alarmId; if (alarmId <= 0) { - LoggerE("id is wrong : " << alarmId); throw InvalidValuesException("Invalid ID"); } @@ -448,7 +310,7 @@ JSValueRef JSAlarmManager::removeAll(JSContextRef ctx, JSObjectRef object, JSObj TIME_TRACER_ITEM_END("(removeAll)alarm_cancel_all", 0); if (ALARM_ERROR_NONE != returnVal) { - LoggerI("Error while removing all alarms: "<> alarmId; if (alarmId <= 0) { - LoggerE("id is wrong : " << alarmId); + LoggerE("Wrong Alarm ID"); throw InvalidValuesException("Invalid ID"); } @@ -536,10 +398,10 @@ JSValueRef JSAlarmManager::getAll(JSContextRef ctx, JSObjectRef object, JSObject 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: "<applist.size(); i++) { @@ -161,7 +172,7 @@ void AppManagerWrapper::appListChangedCallback(app_manger_event_type_e event_typ 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; } } @@ -174,8 +185,6 @@ void AppManagerWrapper::appListChangedCallback(app_manger_event_type_e event_typ void AppManagerWrapper::appListAppInstalled(const char *appId) { - LoggerD("app installed : " << appId); - AppListChangedCallbacksSet::iterator iter = m_callbacks.begin(); for(; iter != m_callbacks.end(); iter++) { @@ -185,8 +194,6 @@ void AppManagerWrapper::appListAppInstalled(const char *appId) void AppManagerWrapper::appListAppUninstalled(const char *appId) { - LoggerD("app uninstalled : " << appId); - AppListChangedCallbacksSet::iterator iter = m_callbacks.begin(); for(; iter != m_callbacks.end(); iter++) { @@ -196,8 +203,6 @@ void AppManagerWrapper::appListAppUninstalled(const char *appId) void AppManagerWrapper::appListAppUpdated(const char *appId) { - LoggerD("app updated : " << appId); - AppListChangedCallbacksSet::iterator iter = m_callbacks.begin(); for(; iter != m_callbacks.end(); iter++) { @@ -206,7 +211,6 @@ void AppManagerWrapper::appListAppUpdated(const char *appId) } - 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; @@ -221,17 +225,17 @@ int AppManagerWrapper::app_list_changed_cb_broker(int id, const char *type, cons 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")) { @@ -253,7 +257,7 @@ int AppManagerWrapper::app_list_changed_cb_broker(int id, const char *type, cons void AppManagerWrapper::registerAppListChangedCallbacks() { if (m_manager_handle != NULL) { - LoggerW("Callback already registered."); + LoggerW("Callback is already registered."); return; } @@ -268,7 +272,7 @@ void AppManagerWrapper::registerAppListChangedCallbacks() void AppManagerWrapper::unregisterAppListChangedCallbacks() { if (m_manager_handle == NULL) { - LoggerW("No callback registered"); + LoggerE("No callback is registered"); return; } @@ -286,12 +290,10 @@ bool AppManagerWrapper::initializeAppInfo(ApplicationInformationPtr &appInfo) 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 @@ -303,37 +305,37 @@ bool AppManagerWrapper::initializeAppInfo(ApplicationInformationPtr &appInfo) 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 @@ -344,22 +346,24 @@ bool AppManagerWrapper::initializeAppInfo(ApplicationInformationPtr &appInfo) 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); } diff --git a/src/Application/AppManagerWrapper.h b/src/Application/AppManagerWrapper.h index d5644eb..2feb9f6 100644 --- a/src/Application/AppManagerWrapper.h +++ b/src/Application/AppManagerWrapper.h @@ -68,6 +68,10 @@ public: 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); @@ -85,6 +89,7 @@ private: AppListChangedCallbacksSet m_callbacks; pkgmgr_client *m_manager_handle; long m_watchIdAcc; + std::string m_curr_app_id; public: std::vector applist; diff --git a/src/Application/Application.cpp b/src/Application/Application.cpp index 48b480a..4c9f479 100644 --- a/src/Application/Application.cpp +++ b/src/Application/Application.cpp @@ -64,14 +64,11 @@ void Application::setAppInfo(ApplicationInformationPtr& appInfo) 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; @@ -93,7 +90,6 @@ void Application::getRequestedAppControl(const EventApplicationGetRequestedAppCo ret = service_get_operation(service, &tmpStr); if(ret == SERVICE_ERROR_NONE && tmpStr != NULL) { - LoggerD(" operation : " << tmpStr); appControl->setOperation(tmpStr); free(tmpStr); tmpStr = NULL; @@ -102,7 +98,6 @@ void Application::getRequestedAppControl(const EventApplicationGetRequestedAppCo ret = service_get_uri(service, &tmpStr); if(ret == SERVICE_ERROR_NONE && tmpStr != NULL) { - LoggerD(" uri : " << tmpStr); appControl->setUri(tmpStr); free(tmpStr); tmpStr = NULL; @@ -111,7 +106,6 @@ void Application::getRequestedAppControl(const EventApplicationGetRequestedAppCo ret = service_get_mime(service, &tmpStr); if(ret == SERVICE_ERROR_NONE && tmpStr != NULL) { - LoggerD(" mime : " << tmpStr); appControl->setMime(tmpStr); free(tmpStr); tmpStr = NULL; @@ -120,7 +114,6 @@ void Application::getRequestedAppControl(const EventApplicationGetRequestedAppCo ret = service_get_category(service, &tmpStr); if(ret == SERVICE_ERROR_NONE && tmpStr != NULL) { - LoggerD(" category : " << tmpStr); appControl->setCategory(tmpStr); free(tmpStr); tmpStr = NULL; @@ -145,12 +138,11 @@ void Application::getRequestedAppControl(const EventApplicationGetRequestedAppCo 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); diff --git a/src/Application/ApplicationControl.cpp b/src/Application/ApplicationControl.cpp index c652575..23ca359 100644 --- a/src/Application/ApplicationControl.cpp +++ b/src/Application/ApplicationControl.cpp @@ -31,7 +31,6 @@ namespace Application { ApplicationControl::ApplicationControl() : m_appControl(NULL) { - LoggerD("entered"); } ApplicationControl::ApplicationControl(const std::string &op, const std::string &uri, @@ -39,7 +38,6 @@ ApplicationControl::ApplicationControl(const std::string &op, const std::string std::vector &dataArray) : m_appControl(NULL) { - LoggerD("entered"); m_operation = op; m_uri = uri; m_mime = mime; @@ -49,7 +47,6 @@ ApplicationControl::ApplicationControl(const std::string &op, const std::string ApplicationControl::~ApplicationControl() { - LoggerD("entered"); } std::string ApplicationControl::getOperation() const @@ -143,7 +140,7 @@ void ApplicationControl::replyResult(std::vector &app 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); diff --git a/src/Application/ApplicationControlData.cpp b/src/Application/ApplicationControlData.cpp index e51c9fb..6ed7ae3 100644 --- a/src/Application/ApplicationControlData.cpp +++ b/src/Application/ApplicationControlData.cpp @@ -16,20 +16,17 @@ // #include "ApplicationControlData.h" -#include namespace DeviceAPI { namespace Application { ApplicationControlData::ApplicationControlData() { - LoggerD("entered"); } ApplicationControlData::~ApplicationControlData() { //nothing to do in destructor - LoggerD("entered"); } std::string ApplicationControlData::getKey() const diff --git a/src/Application/ApplicationController.cpp b/src/Application/ApplicationController.cpp index be82a9d..d037546 100644 --- a/src/Application/ApplicationController.cpp +++ b/src/Application/ApplicationController.cpp @@ -44,15 +44,13 @@ ApplicationController::ApplicationController(JSContextRef context, IApplicationM 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) @@ -104,7 +102,6 @@ void ApplicationController::onAnswerReceived(const EventApplicationAppInfoEventL void ApplicationAsyncAnswerHandler::launch(const EventApplicationLaunchPtr &event) { - LoggerD("entered"); JSCallbackManagerPtr callbackManager = DPL::StaticPointerCast(event->getPrivateData()); if (!callbackManager) { @@ -156,7 +153,6 @@ void ApplicationAsyncAnswerHandler::launch(const EventApplicationLaunchPtr &even void ApplicationAsyncAnswerHandler::kill(const EventApplicationKillPtr &event) { - LoggerD("entered"); JSCallbackManagerPtr callbackManager = DPL::StaticPointerCast(event->getPrivateData()); if (!callbackManager) { @@ -210,7 +206,6 @@ void ApplicationAsyncAnswerHandler::kill(const EventApplicationKillPtr &event) void ApplicationAsyncAnswerHandler::launchAppControl(const EventApplicationLaunchAppControlPtr &event) { - LoggerD("entered"); JSCallbackManagerPtr callbackManager = DPL::StaticPointerCast(event->getPrivateData()); if (!callbackManager) { @@ -261,7 +256,6 @@ void ApplicationAsyncAnswerHandler::launchAppControl(const EventApplicationLaunc void ApplicationAsyncAnswerHandler::launchAppControlReply(const EventApplicationLaunchAppControlReplyPtr &event) { - LoggerD("entered"); JSCallbackManagerPtr callbackManager = DPL::StaticPointerCast(event->getPrivateData()); if (!callbackManager) { @@ -295,8 +289,6 @@ void ApplicationAsyncAnswerHandler::launchAppControlReply(const EventApplication ApplicationConverterFactory::getConverter(gContext); JSValueRef result = converter->toJSValueRef(*appControlDataArray); - LoggerD("replyCallbackManager onsuccess"); - callbackManager->callOnSuccess(result); return; } Catch(Exception) { @@ -307,7 +299,6 @@ void ApplicationAsyncAnswerHandler::launchAppControlReply(const EventApplication void ApplicationAsyncAnswerHandler::findAppControl(const EventApplicationFindAppControlPtr &event) { - LoggerD("entered"); JSCallbackManagerPtr callbackManager = DPL::StaticPointerCast(event->getPrivateData()); if (!callbackManager) { @@ -368,7 +359,6 @@ void ApplicationAsyncAnswerHandler::findAppControl(const EventApplicationFindApp void ApplicationAsyncAnswerHandler::getAppsContext(const EventApplicationGetAppsContextPtr &event) { - LoggerD("entered"); JSCallbackManagerPtr callbackManager = DPL::StaticPointerCast(event->getPrivateData()); if (!callbackManager) { @@ -426,7 +416,6 @@ void ApplicationAsyncAnswerHandler::getAppsContext(const EventApplicationGetApps void ApplicationAsyncAnswerHandler::getAppsInfo(const EventApplicationGetAppsInfoPtr &event) { - LoggerD("entered"); JSCallbackManagerPtr callbackManager = DPL::StaticPointerCast(event->getPrivateData()); if (!callbackManager) { @@ -485,7 +474,6 @@ void ApplicationAsyncAnswerHandler::getAppsInfo(const EventApplicationGetAppsInf void ApplicationAsyncAnswerHandler::eventListener(const EventApplicationAppInfoEventListenerPtr &event) { - LoggerD("entered"); JSApplicationEventCallbackManagerPtr callbackManager = DPL::StaticPointerCast(event->getPrivateData()); if (!callbackManager) @@ -505,7 +493,7 @@ void ApplicationAsyncAnswerHandler::eventListener(const EventApplicationAppInfoE ApplicationInformationPtr appInfo = event->getAppInfo(); if(appInfo == NULL) { - LoggerE("AppInfo did not set."); + LoggerE("AppInfo is not set."); return; } JSValueRef result = converter->toJSValueRefFromApplicationInformation(appInfo); @@ -516,7 +504,7 @@ void ApplicationAsyncAnswerHandler::eventListener(const EventApplicationAppInfoE ApplicationInformationPtr appInfo = event->getAppInfo(); if(appInfo == NULL) { - LoggerE("AppInfo did not set."); + LoggerE("AppInfo is not set."); return; } JSValueRef result = converter->toJSValueRefFromApplicationInformation(appInfo); @@ -528,7 +516,7 @@ void ApplicationAsyncAnswerHandler::eventListener(const EventApplicationAppInfoE std::string appId = appInfo->getAppId(); if(appId == "") { - LoggerE("AppId did not set."); + LoggerE("AppId is not set."); return; } JSValueRef result = converter->toJSValueRef(appId); diff --git a/src/Application/ApplicationConverter.cpp b/src/Application/ApplicationConverter.cpp index 0179a64..21727cb 100644 --- a/src/Application/ApplicationConverter.cpp +++ b/src/Application/ApplicationConverter.cpp @@ -31,7 +31,6 @@ #include "JSApplicationControl.h" #include "JSRequestedApplicationControl.h" #include "JSApplicationCert.h" -#include namespace DeviceAPI { namespace Application { @@ -51,7 +50,6 @@ ApplicationConverter::~ApplicationConverter() JSValueRef ApplicationConverter::toJSValueRefFromApplication(const ApplicationPtr &arg) { - LoggerD("entered to toJSValueRefFromApplication "); if(arg == NULL) { Throw(Commons::ConversionException); } @@ -61,7 +59,6 @@ JSValueRef ApplicationConverter::toJSValueRefFromApplication(const ApplicationPt JSValueRef ApplicationConverter::toJSValueRefFromApplicationCert(const ApplicationCertPtr &arg) { - LoggerD("entered to toJSValueRefFromApplicationCert "); if(arg == NULL) { Throw(Commons::ConversionException); } @@ -251,7 +248,6 @@ ApplicationContextArrayPtr ApplicationConverter::toApplicationContextArray(const JSValueRef ApplicationConverter::toJSValueRef(const RequestedApplicationControlPtr &arg) { - LoggerD("entered to toJSValueRefFromRequestedApplicationControl" ); if(arg == NULL) { Throw(Commons::InvalidArgumentException); } @@ -270,7 +266,6 @@ RequestedApplicationControlPtr ApplicationConverter::toRequestedApplicationContr JSValueRef ApplicationConverter::toJSValueRef(const ApplicationControlPtr &arg) { - LoggerD("entered"); if(arg == NULL) { Throw(Commons::InvalidArgumentException); } @@ -288,7 +283,6 @@ ApplicationControlPtr ApplicationConverter::toApplicationControl(const JSValueRe JSValueRef ApplicationConverter::toJSValueRef(const ApplicationControlDataPtr &arg) { - LoggerD("entered"); return CommonsJavaScript::JSUtils::makeObject(m_context, JSApplicationControlData::getClassRef(), arg); } diff --git a/src/Application/ApplicationManager.cpp b/src/Application/ApplicationManager.cpp index 87e00a7..186ba0b 100644 --- a/src/Application/ApplicationManager.cpp +++ b/src/Application/ApplicationManager.cpp @@ -68,7 +68,6 @@ namespace { 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) @@ -79,7 +78,7 @@ namespace { 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; } @@ -97,21 +96,21 @@ namespace { 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; } @@ -138,14 +137,14 @@ namespace { 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; @@ -174,7 +173,6 @@ namespace { 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; @@ -227,7 +225,7 @@ namespace { certName = "DISTRIBUTOR2_SIGNER"; break; default: - LoggerD("Unknow Cert type!!!"); + LoggerE("Unknow Cert type!!!"); break; } @@ -240,30 +238,14 @@ namespace { 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; @@ -272,6 +254,7 @@ namespace { 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. @@ -287,7 +270,8 @@ namespace { 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); @@ -315,14 +299,12 @@ namespace { 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; @@ -332,40 +314,40 @@ namespace { 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); } @@ -380,12 +362,10 @@ namespace { 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 @@ -396,7 +376,6 @@ namespace { 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); @@ -409,24 +388,24 @@ namespace { { 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() : @@ -565,7 +544,6 @@ void ApplicationManager::removeAppInfoEventListener(const EventApplicationRemove void ApplicationManager::getAppCerts(const EventApplicationGetAppCertsPtr& event) { - LoggerE("ApplicationManager::getAppCerts"); if (m_initialized == false) { initialize(); } @@ -576,7 +554,6 @@ void ApplicationManager::getAppCerts(const EventApplicationGetAppCertsPtr& event void ApplicationManager::getAppSharedURI(const EventApplicationGetAppSharedURIPtr& event) { - LoggerE("ApplicationManager::getAppSharedURI"); if (m_initialized == false) { initialize(); } @@ -595,8 +572,6 @@ void ApplicationManager::invokeManualAnswerLaunchAppControl(service_h request, s if(result == SERVICE_RESULT_SUCCEEDED) { - LoggerD("SERVICE_RESULT_SUCCEEDED in serviceResultCallback"); - // create new service object to store result. ApplicationControlDataArrayPtr appControlDataArray(new ApplicationControlDataArray()); @@ -604,17 +579,14 @@ void ApplicationManager::invokeManualAnswerLaunchAppControl(service_h request, s 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 : " <setExceptionCode(Commons::ExceptionCodes::NotFoundException); } @@ -632,8 +604,6 @@ void ApplicationManager::invokeManualAnswerKill(int pid) EventApplicationKillPtr event = it->second; m_killEventMap.erase(it); - LoggerD("Calling kill success callback for pid : " << pid); - EventRequestReceiver::ManualAnswer(event); } @@ -643,13 +613,12 @@ bool ApplicationManager::service_extra_data_callback(service_h service, const ch 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; } @@ -665,12 +634,10 @@ bool ApplicationManager::service_extra_data_callback(service_h service, const ch switch(ret) { case SERVICE_ERROR_NONE: { - LoggerD("service_get_extra_data success"); std::vector 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]); @@ -692,16 +659,16 @@ bool ApplicationManager::service_extra_data_callback(service_h service, const ch 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; } } @@ -716,11 +683,10 @@ bool ApplicationManager::service_extra_data_callback(service_h service, const ch { 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 = "<setApp(m_app); @@ -765,32 +729,15 @@ void ApplicationManager::OnRequestReceived(const EventApplicationGetCurrAppPtr& 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); @@ -805,14 +752,10 @@ void ApplicationManager::OnRequestReceived(const EventApplicationGetCurrAppPtr& 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) { @@ -825,8 +768,6 @@ void ApplicationManager::OnRequestReceived(const EventApplicationGetCurrAppPtr& void ApplicationManager::OnRequestReceived(const EventApplicationLaunchPtr& event) { - LoggerD("entered"); - Try { int ret; @@ -835,15 +776,12 @@ void ApplicationManager::OnRequestReceived(const EventApplicationLaunchPtr& even 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) { @@ -862,70 +800,21 @@ void ApplicationManager::OnRequestReceived(const EventApplicationLaunchPtr& even { 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) { @@ -936,8 +825,6 @@ void ApplicationManager::OnRequestReceived(const EventApplicationLaunchPtr& even void ApplicationManager::OnRequestReceived(const EventApplicationKillPtr& event) { - LoggerD("entered"); - Try { int ret; @@ -945,18 +832,16 @@ void ApplicationManager::OnRequestReceived(const EventApplicationKillPtr& event) 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; } @@ -1019,8 +904,6 @@ void ApplicationManager::OnRequestReceived(const EventApplicationKillPtr& event) void ApplicationManager::OnRequestReceived(const EventApplicationLaunchAppControlPtr& event) { - LoggerD("entered"); - Try { int ret = 0; @@ -1029,7 +912,7 @@ void ApplicationManager::OnRequestReceived(const EventApplicationLaunchAppContro ApplicationControlPtr appControl = event->getAppControl(); if(appControl == NULL) { - LoggerE("appControl is NULL"); + LoggerE("appControl is mandatory"); event->setExceptionCode(Commons::ExceptionCodes::InvalidArgumentException); return; } @@ -1037,7 +920,7 @@ void ApplicationManager::OnRequestReceived(const EventApplicationLaunchAppContro std::string operation = appControl->getOperation(); if(operation.empty()) { - LoggerD("operation being madatory is empty"); + LoggerE("operation is madatory"); event->setExceptionCode(Commons::ExceptionCodes::InvalidArgumentException); return; } @@ -1049,8 +932,6 @@ void ApplicationManager::OnRequestReceived(const EventApplicationLaunchAppContro 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() @@ -1075,26 +956,22 @@ void ApplicationManager::OnRequestReceived(const EventApplicationLaunchAppContro } 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() ); } @@ -1102,7 +979,7 @@ void ApplicationManager::OnRequestReceived(const EventApplicationLaunchAppContro if(!appControlDataArray.empty()) { - LoggerD(" datas : " << appControlDataArray.size()); + LoggerI(" data size : " << appControlDataArray.size()); ApplicationControlDataArray::iterator iter; for(iter = appControlDataArray.begin(); iter != appControlDataArray.end(); iter++) @@ -1110,7 +987,6 @@ void ApplicationManager::OnRequestReceived(const EventApplicationLaunchAppContro ApplicationControlDataPtr appControlData = *iter; std::string key = appControlData->getKey(); - LoggerD(" key : " << key); if(key.empty()) { @@ -1126,7 +1002,6 @@ void ApplicationManager::OnRequestReceived(const EventApplicationLaunchAppContro 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. @@ -1172,23 +1047,23 @@ void ApplicationManager::OnRequestReceived(const EventApplicationLaunchAppContro 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; } @@ -1214,14 +1089,11 @@ void ApplicationManager::OnRequestReceived(const EventApplicationLaunchAppContro void ApplicationManager::OnRequestReceived(const EventApplicationLaunchAppControlReplyPtr& event) { - LoggerD("entered"); event->switchToManualAnswer(); } void ApplicationManager::OnRequestReceived(const EventApplicationFindAppControlPtr& event) { - LoggerD("entered"); - Try { ApplicationControlPtr appControl = event->getAppControl(); @@ -1235,7 +1107,7 @@ void ApplicationManager::OnRequestReceived(const EventApplicationFindAppControlP std::string operation = appControl->getOperation(); if(operation.empty()) { - LoggerD("operation being madatory is empty"); + LoggerE("operation is madatory"); event->setExceptionCode(Commons::ExceptionCodes::InvalidArgumentException); return; } @@ -1244,26 +1116,22 @@ void ApplicationManager::OnRequestReceived(const EventApplicationFindAppControlP 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() ); } @@ -1271,7 +1139,7 @@ void ApplicationManager::OnRequestReceived(const EventApplicationFindAppControlP if(!appControlDataArray.empty()) { - LoggerD(" datas : " << appControlDataArray.size()); + LoggerD(" data size : " << appControlDataArray.size()); ApplicationControlDataArray::iterator iter; for(iter = appControlDataArray.begin(); iter != appControlDataArray.end(); iter++) @@ -1279,7 +1147,6 @@ void ApplicationManager::OnRequestReceived(const EventApplicationFindAppControlP ApplicationControlDataPtr appControlData = *iter; std::string key = appControlData->getKey(); - LoggerD(" key : " << key); if(key.empty()) { @@ -1295,7 +1162,6 @@ void ApplicationManager::OnRequestReceived(const EventApplicationFindAppControlP 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. @@ -1336,8 +1202,6 @@ void ApplicationManager::OnRequestReceived(const EventApplicationFindAppControlP void ApplicationManager::OnRequestReceived(const EventApplicationGetAppsContextPtr& event) { - LoggerD("entered"); - Try { int ret = 0; @@ -1359,19 +1223,15 @@ void ApplicationManager::OnRequestReceived(const EventApplicationGetAppsContextP 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(); @@ -1381,11 +1241,10 @@ void ApplicationManager::OnRequestReceived(const EventApplicationGetAppContextPt } 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; } @@ -1433,8 +1292,6 @@ void ApplicationManager::OnRequestReceived(const EventApplicationGetAppContextPt void ApplicationManager::OnRequestReceived(const EventApplicationGetAppsInfoPtr& event) { - LoggerD("entered"); - Try { int ret = 0; @@ -1454,32 +1311,20 @@ void ApplicationManager::OnRequestReceived(const EventApplicationGetAppsInfoPtr& 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); @@ -1495,8 +1340,6 @@ void ApplicationManager::OnRequestReceived(const EventApplicationGetAppInfoPtr& void ApplicationManager::OnRequestReceived(const EventApplicationAddAppInfoEventListenerPtr& event) { - LoggerD("entered"); - Try { EventApplicationAppInfoEventListenerEmitterPtr emitter = event->getEmitter(); @@ -1526,8 +1369,6 @@ void ApplicationManager::OnRequestReceived(const EventApplicationAddAppInfoEvent void ApplicationManager::OnRequestReceived(const EventApplicationRemoveAppInfoEventListenerPtr& event) { - LoggerD("entered"); - Try { long watchId = event->getWatchId(); @@ -1564,8 +1405,6 @@ void ApplicationManager::OnRequestReceived(const EventApplicationRemoveAppInfoEv void ApplicationManager::OnRequestReceived(const EventApplicationGetAppCertsPtr& event) { - LoggerD("entered"); - Try { std::string appId = event->getAppId(); @@ -1573,31 +1412,17 @@ void ApplicationManager::OnRequestReceived(const EventApplicationGetAppCertsPtr& // 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; @@ -1618,8 +1443,6 @@ void ApplicationManager::OnRequestReceived(const EventApplicationGetAppCertsPtr& } event->setAppCerts(certArray); - - LoggerD("Finish to getting package cert info"); } Catch (WrtDeviceApis::Commons::Exception) { @@ -1634,48 +1457,33 @@ void ApplicationManager::OnRequestReceived(const EventApplicationGetAppCertsPtr& 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; @@ -1688,20 +1496,16 @@ void ApplicationManager::OnRequestReceived(const EventApplicationGetAppSharedURI 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); @@ -1711,19 +1515,17 @@ void ApplicationManager::OnRequestReceived(const EventApplicationGetAppSharedURI 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); @@ -1731,8 +1533,6 @@ void ApplicationManager::onAppManagerEventInstalled(const char *appId) void ApplicationManager::onAppManagerEventUninstalled(const char *appId) { - LoggerD("APP_MANAGER_EVENT_UNINSTALLED, appId : "<< appId); - EventApplicationAppInfoEventListenerPtr event(new EventApplicationAppInfoEventListener()); ApplicationInformationPtr appInfo(new ApplicationInformation(appId)); @@ -1744,19 +1544,17 @@ void ApplicationManager::onAppManagerEventUninstalled(const char *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); diff --git a/src/Application/ApplicationManager.h b/src/Application/ApplicationManager.h index ccfea50..65c080c 100644 --- a/src/Application/ApplicationManager.h +++ b/src/Application/ApplicationManager.h @@ -186,7 +186,7 @@ public: DataPtrType dataPtr = getData(*keySetIter); if(dataPtr == NULL) { - LoggerW("No data for " << *keySetIter); + LoggerD("No data for " << *keySetIter); break; } @@ -213,7 +213,7 @@ public: typename KeyMapType::iterator keyMapIter = m_keyMap.find(key); if(keyMapIter == m_keyMap.end()) { - LoggerW("No data for Key"); + LoggerD("No data for Key"); return; } @@ -221,7 +221,7 @@ public: DataKeySetType::iterator keySetIter = keySet.find(dataKey); if(keySetIter == keySet.end()) { - LoggerW("No data for " << dataKey); + LoggerD("No data for " << dataKey); return; } @@ -244,7 +244,7 @@ public: typename DataMapType::iterator dataKeyIter = m_dataMap.find(*keySetIter); if(dataKeyIter == m_dataMap.end()) { - LoggerW("No data to erase."); + LoggerD("No data to erase."); break; } diff --git a/src/Application/JSApplication.cpp b/src/Application/JSApplication.cpp index 9b88fd5..d5a55e6 100644 --- a/src/Application/JSApplication.cpp +++ b/src/Application/JSApplication.cpp @@ -95,21 +95,18 @@ JSClassRef JSApplication::getClassRef() { void JSApplication::initialize(JSContextRef context, JSObjectRef object) { - LoggerI(">> initialize"); } void JSApplication::finalize(JSObjectRef object) { - LoggerI(">> finalize"); JSApplicationPriv* priv = static_cast(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."); } @@ -176,7 +173,6 @@ JSValueRef JSApplication::exit(JSContextRef context, const JSValueRef arguments[], JSValueRef* exception) { - LoggerD("entered"); TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0); try { @@ -199,7 +195,6 @@ JSValueRef JSApplication::hide(JSContextRef context, const JSValueRef arguments[], JSValueRef* exception) { - LoggerD("entered"); TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0); try { @@ -223,7 +218,6 @@ JSValueRef JSApplication::getRequestedAppControl(JSContextRef context, const JSValueRef arguments[], JSValueRef* exception) { - LoggerD("entered"); TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0); JSApplicationPriv *priv = static_cast(JSObjectGetPrivate(thisObject)); @@ -244,7 +238,6 @@ JSValueRef JSApplication::getRequestedAppControl(JSContextRef context, ScopedJSStringRef(JSStringCreateWithUTF8CString("__bundle")).get(), exception); if (JSValueIsUndefined(context, encodedBundle) || JSValueIsNull(context, encodedBundle)) { - LoggerE("encodedBundle"+converter->toString(encodedBundle)); return JSValueMakeNull(context); } diff --git a/src/Application/JSApplicationCert.cpp b/src/Application/JSApplicationCert.cpp index 8da497c..736c9a7 100644 --- a/src/Application/JSApplicationCert.cpp +++ b/src/Application/JSApplicationCert.cpp @@ -76,15 +76,12 @@ JSClassRef JSApplicationCert::getClassRef() { void JSApplicationCert::initialize(JSContextRef context, JSObjectRef object) { - LoggerI(">> initialize"); } void JSApplicationCert::finalize(JSObjectRef object) { - LoggerI(">> finalize"); JSApplicationCertPriv* priv = static_cast(JSObjectGetPrivate(object)); JSObjectSetPrivate(object, NULL); - LoggerD("Deleting JSApplicationCert object"); delete priv; } @@ -116,7 +113,7 @@ JSValueRef JSApplicationCert::getProperty(JSContextRef context, 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()); diff --git a/src/Application/JSApplicationContext.cpp b/src/Application/JSApplicationContext.cpp index 1c4afa4..33829f6 100644 --- a/src/Application/JSApplicationContext.cpp +++ b/src/Application/JSApplicationContext.cpp @@ -89,15 +89,12 @@ JSValueRef JSApplicationContext::createJSObject(JSContextRef context, void JSApplicationContext::initialize(JSContextRef context, JSObjectRef object) { - LoggerI(">> initialize"); } void JSApplicationContext::finalize(JSObjectRef object) { - LoggerI(">> finalize"); JSApplicationContextPriv* priv = static_cast(JSObjectGetPrivate(object)); JSObjectSetPrivate(object, NULL); - LoggerD("Deleting JSApplicationContext object"); delete priv; } diff --git a/src/Application/JSApplicationControl.cpp b/src/Application/JSApplicationControl.cpp index 49b0b2f..6c8f96a 100644 --- a/src/Application/JSApplicationControl.cpp +++ b/src/Application/JSApplicationControl.cpp @@ -24,14 +24,12 @@ #include #include #include -#include //#include //#include //#include #include "plugin_config.h" -#include #include "ApplicationConverter.h" #include "ApplicationUtil.h" @@ -91,7 +89,6 @@ const JSClassRef JSApplicationControl::getClassRef() JSObjectRef JSApplicationControl::createJSObject(JSContextRef context, const ApplicationControlPtr &appsvc) { - LoggerI(">> createJSObject"); JSApplicationControlPriv *priv = new JSApplicationControlPriv(context, appsvc); if (!priv) { @@ -134,15 +131,12 @@ ApplicationControlPtr JSApplicationControl::getPrivateData(JSContextRef context, void JSApplicationControl::initialize(JSContextRef context,JSObjectRef object) { - LoggerI(">> initialize"); } void JSApplicationControl::finalize(JSObjectRef object) { - LoggerI(">> finalize"); JSApplicationControlPriv* priv = static_cast(JSObjectGetPrivate(object)); JSObjectSetPrivate(object, NULL); - LoggerD("Deleting ApplicationControl object"); delete priv; } @@ -194,7 +188,6 @@ bool JSApplicationControl::isObjectOfClass(JSContextRef context, JSValueRef valu ApplicationControlPtr JSApplicationControl::getPrivData(JSContextRef context, JSObjectRef object) { - LoggerD("entered"); JSApplicationControlPriv *priv = static_cast(JSObjectGetPrivate(object)); if (!priv) { throw TypeMismatchException("Private object is null"); @@ -220,11 +213,9 @@ JSValueRef JSApplicationControl::getProperty(JSContextRef context, JSObjectRef o 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 { @@ -232,7 +223,6 @@ JSValueRef JSApplicationControl::getProperty(JSContextRef context, JSObjectRef o } } 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 { @@ -240,14 +230,12 @@ JSValueRef JSApplicationControl::getProperty(JSContextRef context, JSObjectRef o } } 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()); } diff --git a/src/Application/JSApplicationControlData.cpp b/src/Application/JSApplicationControlData.cpp index 67192d0..287e91b 100644 --- a/src/Application/JSApplicationControlData.cpp +++ b/src/Application/JSApplicationControlData.cpp @@ -27,7 +27,6 @@ #include "JSApplicationControlData.h" #include "ApplicationConverter.h" #include "ApplicationUtil.h" -#include using namespace WrtDeviceApis::Commons; using namespace WrtDeviceApis::CommonsJavaScript; @@ -79,7 +78,6 @@ JSClassRef JSApplicationControlData::getClassRef() { JSObjectRef JSApplicationControlData::createJSObject(JSContextRef context, const ApplicationControlDataPtr &appdata) { - LoggerI(">> createJSObject"); JSApplicationControlDataPriv *priv = new JSApplicationControlDataPriv(context, appdata); if (!priv) { @@ -116,15 +114,12 @@ JSObjectRef JSApplicationControlData::constructor(JSContextRef context, JSObject void JSApplicationControlData::initialize(JSContextRef context, JSObjectRef object) { - LoggerI(">> initialize"); } void JSApplicationControlData::finalize(JSObjectRef object) { - LoggerI(">> finalize"); JSApplicationControlDataPriv* priv = static_cast(JSObjectGetPrivate(object)); JSObjectSetPrivate(object, NULL); - LoggerD("Deleting ApplicationControl object"); delete priv; } @@ -135,7 +130,6 @@ bool JSApplicationControlData::isObjectOfClass(JSContextRef context, JSValueRef ApplicationControlDataPtr JSApplicationControlData::getPrivData(JSObjectRef object) { - LoggerD("entered"); JSApplicationControlDataPriv *priv = static_cast(JSObjectGetPrivate(object)); if (!priv) { throw TypeMismatchException("Private object is null"); diff --git a/src/Application/JSApplicationEventCallbackManager.cpp b/src/Application/JSApplicationEventCallbackManager.cpp index c274eff..1c47280 100644 --- a/src/Application/JSApplicationEventCallbackManager.cpp +++ b/src/Application/JSApplicationEventCallbackManager.cpp @@ -178,7 +178,6 @@ void JSApplicationEventCallbackManager::callOnInstalled( JSValueRef appInfo ) { if ( m_onInstalled == NULL ) { - //LoggerD("oninstalled callback is not set"); return; } JSValueRef objParam[1] = { appInfo }; @@ -189,7 +188,6 @@ void JSApplicationEventCallbackManager::callOnUpdated( JSValueRef appInfo ) { if ( m_onUpdated == NULL ) { - //LoggerD("onupdated callback is not set"); return; } JSValueRef objParam[1] = { appInfo }; @@ -200,7 +198,6 @@ void JSApplicationEventCallbackManager::callOnUninstalled( JSValueRef appId ) { if ( m_onUninstalled == NULL ) { - //LoggerD("onuninstalled callback is not set"); return; } JSValueRef objParam[1] = { appId }; @@ -211,7 +208,6 @@ void JSApplicationEventCallbackManager::callOnError( JSValueRef error ) { if ( m_onError == NULL ) { - //LoggerD("Error callback is not set"); return; } JSValueRef objParam[1] = { error }; @@ -223,7 +219,7 @@ void JSApplicationEventCallbackManager::makeCallback(JSContextRef context, JSObj if (callback == NULL) { - LoggerE("callback is NULL"); + LoggerE("callback cannot be NULL"); return; } @@ -231,12 +227,10 @@ void JSApplicationEventCallbackManager::makeCallback(JSContextRef context, JSObj { 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; diff --git a/src/Application/JSApplicationInformation.cpp b/src/Application/JSApplicationInformation.cpp index 5385629..62db8e8 100644 --- a/src/Application/JSApplicationInformation.cpp +++ b/src/Application/JSApplicationInformation.cpp @@ -112,15 +112,12 @@ JSValueRef JSApplicationInformation::createJSObject(JSContextRef context, void JSApplicationInformation::initialize(JSContextRef context, JSObjectRef object) { - //LoggerI(">> initialize"); } void JSApplicationInformation::finalize(JSObjectRef object) { - LoggerI(">> finalize"); JSApplicationInformationPriv* priv = static_cast(JSObjectGetPrivate(object)); JSObjectSetPrivate(object, NULL); - LoggerD("Deleting JSApplicationInformation object"); delete priv; } @@ -186,7 +183,6 @@ JSValueRef JSApplicationInformation::getProperty(JSContextRef context, // 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 diff --git a/src/Application/JSApplicationManager.cpp b/src/Application/JSApplicationManager.cpp index 309a35d..cc94d6c 100644 --- a/src/Application/JSApplicationManager.cpp +++ b/src/Application/JSApplicationManager.cpp @@ -116,7 +116,6 @@ const JSClassDefinition* JSApplicationManager::getClassInfo() void JSApplicationManager::initialize(JSContextRef context, JSObjectRef object) { - LoggerD(">>> JSApplicationManager::initialize"); ApplicationController* priv = static_cast(JSObjectGetPrivate(object)); if (!priv) { @@ -124,7 +123,6 @@ void JSApplicationManager::initialize(JSContextRef context, JSObjectRef object) priv = new ApplicationController(context, applications); if (!JSObjectSetPrivate(object, static_cast(priv))) { - LoggerE("Object can't store private data."); delete priv; } } else { @@ -155,7 +153,6 @@ JSValueRef JSApplicationManager::getCurrentApplication(JSContextRef context, const JSValueRef arguments[], JSValueRef* exception) { - LoggerD("entered"); TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0); IApplicationManagerPtr appmgr; ApplicationController *controller; @@ -177,9 +174,6 @@ JSValueRef JSApplicationManager::getCurrentApplication(JSContextRef context, 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 (...) { @@ -197,7 +191,6 @@ JSValueRef JSApplicationManager::launch(JSContextRef context, const JSValueRef arguments[], JSValueRef* exception) { - LoggerD("entered"); TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0); TIME_TRACER_ITEM_BEGIN("launch(async)", 0); @@ -260,7 +253,6 @@ JSValueRef JSApplicationManager::kill(JSContextRef context, const JSValueRef arguments[], JSValueRef* exception) { - LoggerD("entered"); TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0); TIME_TRACER_ITEM_BEGIN("kill(async)", 0); @@ -324,7 +316,6 @@ JSValueRef JSApplicationManager::setUserAgent(JSContextRef context, const JSValueRef arguments[], JSValueRef* exception) { - LoggerD("entered"); TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0); try { @@ -355,7 +346,6 @@ JSValueRef JSApplicationManager::launchAppControl(JSContextRef context, 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); @@ -393,7 +383,6 @@ JSValueRef JSApplicationManager::launchAppControl(JSContextRef context, // id std::string id = validator.toString(1, true, ""); - LoggerW("id : " << id); event->setAppId(id); // successCallback @@ -463,7 +452,6 @@ JSValueRef JSApplicationManager::findAppControl(JSContextRef context, const JSValueRef arguments[], JSValueRef* exception) { - LoggerD("entered"); TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0); TIME_TRACER_ITEM_BEGIN("findAppControl(async)", 0); try { @@ -532,7 +520,6 @@ JSValueRef JSApplicationManager::getAppsContext(JSContextRef context, const JSValueRef arguments[], JSValueRef* exception) { - LoggerD("entered"); TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0); TIME_TRACER_ITEM_BEGIN("getAppsContext(async)", 0); @@ -573,10 +560,10 @@ JSValueRef JSApplicationManager::getAppsContext(JSContextRef context, 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); } @@ -590,7 +577,6 @@ JSValueRef JSApplicationManager::getAppContext(JSContextRef context, const JSValueRef arguments[], JSValueRef* exception) { - LoggerD("entered"); TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0); try { @@ -609,7 +595,6 @@ JSValueRef JSApplicationManager::getAppContext(JSContextRef context, // contextId std::string contextId = validator.toString(0, true, ""); - LoggerD("contextId : " << contextId); event->setAppContextId(contextId); event->setForSynchronousCall(); @@ -640,7 +625,6 @@ JSValueRef JSApplicationManager::getAppsInfo(JSContextRef context, const JSValueRef arguments[], JSValueRef* exception) { - LoggerD("entered"); TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0); TIME_TRACER_ITEM_BEGIN("getAppsInfo(async)", 0); @@ -697,7 +681,6 @@ JSValueRef JSApplicationManager::getAppInfo(JSContextRef context, const JSValueRef arguments[], JSValueRef* exception) { - LoggerD("entered"); TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0); try { @@ -747,7 +730,6 @@ JSValueRef JSApplicationManager::addAppInfoEventListener(JSContextRef context, const JSValueRef arguments[], JSValueRef* exception) { - LoggerD("entered"); TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0); try { @@ -824,7 +806,6 @@ JSValueRef JSApplicationManager::removeAppInfoEventListener(JSContextRef context const JSValueRef arguments[], JSValueRef* exception) { - LoggerD("entered"); TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0); try { @@ -845,7 +826,6 @@ JSValueRef JSApplicationManager::removeAppInfoEventListener(JSContextRef context // watchId long watchId = validator.toLong(0); - LoggerD("watchId : " << watchId); event->setWatchId(watchId); event->setForSynchronousCall(); @@ -882,7 +862,6 @@ JSValueRef JSApplicationManager::getAppCerts(JSContextRef context, const JSValueRef arguments[], JSValueRef* exception) { - LoggerD("entered"); TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0); AceSecurityStatus status = APPLICATION_CHECK_ACCESS(APPLICATION_FUNCTION_API_GET_APP_CERTS); @@ -936,7 +915,6 @@ JSValueRef JSApplicationManager::getAppSharedURI(JSContextRef context, const JSValueRef arguments[], JSValueRef* exception) { - LoggerD("entered"); TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0); try { @@ -980,7 +958,6 @@ JSValueRef JSApplicationManager::getAppSharedURI(JSContextRef context, } void JSApplicationManager::setTitleProperty(JSContextRef context, std::string propertyValue){ - LoggerD("<<>>"); } } diff --git a/src/Application/JSRequestedApplicationControl.cpp b/src/Application/JSRequestedApplicationControl.cpp index 473158b..48c6b1d 100644 --- a/src/Application/JSRequestedApplicationControl.cpp +++ b/src/Application/JSRequestedApplicationControl.cpp @@ -89,7 +89,6 @@ JSClassRef JSRequestedApplicationControl::getClassRef() JSObjectRef JSRequestedApplicationControl::createJSObject(JSContextRef context, const RequestedApplicationControlPtr &appsvc) { - LoggerI(">> createJSObject"); JSRequestedApplicationControlPriv *priv = new JSRequestedApplicationControlPriv(context, appsvc); if (!priv) { @@ -103,15 +102,12 @@ JSObjectRef JSRequestedApplicationControl::createJSObject(JSContextRef context, void JSRequestedApplicationControl::initialize(JSContextRef context,JSObjectRef object) { - LoggerI(">> initialize"); } void JSRequestedApplicationControl::finalize(JSObjectRef object) { - LoggerI(">> finalize"); JSRequestedApplicationControlPriv* priv = static_cast(JSObjectGetPrivate(object)); JSObjectSetPrivate(object, NULL); - LoggerD("Deleting ApplicationControl object"); delete priv; } @@ -142,7 +138,6 @@ RequestedApplicationControlPtr JSRequestedApplicationControl::getRequestedApplic RequestedApplicationControlPtr JSRequestedApplicationControl::getPrivData(JSObjectRef object) { - LoggerD("entered"); JSRequestedApplicationControlPriv *priv = static_cast(JSObjectGetPrivate(object)); if (!priv) { ThrowMsg(WrtDeviceApis::Commons::NullPointerException, "Private object is null"); @@ -166,14 +161,12 @@ JSValueRef JSRequestedApplicationControl::getProperty(JSContextRef context, JSOb 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); } @@ -194,7 +187,6 @@ JSValueRef JSRequestedApplicationControl::replyResult(JSContextRef context, const JSValueRef arguments[], JSValueRef* exception) { - LoggerD("entered"); JSRequestedApplicationControlPriv *priv = static_cast(JSObjectGetPrivate(thisObject)); Try { @@ -211,16 +203,16 @@ JSValueRef JSRequestedApplicationControl::replyResult(JSContextRef context, } 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()); } @@ -234,7 +226,6 @@ JSValueRef JSRequestedApplicationControl::replyFailure(JSContextRef context, const JSValueRef arguments[], JSValueRef* exception) { - LoggerD("entered"); JSRequestedApplicationControlPriv *priv = static_cast(JSObjectGetPrivate(thisObject)); Try { @@ -245,13 +236,13 @@ JSValueRef JSRequestedApplicationControl::replyFailure(JSContextRef context, 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()); } diff --git a/src/Application/RequestedApplicationControl.cpp b/src/Application/RequestedApplicationControl.cpp index 5358374..11fccb8 100644 --- a/src/Application/RequestedApplicationControl.cpp +++ b/src/Application/RequestedApplicationControl.cpp @@ -30,13 +30,11 @@ RequestedApplicationControl::RequestedApplicationControl() : m_appControl(NULL), m_appService(NULL) { - LoggerD("entered"); } RequestedApplicationControl::~RequestedApplicationControl() { - LoggerD("entered"); } ApplicationControlPtr RequestedApplicationControl::getAppControl() const @@ -79,7 +77,6 @@ void RequestedApplicationControl::replyResult(std::vectorgetKey().c_str(), arr, valueArray.size()); @@ -93,13 +90,13 @@ void RequestedApplicationControl::replyResult(std::vector +#include + #include #include #include @@ -25,6 +28,7 @@ #include "JSApplicationControl.h" #include "ApplicationAsyncCallbackManager.h" #include "ApplicationListenerManager.h" +#include "AppManagerWrapper.h" #include using namespace WrtDeviceApis; @@ -47,6 +51,10 @@ class_definition_options_t ApplicationOptions = void on_widget_start_callback(int widgetId) { LoggerD("[Tizen1_0\\Application] on_widget_start_callback ("<(userData); if(!object) { LoggerW("userData is NULL"); @@ -81,8 +79,6 @@ void BluetoothAdapter::onStateChangedCB(int result, bt_adapter_state_e adapterSt void BluetoothAdapter::onNameChangedCB(char *name, void *userData) { - LoggerD("Entered"); - BluetoothAdapterPtr object = static_cast(userData); if(!object) { LoggerW("userData is NULL"); @@ -104,8 +100,6 @@ void BluetoothAdapter::onNameChangedCB(char *name, void *userData) void BluetoothAdapter::onVisibilityChangedCB(int result, bt_adapter_visibility_mode_e visibilityMode, void *userData) { - LoggerD("Entered"); - BluetoothAdapterPtr object = static_cast(userData); if(!object) { LoggerW("userData is NULL"); @@ -132,7 +126,7 @@ void BluetoothAdapter::onVisibilityChangedCB(int result, bt_adapter_visibility_m UnknownException error("Unknown error"); callback->invokeCallback("error", JSWebAPIError::makeJSWebAPIError(context, error)); } - } + } bt_adapter_unset_visibility_mode_changed_cb(); } @@ -144,8 +138,6 @@ void BluetoothAdapter::onVisibilityChangedCB(int result, bt_adapter_visibility_m 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(userData); if(!object) { LoggerW("userData is NULL"); @@ -155,7 +147,7 @@ void BluetoothAdapter::onDiscoveryStateChangedCB(int result, bt_adapter_device_d 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(object->mUserDataList[DISCOVER_DEVICES]); @@ -176,7 +168,6 @@ void BluetoothAdapter::onDiscoveryStateChangedCB(int result, bt_adapter_device_d } else { if(callback) { - LoggerD("Reset DISCOVER_DEVICES"); object->mUserDataList[DISCOVER_DEVICES].reset(); JSContextRef context = callback->getContext(); @@ -197,7 +188,7 @@ void BluetoothAdapter::onDiscoveryStateChangedCB(int result, bt_adapter_device_d } 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) { @@ -205,7 +196,6 @@ void BluetoothAdapter::onDiscoveryStateChangedCB(int result, bt_adapter_device_d static_cast(object->mUserDataList[DISCOVER_DEVICES]); if(callback) { - LoggerD("Call onfinished()"); if(object->mDisappearedDevices.size() > 0) { LoggerD("There are disappeared devices"); for(std::vector::iterator iter = object->mDisappearedDevices.begin(); @@ -225,7 +215,6 @@ void BluetoothAdapter::onDiscoveryStateChangedCB(int result, bt_adapter_device_d devices[i] = deviceObj; } - LoggerD("Reset DISCOVER_DEVICES"); object->mUserDataList[DISCOVER_DEVICES].reset(); callback->invokeCallback( @@ -234,8 +223,6 @@ void BluetoothAdapter::onDiscoveryStateChangedCB(int result, bt_adapter_device_d } else { // There is no found device LoggerD("There is no found device"); - - LoggerD("Reset DISCOVER_DEVICES"); object->mUserDataList[DISCOVER_DEVICES].reset(); callback->invokeCallback( @@ -260,15 +247,15 @@ void BluetoothAdapter::onDiscoveryStateChangedCB(int result, bt_adapter_device_d //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; } @@ -287,7 +274,6 @@ void BluetoothAdapter::onDiscoveryStateChangedCB(int result, bt_adapter_device_d for(std::vector::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; } @@ -297,7 +283,7 @@ void BluetoothAdapter::onDiscoveryStateChangedCB(int result, bt_adapter_device_d 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 @@ -314,8 +300,6 @@ void BluetoothAdapter::onDiscoveryStateChangedCB(int result, bt_adapter_device_d bool BluetoothAdapter::foreachBondedDevicesCB(bt_device_info_s *deviceInfo, void *userData) { - LoggerD("Entered"); - BluetoothAdapterPtr adapter = static_cast(userData); if(!adapter) { LoggerW("userData is NULL"); @@ -332,14 +316,12 @@ bool BluetoothAdapter::foreachBondedDevicesCB(bt_device_info_s *deviceInfo, void 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); } @@ -349,8 +331,6 @@ bool BluetoothAdapter::foreachBondedDevicesCB(bt_device_info_s *deviceInfo, void void BluetoothAdapter::onBondCreatedCB(int result, bt_device_info_s *deviceInfo, void *userData) { - LoggerD("Entered"); - BluetoothAdapterPtr object = static_cast(userData); if(!object) { LoggerW("userData is NULL"); @@ -394,8 +374,6 @@ void BluetoothAdapter::onBondCreatedCB(int result, bt_device_info_s *deviceInfo, void BluetoothAdapter::onBondDestroyedCB(int result, char *remoteAddress, void *userData) { - LoggerD("Entered"); - BluetoothAdapterPtr object = static_cast(userData); if(!object) { LoggerW("userData is NULL"); @@ -424,14 +402,12 @@ void BluetoothAdapter::onBondDestroyedCB(int result, char *remoteAddress, void * 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(userData); if(!object) { LoggerW("userData is NULL"); @@ -508,7 +484,6 @@ void BluetoothAdapter::onSocketConnected(int result, bt_socket_connection_state_ 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()); @@ -580,16 +555,12 @@ void BluetoothAdapter::onSocketConnected(int result, bt_socket_connection_state_ } 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(userData); if(!object) { LoggerW("userData is NULL"); @@ -620,8 +591,6 @@ void BluetoothAdapter::onSocketReceivedCB(bt_socket_received_data_s *data, void BluetoothAdapter::BluetoothAdapter(): mEnabled(false) { - LoggerD("Entered"); - if(bt_initialize() != BT_ERROR_NONE) { LoggerE("bt_initialize() failed"); } @@ -644,8 +613,6 @@ BluetoothAdapter::BluetoothAdapter(): BluetoothAdapter::~BluetoothAdapter() { - LoggerD("Entered"); - // unset platform callback bt_adapter_unset_state_changed_cb(); bt_adapter_unset_name_changed_cb(); @@ -668,14 +635,11 @@ BluetoothAdapter::~BluetoothAdapter() 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(); } } @@ -686,7 +650,6 @@ void BluetoothAdapter::unloadFrame(JSContextRef context) ConnReqMultiMapT::iterator temp = iter++; MultiCallbackUserDataPtr callback = temp->second->mUserData; if(!callback && !GlobalContextManager::getInstance()->isAliveGlobalContext(callback->getContext())) { - LoggerD("erase a connectionRequest"); mConnReqMap.erase(temp); } } @@ -694,20 +657,14 @@ void BluetoothAdapter::unloadFrame(JSContextRef context) 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()) { @@ -721,8 +678,6 @@ bool BluetoothAdapter::closeConnectedSocket(int socket) } 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(); } @@ -736,13 +691,9 @@ bool BluetoothAdapter::closeConnectedSocket(int socket) 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"); } @@ -751,8 +702,6 @@ void BluetoothAdapter::removeConnReq(std::string &remoteAddress) BluetoothAdapter* BluetoothAdapter::getInstance() { - LoggerD("Entered"); - static BluetoothAdapter instance; return &instance; } @@ -770,8 +719,6 @@ bool BluetoothAdapter::isBluetoothSupported() 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"; @@ -811,8 +758,6 @@ bool BluetoothAdapter::isValidUUID(std::string &uuid) std::string BluetoothAdapter::getName() const { - LoggerD("Entered"); - char* name = NULL; std::string str = ""; @@ -832,8 +777,6 @@ std::string BluetoothAdapter::getName() const 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 @@ -887,8 +830,6 @@ void BluetoothAdapter::setName(std::string &name, MultiCallbackUserDataPtr userD std::string BluetoothAdapter::getAddress() const { - LoggerD("Entered"); - char* address = NULL; std::string str = ""; @@ -910,15 +851,11 @@ std::string BluetoothAdapter::getAddress() const 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); @@ -1003,8 +940,6 @@ void BluetoothAdapter::setPowered(bool powered, MultiCallbackUserDataPtr userDat bool BluetoothAdapter::getVisible() const { - LoggerD("Entered"); - bt_adapter_visibility_mode_e mode; if (bt_adapter_get_visibility(&mode, NULL) == BT_ERROR_NONE) { @@ -1018,8 +953,6 @@ bool BluetoothAdapter::getVisible() const 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) { @@ -1092,8 +1025,6 @@ void BluetoothAdapter::setVisible(bool visible, unsigned int timeout, MultiCallb void BluetoothAdapter::discoverDevices(MultiCallbackUserDataPtr userData) { - LoggerD("Entered"); - if(mUserDataList[DISCOVER_DEVICES] == NULL) { mUserDataList[DISCOVER_DEVICES] = userData; @@ -1139,8 +1070,6 @@ void BluetoothAdapter::discoverDevices(MultiCallbackUserDataPtr userData) void BluetoothAdapter::stopDiscovery(MultiCallbackUserDataPtr userData) { - LoggerD("Entered"); - if(mEnabled == true) { bool isDiscovering = false; @@ -1192,20 +1121,16 @@ void BluetoothAdapter::stopDiscovery(MultiCallbackUserDataPtr userData) 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"); @@ -1260,8 +1185,6 @@ void BluetoothAdapter::createBonding(std::string &address, MultiCallbackUserData void BluetoothAdapter::destroyBonding(std::string &address, MultiCallbackUserDataPtr userData) { - LoggerD("Entered"); - if(!isValidAddress(address)) { LoggerE("Wrong address"); NotFoundException *error = new NotFoundException("Wrong address"); @@ -1322,14 +1245,11 @@ void BluetoothAdapter::destroyBonding(std::string &address, MultiCallbackUserDat 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"); @@ -1372,8 +1292,6 @@ void BluetoothAdapter::connectToServiceByUUID(std::string &remoteAddress, std::s void BluetoothAdapter::returnKnownDevices(Common::MultiCallbackUserDataPtr userData) { - LoggerD("Entered"); - if(mEnabled == true) { knownDevices = mFoundDevices; if(bt_adapter_foreach_bonded_device(foreachBondedDevicesCB, this) == BT_ERROR_NONE) { @@ -1386,11 +1304,9 @@ void BluetoothAdapter::returnKnownDevices(Common::MultiCallbackUserDataPtr userD 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) ); } } @@ -1412,8 +1328,6 @@ void BluetoothAdapter::returnKnownDevices(Common::MultiCallbackUserDataPtr userD 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"))); @@ -1462,8 +1376,6 @@ void BluetoothAdapter::returnDevice(std::string &address, Common::MultiCallbackU 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"))); diff --git a/src/Bluetooth/BluetoothCallbackUtil.cpp b/src/Bluetooth/BluetoothCallbackUtil.cpp index 1ecc03b..a1fb41f 100644 --- a/src/Bluetooth/BluetoothCallbackUtil.cpp +++ b/src/Bluetooth/BluetoothCallbackUtil.cpp @@ -31,8 +31,6 @@ namespace DeviceAPI { namespace Bluetooth { static Eina_Bool jobCompleteCB(void *userData){ - LoggerD("Entered"); - BluetoothCallbackUserDataPtr data = static_cast(userData); if(!data) { diff --git a/src/Bluetooth/BluetoothClass.cpp b/src/Bluetooth/BluetoothClass.cpp index eebc839..8998d66 100644 --- a/src/Bluetooth/BluetoothClass.cpp +++ b/src/Bluetooth/BluetoothClass.cpp @@ -34,7 +34,6 @@ namespace Bluetooth { 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); @@ -42,24 +41,20 @@ BluetoothClass::BluetoothClass(bt_class_s bluetoothClass) 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) { @@ -74,8 +69,6 @@ JSValueRef BluetoothClass::getServices(JSContextRef context) bool BluetoothClass::hasService(unsigned long service) { - LoggerD("Enter"); - for(std::vector::iterator iter = mServices.begin(); iter != mServices.end(); ++iter) { if((*iter) == service) { return true; diff --git a/src/Bluetooth/BluetoothClassDeviceMajor.cpp b/src/Bluetooth/BluetoothClassDeviceMajor.cpp index 11a5736..fb7f03d 100644 --- a/src/Bluetooth/BluetoothClassDeviceMajor.cpp +++ b/src/Bluetooth/BluetoothClassDeviceMajor.cpp @@ -26,8 +26,6 @@ namespace Bluetooth { BluetoothClassDeviceMajor::BluetoothClassDeviceMajor() { - LoggerD("Enter"); - mMajorStringMap.insert(std::pair("MISC", 0x00)); mMajorStringMap.insert(std::pair("COMPUTER", 0x01)); mMajorStringMap.insert(std::pair("PHONE", 0x02)); @@ -55,25 +53,21 @@ BluetoothClassDeviceMajor::BluetoothClassDeviceMajor() 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; } diff --git a/src/Bluetooth/BluetoothClassDeviceMinor.cpp b/src/Bluetooth/BluetoothClassDeviceMinor.cpp index f9d1ab2..3396761 100644 --- a/src/Bluetooth/BluetoothClassDeviceMinor.cpp +++ b/src/Bluetooth/BluetoothClassDeviceMinor.cpp @@ -26,8 +26,6 @@ namespace Bluetooth { BluetoothClassDeviceMinor::BluetoothClassDeviceMinor() { - LoggerD("Enter"); - mMinorStringMap.insert(std::pair("COMPUTER_UNCATEGORIZED", 0x00)); mMinorStringMap.insert(std::pair("COMPUTER_DESKTOP", 0x01)); mMinorStringMap.insert(std::pair("COMPUTER_SERVER", 0x02)); @@ -176,26 +174,21 @@ BluetoothClassDeviceMinor::BluetoothClassDeviceMinor() 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::iterator iter = mMinorEnumMap.find(minor); if(iter != mMinorEnumMap.end()) { diff --git a/src/Bluetooth/BluetoothClassDeviceService.cpp b/src/Bluetooth/BluetoothClassDeviceService.cpp index 636e2ed..aae9a2d 100644 --- a/src/Bluetooth/BluetoothClassDeviceService.cpp +++ b/src/Bluetooth/BluetoothClassDeviceService.cpp @@ -26,8 +26,6 @@ namespace Bluetooth { BluetoothClassDeviceService::BluetoothClassDeviceService() { - LoggerD("Enter"); - mServiceStringMap.insert(std::pair("LIMITED_DISCOVERABILITY", 0x0001)); mServiceStringMap.insert(std::pair("POSITIONING", 0x0008)); mServiceStringMap.insert(std::pair("NETWORKING", 0x0010)); @@ -51,32 +49,26 @@ BluetoothClassDeviceService::BluetoothClassDeviceService() 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 BluetoothClassDeviceService::getServiceValues(int serviceMask) { - LoggerD("Enter"); - std::vector ret; for(std::map::iterator iter = mServiceEnumMap.begin(); iter != mServiceEnumMap.end(); iter++) { if(iter->first & serviceMask) { diff --git a/src/Bluetooth/BluetoothDevice.cpp b/src/Bluetooth/BluetoothDevice.cpp index 6a96bd7..1331a84 100644 --- a/src/Bluetooth/BluetoothDevice.cpp +++ b/src/Bluetooth/BluetoothDevice.cpp @@ -32,8 +32,6 @@ namespace Bluetooth { 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)); @@ -45,8 +43,6 @@ BluetoothDevice::BluetoothDevice(bt_adapter_device_discovery_info_s *discoveryIn 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)); @@ -58,14 +54,11 @@ BluetoothDevice::BluetoothDevice(bt_device_info_s *deviceInfo) 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++) { @@ -76,19 +69,16 @@ void BluetoothDevice::updateInfo(bt_device_info_s *deviceInfo) 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) { @@ -103,8 +93,6 @@ JSValueRef BluetoothDevice::getDeviceClass(JSContextRef context) 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) { @@ -117,8 +105,6 @@ bool BluetoothDevice::isBonded() const 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) { @@ -131,8 +117,6 @@ bool BluetoothDevice::isTrusted() const 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) { @@ -145,7 +129,6 @@ bool BluetoothDevice::isConnected() const JSValueRef BluetoothDevice::getUUIDs(JSContextRef context) { - LoggerD("Enter"); /* if(isUpdated == true) { mLocalProperty.setProperty(context, BLUETOOTH_DEVICE_UUIDS, JSUtil::toJSValueRef(context, mUUIDs)); diff --git a/src/Bluetooth/BluetoothServiceHandler.cpp b/src/Bluetooth/BluetoothServiceHandler.cpp index b63748f..b1cafe4 100644 --- a/src/Bluetooth/BluetoothServiceHandler.cpp +++ b/src/Bluetooth/BluetoothServiceHandler.cpp @@ -41,8 +41,6 @@ BluetoothServiceHandler::BluetoothServiceHandler(std::string uuid, std::string n BluetoothServiceHandler::~BluetoothServiceHandler() { - LoggerD("Enter"); - if(mIsRegistered) { BluetoothAdapter::getInstance()->unregisterUUID(mUUID); if(bt_socket_destroy_rfcomm(mRegisteredSocket) != BT_ERROR_NONE) { @@ -53,8 +51,6 @@ BluetoothServiceHandler::~BluetoothServiceHandler() bool BluetoothServiceHandler::setOnConnect(JSContextRef context, JSObjectRef onConnect) { - LoggerD("Enter"); - MultiCallbackUserDataPtr callback( new MultiCallbackUserData(GlobalContextManager::getInstance()->getGlobalContext(context))); if(!callback){ @@ -89,8 +85,6 @@ MultiCallbackUserDataPtr BluetoothServiceHandler::getOnConnect() const JSValueRef BluetoothServiceHandler::getOnConnect(JSContextRef context) { - LoggerD("Enter"); - JSValueRef onConnect = mLocalProperty.getProperty(context, BLUETOOTH_SERVICE_HANDLER_ONCONNECT); if(onConnect == NULL) { LoggerD("onconnect is null"); @@ -112,8 +106,6 @@ bool BluetoothServiceHandler::getConnectionState() void BluetoothServiceHandler::unregister(MultiCallbackUserDataPtr userData) { - LoggerD("Enter"); - if(BluetoothAdapter::getInstance()->getPowered() == true) { if(bt_socket_destroy_rfcomm(mRegisteredSocket) == BT_ERROR_NONE) { mIsRegistered = false; diff --git a/src/Bluetooth/BluetoothSocket.cpp b/src/Bluetooth/BluetoothSocket.cpp index a3f3f4b..e24644b 100644 --- a/src/Bluetooth/BluetoothSocket.cpp +++ b/src/Bluetooth/BluetoothSocket.cpp @@ -32,7 +32,6 @@ namespace Bluetooth { BluetoothSocket::BluetoothSocket(bt_socket_connection_s *connection) { - LoggerD("Enter"); mConnectedSocket = connection->socket_fd; mUUID = std::string(connection->service_uuid); mIsConnected = true; @@ -47,7 +46,6 @@ BluetoothSocket::BluetoothSocket(bt_socket_connection_s *connection) BluetoothSocket::~BluetoothSocket() { - LoggerD("Enter"); if(mIsConnected) { if(bt_socket_disconnect_rfcomm(mConnectedSocket) != BT_ERROR_NONE) { LoggerW("Already disconnected"); @@ -61,7 +59,6 @@ BluetoothSocket::~BluetoothSocket() bool BluetoothSocket::setOnMessage(JSContextRef context, JSObjectRef onMessage) { - LoggerD("Enter"); MultiCallbackUserDataPtr callback( new MultiCallbackUserData(GlobalContextManager::getInstance()->getGlobalContext(context))); if(!callback){ @@ -76,7 +73,6 @@ bool BluetoothSocket::setOnMessage(JSContextRef context, JSObjectRef onMessage) bool BluetoothSocket::setOnClose(JSContextRef context, JSObjectRef onClose) { - LoggerD("Enter"); MultiCallbackUserDataPtr callback( new MultiCallbackUserData(GlobalContextManager::getInstance()->getGlobalContext(context))); if(!callback){ @@ -91,7 +87,6 @@ bool BluetoothSocket::setOnClose(JSContextRef context, JSObjectRef onClose) bool BluetoothSocket::setOnError(JSContextRef context, JSObjectRef onError) { - LoggerD("Enter"); MultiCallbackUserDataPtr callback( new MultiCallbackUserData(GlobalContextManager::getInstance()->getGlobalContext(context))); if(!callback){ @@ -106,25 +101,21 @@ bool BluetoothSocket::setOnError(JSContextRef context, JSObjectRef onError) 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) { @@ -144,7 +135,6 @@ MultiCallbackUserDataPtr BluetoothSocket::getOnMessage() const JSValueRef BluetoothSocket::getOnMessage(JSContextRef context) { - LoggerD("Enter"); JSValueRef onMessage = mLocalProperty.getProperty(context, BLUETOOTH_SOCKET_ONMESSAGE); if(onMessage == NULL) { LoggerD("onmessage is null"); @@ -161,8 +151,6 @@ MultiCallbackUserDataPtr BluetoothSocket::getOnClose() const JSValueRef BluetoothSocket::getOnClose(JSContextRef context) { - LoggerD("Enter"); - JSValueRef onClose = mLocalProperty.getProperty(context, BLUETOOTH_SOCKET_ONCLOSE); if(onClose == NULL) { LoggerD("onclose is null"); @@ -179,8 +167,6 @@ MultiCallbackUserDataPtr BluetoothSocket::getOnError() const JSValueRef BluetoothSocket::getOnError(JSContextRef context) { - LoggerD("Enter"); - JSValueRef onError = mLocalProperty.getProperty(context, BLUETOOTH_SOCKET_ONERROR); if(onError == NULL) { LoggerD("onerror is null"); @@ -192,8 +178,6 @@ JSValueRef BluetoothSocket::getOnError(JSContextRef context) unsigned long BluetoothSocket::writeData(char* data, unsigned long size) { - LoggerD("Enter"); - unsigned long ret = 0; if(bt_socket_send_data(mConnectedSocket, data, static_cast(size)) == BT_ERROR_NONE) { LoggerD("bt_socket_send_data() succeeded"); @@ -209,8 +193,6 @@ unsigned long BluetoothSocket::writeData(char* data, unsigned long size) void BluetoothSocket::storeRecivedData(char *data, unsigned long size) { - LoggerD("Enter"); - for(unsigned long i = 0; i < size; i++) { mReceivedData.push_back(static_cast(data[i])); } @@ -218,8 +200,6 @@ void BluetoothSocket::storeRecivedData(char *data, unsigned long size) std::vector BluetoothSocket::readData() { - LoggerD("Enter"); - std::vector result (mReceivedData); mReceivedData.clear(); @@ -228,8 +208,6 @@ std::vector BluetoothSocket::readData() void BluetoothSocket::close() { - LoggerD("Enter"); - if(!mIsConnected) { LoggerD("Already disconnected"); return; diff --git a/src/Bluetooth/JSBluetoothAdapter.cpp b/src/Bluetooth/JSBluetoothAdapter.cpp index 2eb1a7f..a6aa002 100644 --- a/src/Bluetooth/JSBluetoothAdapter.cpp +++ b/src/Bluetooth/JSBluetoothAdapter.cpp @@ -100,14 +100,12 @@ JSObjectRef JSBluetoothAdapter::createJSObject(JSContextRef context) 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, @@ -115,7 +113,6 @@ JSValueRef JSBluetoothAdapter::getProperty(JSContextRef context, JSStringRef propertyName, JSValueRef* exception) { - LoggerD("Enter"); try { if (JSStringIsEqualToUTF8CString(propertyName, BLUETOOTH_ADAPTER_NAME)) { std::string name = BluetoothAdapter::getInstance()->getName(); @@ -145,7 +142,6 @@ JSValueRef JSBluetoothAdapter::setName(JSContextRef context, const JSValueRef arguments[], JSValueRef* exception) { - LoggerD("Entered"); TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0); // Access Check @@ -193,7 +189,6 @@ JSValueRef JSBluetoothAdapter::setPowered(JSContextRef context, const JSValueRef arguments[], JSValueRef* exception) { - LoggerD("Entered"); TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0); // Access Check @@ -242,7 +237,6 @@ JSValueRef JSBluetoothAdapter::setVisible(JSContextRef context, const JSValueRef arguments[], JSValueRef* exception) { - LoggerD("Entered"); TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0); // Access Check @@ -294,7 +288,6 @@ JSValueRef JSBluetoothAdapter::discoverDevices(JSContextRef context, const JSValueRef arguments[], JSValueRef* exception) { - LoggerD("Entered"); TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0); // Access Check @@ -373,7 +366,6 @@ JSValueRef JSBluetoothAdapter::stopDiscovery(JSContextRef context, const JSValueRef arguments[], JSValueRef* exception) { - LoggerD("Entered"); TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0); // Access Check @@ -421,7 +413,6 @@ JSValueRef JSBluetoothAdapter::getKnownDevices(JSContextRef context, const JSValueRef arguments[], JSValueRef* exception) { - LoggerD("Entered"); TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0); // Access Check @@ -469,7 +460,6 @@ JSValueRef JSBluetoothAdapter::getDevice(JSContextRef context, const JSValueRef arguments[], JSValueRef* exception) { - LoggerD("Entered"); TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0); // Access Check @@ -518,7 +508,6 @@ JSValueRef JSBluetoothAdapter::createBonding(JSContextRef context, const JSValueRef arguments[], JSValueRef* exception) { - LoggerD("Entered"); TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0); // Access Check @@ -567,7 +556,6 @@ JSValueRef JSBluetoothAdapter::destroyBonding(JSContextRef context, const JSValueRef arguments[], JSValueRef* exception) { - LoggerD("Entered"); TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0); // Access Check @@ -616,7 +604,6 @@ JSValueRef JSBluetoothAdapter::registerRFCOMMServiceByUUID(JSContextRef context, const JSValueRef arguments[], JSValueRef* exception) { - LoggerD("Entered"); TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0); // Access Check diff --git a/src/Bluetooth/JSBluetoothClass.cpp b/src/Bluetooth/JSBluetoothClass.cpp index a80c3d2..e5d92a8 100644 --- a/src/Bluetooth/JSBluetoothClass.cpp +++ b/src/Bluetooth/JSBluetoothClass.cpp @@ -92,7 +92,6 @@ JSObjectRef JSBluetoothClass::createJSObject(JSContextRef context, BluetoothClas void JSBluetoothClass::initialize(JSContextRef context, JSObjectRef object) { - LoggerD("Enter"); // do nothing } @@ -139,7 +138,6 @@ JSValueRef JSBluetoothClass::hasService(JSContextRef context, const JSValueRef arguments[], JSValueRef* exception) { - LoggerD("Enter"); TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0); // Access Check @@ -160,9 +158,7 @@ JSValueRef JSBluetoothClass::hasService(JSContextRef context, 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)); diff --git a/src/Bluetooth/JSBluetoothClassDeviceMajor.cpp b/src/Bluetooth/JSBluetoothClassDeviceMajor.cpp index 84bc269..2e38412 100644 --- a/src/Bluetooth/JSBluetoothClassDeviceMajor.cpp +++ b/src/Bluetooth/JSBluetoothClassDeviceMajor.cpp @@ -86,13 +86,11 @@ JSObjectRef JSBluetoothClassDeviceMajor::createJSObject(JSContextRef context) void JSBluetoothClassDeviceMajor::initialize(JSContextRef context, JSObjectRef object) { - LoggerD("Enter"); // Do nothing } void JSBluetoothClassDeviceMajor::finalize(JSObjectRef object) { - LoggerD("Enter"); // Do nothing } diff --git a/src/Bluetooth/JSBluetoothClassDeviceMinor.cpp b/src/Bluetooth/JSBluetoothClassDeviceMinor.cpp index 33cbd68..d17729f 100644 --- a/src/Bluetooth/JSBluetoothClassDeviceMinor.cpp +++ b/src/Bluetooth/JSBluetoothClassDeviceMinor.cpp @@ -147,12 +147,12 @@ JSObjectRef JSBluetoothClassDeviceMinor::createJSObject(JSContextRef context) 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, diff --git a/src/Bluetooth/JSBluetoothClassDeviceService.cpp b/src/Bluetooth/JSBluetoothClassDeviceService.cpp index 592a4f8..cbf363b 100644 --- a/src/Bluetooth/JSBluetoothClassDeviceService.cpp +++ b/src/Bluetooth/JSBluetoothClassDeviceService.cpp @@ -85,12 +85,12 @@ JSObjectRef JSBluetoothClassDeviceService::createJSObject(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, diff --git a/src/Bluetooth/JSBluetoothDevice.cpp b/src/Bluetooth/JSBluetoothDevice.cpp index 38fb9e1..1bce7ca 100644 --- a/src/Bluetooth/JSBluetoothDevice.cpp +++ b/src/Bluetooth/JSBluetoothDevice.cpp @@ -97,7 +97,6 @@ JSObjectRef JSBluetoothDevice::createJSObject(JSContextRef context, BluetoothDev void JSBluetoothDevice::initialize(JSContextRef context, JSObjectRef object) { - LoggerD("Enter"); // Do nothing } @@ -156,7 +155,6 @@ JSValueRef JSBluetoothDevice::connectToServiceByUUID(JSContextRef context, const JSValueRef arguments[], JSValueRef* exception) { - LoggerD("Enter"); TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0); // Access Check diff --git a/src/Bluetooth/JSBluetoothManager.cpp b/src/Bluetooth/JSBluetoothManager.cpp index 9ddc5aa..1e16f16 100644 --- a/src/Bluetooth/JSBluetoothManager.cpp +++ b/src/Bluetooth/JSBluetoothManager.cpp @@ -147,7 +147,6 @@ JSValueRef JSBluetoothManager::getDefaultAdapter(JSContextRef context, const JSValueRef arguments[], JSValueRef* exception) { - LoggerD("Enter"); TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0); // Access Check diff --git a/src/Bluetooth/JSBluetoothServiceHandler.cpp b/src/Bluetooth/JSBluetoothServiceHandler.cpp index aacc633..8441df5 100644 --- a/src/Bluetooth/JSBluetoothServiceHandler.cpp +++ b/src/Bluetooth/JSBluetoothServiceHandler.cpp @@ -87,19 +87,16 @@ const JSClassDefinition* JSBluetoothServiceHandler::getClassInfo() JSObjectRef JSBluetoothServiceHandler::createJSObject(JSContextRef context, BluetoothServiceHandlerPtr service) { - LoggerD("Enter"); return JSObjectMake(context, getClassRef(), static_cast(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(JSObjectGetPrivate(object)); if (priv) { JSObjectSetPrivate(object, NULL); @@ -112,8 +109,6 @@ JSValueRef JSBluetoothServiceHandler::getProperty(JSContextRef context, JSStringRef propertyName, JSValueRef* exception) { - LoggerD("Enter"); - try { BluetoothServiceHandlerPtr priv = static_cast(JSObjectGetPrivate(object)); if (!priv) { @@ -145,8 +140,6 @@ bool JSBluetoothServiceHandler::setProperty(JSContextRef context, JSValueRef value, JSValueRef* exception) { - LoggerD("Enter"); - try { BluetoothServiceHandlerPtr priv = static_cast(JSObjectGetPrivate(object)); if (!priv) { @@ -190,7 +183,6 @@ JSValueRef JSBluetoothServiceHandler::unregister(JSContextRef context, const JSValueRef arguments[], JSValueRef* exception) { - LoggerD("Enter"); TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0); // Access Check diff --git a/src/Bluetooth/JSBluetoothSocket.cpp b/src/Bluetooth/JSBluetoothSocket.cpp index c467b25..dde2d03 100644 --- a/src/Bluetooth/JSBluetoothSocket.cpp +++ b/src/Bluetooth/JSBluetoothSocket.cpp @@ -98,7 +98,7 @@ JSObjectRef JSBluetoothSocket::createJSObject(JSContextRef context, BluetoothSoc void JSBluetoothSocket::initialize(JSContextRef context, JSObjectRef object) { - LoggerD("Enter"); // do nothing + // do nothing } void JSBluetoothSocket::finalize(JSObjectRef object) @@ -115,8 +115,6 @@ JSValueRef JSBluetoothSocket::getProperty(JSContextRef context, JSStringRef propertyName, JSValueRef* exception) { - LoggerD("Enter"); - try { BluetoothSocketPtr priv = static_cast(JSObjectGetPrivate(object)); if (!priv) { @@ -252,7 +250,6 @@ JSValueRef JSBluetoothSocket::writeData(JSContextRef context, const JSValueRef arguments[], JSValueRef* exception) { - LoggerD("Enter"); TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0); // Access Check @@ -298,7 +295,6 @@ JSValueRef JSBluetoothSocket::readData(JSContextRef context, const JSValueRef arguments[], JSValueRef* exception) { - LoggerD("Enter"); TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0); // Access Check @@ -336,7 +332,6 @@ JSValueRef JSBluetoothSocket::close(JSContextRef context, const JSValueRef arguments[], JSValueRef* exception) { - LoggerD("Enter"); TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0); // Access Check diff --git a/src/Calendar/CalendarConverter.cpp b/src/Calendar/CalendarConverter.cpp old mode 100644 new mode 100755 index 1c67755..eb02ba8 --- a/src/Calendar/CalendarConverter.cpp +++ b/src/Calendar/CalendarConverter.cpp @@ -565,8 +565,7 @@ JSValueRef CalendarConverter::toFunctionOrNull(const JSValueRef& arg) { 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; @@ -870,6 +869,9 @@ CalendarEventPtr CalendarConverter::toItem(const JSValueRef value, bool updateMo } else { ThrowMsg(ConversionException, "Wrong duration unit."); } + + result->getDuration()->length = length; + result->getDuration()->unit = unit; } if (!JSValueIsUndefined(m_context, locationData)) { diff --git a/src/Calendar/CalendarEvent.cpp b/src/Calendar/CalendarEvent.cpp old mode 100644 new mode 100755 index 3a328eb..4636f7b --- a/src/Calendar/CalendarEvent.cpp +++ b/src/Calendar/CalendarEvent.cpp @@ -28,6 +28,7 @@ CalendarEvent::CalendarEvent(): 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()), @@ -50,6 +51,7 @@ CalendarEvent::CalendarEvent(): m_calendarType(EVENT_TYPE), m_context(NULL) { + m_duration->length = UNDEFINED_TIME; } CalendarEvent::CalendarEvent(const CalendarEvent &original) @@ -63,6 +65,12 @@ 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() ); @@ -239,6 +247,16 @@ void CalendarEvent::setEndTime(long long int value) 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; diff --git a/src/Calendar/CalendarEvent.h b/src/Calendar/CalendarEvent.h index d25d1e8..c88737a 100755 --- a/src/Calendar/CalendarEvent.h +++ b/src/Calendar/CalendarEvent.h @@ -30,6 +30,7 @@ #include #include "SimpleCoordinates.h" +#include "DurationProperties.h" #include namespace DeviceAPI { @@ -122,6 +123,9 @@ class CalendarEvent 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); @@ -201,6 +205,7 @@ class CalendarEvent 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; diff --git a/src/Calendar/JSCalendarItemProperties.cpp b/src/Calendar/JSCalendarItemProperties.cpp index 7f2cca0..20bad95 100755 --- a/src/Calendar/JSCalendarItemProperties.cpp +++ b/src/Calendar/JSCalendarItemProperties.cpp @@ -806,16 +806,28 @@ JSValueRef JSCalendarItemProperties::getPropertyDuration(JSContextRef context, 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: "<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) { @@ -855,6 +867,9 @@ bool JSCalendarItemProperties::setPropertyDuration(JSContextRef context, return false; } + event->getDuration()->length = length; + event->getDuration()->unit = unit; + return true; } Catch(Exception) diff --git a/src/Callhistory/CallHistory.cpp b/src/Callhistory/CallHistory.cpp old mode 100644 new mode 100755 index bf0dc72..daf42b8 --- a/src/Callhistory/CallHistory.cpp +++ b/src/Callhistory/CallHistory.cpp @@ -74,16 +74,14 @@ CallHistory::~CallHistory() 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()); @@ -288,15 +286,12 @@ void CallHistory::removeListener(const long id) for (;it < CallHistory::m_watchers.end();) { - LoggerD("removeListener : id ["<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); @@ -306,7 +301,7 @@ void CallHistory::removeListener(const long id) } if (!flag) { - ThrowMsg(Commons::InvalidArgumentException, "Invalid values error : handle"); + ThrowMsg(Commons::InvalidArgumentException, "Invalid values"); } } @@ -327,7 +322,7 @@ bool CallHistory::parseRecord(contacts_list_h *recordList, CallHistoryEntryListP 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; @@ -350,7 +345,7 @@ bool CallHistory::parseRecord(contacts_list_h *recordList, CallHistoryEntryListP 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; } } @@ -444,7 +439,7 @@ void CallHistory::OnRequestReceived(const EventFindCallHistoryPtr& event) } if (ret != CONTACTS_ERROR_NONE) { - LoggerD("callhistory query error [" << ret << "]"); + LoggerD("callhistory invalid query statement"); } @@ -459,7 +454,7 @@ void CallHistory::OnRequestReceived(const EventFindCallHistoryPtr& event) 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)) { @@ -500,13 +495,13 @@ void CallHistory::OnRequestReceived(const EventRemoveBatchPtr& event) 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); } } @@ -548,14 +543,13 @@ void CallHistory::OnRequestReceived(const EventRemoveAllPtr& event) 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; @@ -571,13 +565,11 @@ void CallHistory::OnRequestReceived(const EventRemoveAllPtr& event) 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(event, this)); @@ -589,13 +581,13 @@ void CallHistory::OnRequestReceived(const EventRemoveAllPtr& event) 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); } } @@ -626,7 +618,6 @@ void CallHistory::callRemoveBatchEvent(int error, const EventRemoveBatchPtr &eve 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; } } @@ -644,7 +635,6 @@ void CallHistory::callRemoveAllEvent(int error, const EventRemoveAllPtr &event) 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; } } @@ -733,7 +723,6 @@ void CallHistory::Watcher::ListenerCB(char* changes) while( tokenType != NULL ) { tokenId = strtok( NULL, seps ); - LoggerD("[ %s / %s ]", tokenType , tokenId ); changeType = atoi((const char*)tokenType); changeId = atoi((const char*)tokenId); @@ -751,7 +740,7 @@ void CallHistory::Watcher::ListenerCB(char* changes) 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); @@ -759,7 +748,7 @@ void CallHistory::Watcher::ListenerCB(char* changes) contacts_list_destroy(recordList, true); contacts_query_destroy(query); contacts_filter_destroy(filter); - LoggerD("callhistory query error [" << ret << "]"); + LoggerD("Invalid callhistory query [" << ret << "]"); return; } diff --git a/src/Callhistory/CallHistoryFilter.cpp b/src/Callhistory/CallHistoryFilter.cpp old mode 100644 new mode 100755 index 45f2e3c..4b5b2c7 --- a/src/Callhistory/CallHistoryFilter.cpp +++ b/src/Callhistory/CallHistoryFilter.cpp @@ -43,30 +43,25 @@ CallHistoryFilter::~CallHistoryFilter() 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(); @@ -74,7 +69,6 @@ void CallHistoryFilter::visitPostComposite(FilterType& type, int depth) 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) @@ -86,7 +80,6 @@ void CallHistoryFilter::visitAttribute(std::string& attrName, MatchFlag& matchFl 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); @@ -216,7 +209,6 @@ void CallHistoryFilter::visitAttributeRange(std::string& attrName, AnyPtr& initi 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; @@ -245,7 +237,6 @@ void CallHistoryFilter::visitAttributeRange(std::string& attrName, AnyPtr& initi iValue = atoi(initialValue->getString().c_str()); } } - LoggerD("attrName [" << attrName << "] initialValue[" << initialValue->toString() << "] iValue[" << iValue << "]"); } if (!endValue->isNullOrUndefined()) { @@ -256,7 +247,6 @@ void CallHistoryFilter::visitAttributeRange(std::string& attrName, AnyPtr& initi eValue = atoi(endValue->getString().c_str()); } } - LoggerD("attrName [" << attrName << "] endValue[" << endValue->toString() << "] eValue[" << eValue << "]"); } contacts_filter_h subFilter = NULL; @@ -290,7 +280,6 @@ void CallHistoryFilter::visitAttributeRange(std::string& attrName, AnyPtr& initi contacts_filter_h CallHistoryFilter::getResult() const { - LoggerD("filter stack size [" << m_filterStack.size() << "]"); contacts_filter_h filter = m_filterStack.top(); return filter; } diff --git a/src/Callhistory/Converter.cpp b/src/Callhistory/Converter.cpp old mode 100644 new mode 100755 index e92d74c..9e2dcbe --- a/src/Callhistory/Converter.cpp +++ b/src/Callhistory/Converter.cpp @@ -184,7 +184,7 @@ EventCallHistoryListenerPrivateDataPtr LoggerD("onRemoved register"); } else { - ThrowMsg(Commons::ConversionException, "Type missmatch error : onremoved callback"); + ThrowMsg(Commons::ConversionException, "Type missmatch exception"); } } diff --git a/src/Callhistory/plugin_initializer.cpp b/src/Callhistory/plugin_initializer.cpp old mode 100644 new mode 100755 index a484085..85d7500 --- a/src/Callhistory/plugin_initializer.cpp +++ b/src/Callhistory/plugin_initializer.cpp @@ -33,7 +33,7 @@ using namespace WrtDeviceApis::Commons; 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); @@ -43,7 +43,7 @@ void on_widget_start_callback(int 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 { @@ -55,12 +55,12 @@ void on_widget_stop_callback(int widgetId) { 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(context)); DeviceAPI::CallHistory::CallHistoryListenerManagerSingleton::Instance().unregisterContext(static_cast(context)); diff --git a/src/Contact/ContactsSvcWrapper.cpp b/src/Contact/ContactsSvcWrapper.cpp index 30c5cdb..ef7b9ed 100755 --- a/src/Contact/ContactsSvcWrapper.cpp +++ b/src/Contact/ContactsSvcWrapper.cpp @@ -250,6 +250,7 @@ void ContactsSvcWrapper::loadAddressBooks() // create unified address book AddressBook *addressBook = new AddressBook(true); + addressBook->setId(-1); addressBook->setName("unified address book"); addressBook->setReadOnly(false); diff --git a/src/Contact/JSContact.cpp b/src/Contact/JSContact.cpp index 058b154..64ea5b9 100644 --- a/src/Contact/JSContact.cpp +++ b/src/Contact/JSContact.cpp @@ -196,8 +196,6 @@ JSObjectRef JSContact::constructor(JSContextRef context, const JSValueRef arguments[], JSValueRef* exception) { - LoggerD("entered"); - bool jsNoParam = false; bool js1stParamIsObject = false; bool js1stParamIsString = false; diff --git a/src/Contact/JSContactAddress.cpp b/src/Contact/JSContactAddress.cpp index 396d475..65e4d14 100755 --- a/src/Contact/JSContactAddress.cpp +++ b/src/Contact/JSContactAddress.cpp @@ -166,8 +166,6 @@ JSObjectRef JSContactAddress::constructor(JSContextRef context, const JSValueRef arguments[], JSValueRef* exception) { - LoggerD("entered"); - bool js1stParamIsObject = false; JSContactAddressPriv *priv = static_cast(JSObjectGetPrivate(constructor)); diff --git a/src/Contact/JSContactAnniversary.cpp b/src/Contact/JSContactAnniversary.cpp index ce89d5f..bb6ec4f 100644 --- a/src/Contact/JSContactAnniversary.cpp +++ b/src/Contact/JSContactAnniversary.cpp @@ -153,8 +153,6 @@ JSObjectRef JSContactAnniversary::constructor(JSContextRef context, const JSValueRef arguments[], JSValueRef* exception) { - LoggerD("entered"); - JSContactAnniversaryPriv *priv = static_cast(JSObjectGetPrivate(constructor)); if (!priv) { ThrowMsg(WrtDeviceApis::Commons::NullPointerException, "Private object is null"); diff --git a/src/Contact/JSContactEmailAddress.cpp b/src/Contact/JSContactEmailAddress.cpp index 086532d..a08a8d2 100755 --- a/src/Contact/JSContactEmailAddress.cpp +++ b/src/Contact/JSContactEmailAddress.cpp @@ -157,8 +157,6 @@ JSObjectRef JSContactEmailAddress::constructor(JSContextRef context, const JSValueRef arguments[], JSValueRef* exception) { - LoggerD("entered"); - JSContactEmailAddressPriv *priv = static_cast(JSObjectGetPrivate(constructor)); if (!priv) { ThrowMsg(WrtDeviceApis::Commons::NullPointerException, "Private object is null"); diff --git a/src/Contact/JSContactGroup.cpp b/src/Contact/JSContactGroup.cpp index d09c646..fa1479a 100644 --- a/src/Contact/JSContactGroup.cpp +++ b/src/Contact/JSContactGroup.cpp @@ -168,8 +168,6 @@ JSObjectRef JSContactGroup::constructor(JSContextRef context, const JSValueRef arguments[], JSValueRef* exception) { - LoggerD("entered"); - JSContactGroupPriv *priv = static_cast(JSObjectGetPrivate(constructor)); if (!priv) { ThrowMsg(WrtDeviceApis::Commons::NullPointerException, "Private object is null"); diff --git a/src/Contact/JSContactName.cpp b/src/Contact/JSContactName.cpp index 1419b54..7f33a0d 100644 --- a/src/Contact/JSContactName.cpp +++ b/src/Contact/JSContactName.cpp @@ -176,8 +176,6 @@ JSObjectRef JSContactName::constructor(JSContextRef context, const JSValueRef arguments[], JSValueRef* exception) { - LoggerD("entered"); - bool js1stParamIsObject = false; JSContactNamePriv *priv = static_cast(JSObjectGetPrivate(constructor)); diff --git a/src/Contact/JSContactOrganization.cpp b/src/Contact/JSContactOrganization.cpp index e8e00e4..457a7be 100644 --- a/src/Contact/JSContactOrganization.cpp +++ b/src/Contact/JSContactOrganization.cpp @@ -162,8 +162,6 @@ JSObjectRef JSContactOrganization::constructor(JSContextRef context, const JSValueRef arguments[], JSValueRef* exception) { - LoggerD("entered"); - bool js1stParamIsObject = false; JSContactOrganizationPriv *priv = static_cast(JSObjectGetPrivate(constructor)); diff --git a/src/Contact/JSContactPhoneNumber.cpp b/src/Contact/JSContactPhoneNumber.cpp index 95f4610..d28ceab 100755 --- a/src/Contact/JSContactPhoneNumber.cpp +++ b/src/Contact/JSContactPhoneNumber.cpp @@ -156,8 +156,6 @@ JSObjectRef JSContactPhoneNumber::constructor(JSContextRef context, const JSValueRef arguments[], JSValueRef* exception) { - LoggerD("entered"); - JSContactPhoneNumberPriv *priv = static_cast(JSObjectGetPrivate(constructor)); if (!priv) { ThrowMsg(WrtDeviceApis::Commons::NullPointerException, "Private object is null"); diff --git a/src/Contact/JSContactWebSite.cpp b/src/Contact/JSContactWebSite.cpp index a8bce26..36b49f3 100644 --- a/src/Contact/JSContactWebSite.cpp +++ b/src/Contact/JSContactWebSite.cpp @@ -154,8 +154,6 @@ JSObjectRef JSContactWebSite::constructor(JSContextRef context, const JSValueRef arguments[], JSValueRef* exception) { - LoggerD("entered"); - JSContactWebSitePriv *priv = static_cast(JSObjectGetPrivate(constructor)); if (!priv) { ThrowMsg(WrtDeviceApis::Commons::NullPointerException, "Private object is null"); diff --git a/src/Content/AudioLyricsUtil.cpp b/src/Content/AudioLyricsUtil.cpp old mode 100644 new mode 100755 index 2980dd0..d6292ca --- a/src/Content/AudioLyricsUtil.cpp +++ b/src/Content/AudioLyricsUtil.cpp @@ -30,7 +30,6 @@ namespace Content { 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..."); @@ -39,7 +38,6 @@ MediaLyricsUtil::MediaLyricsUtil() MediaLyricsUtil::~MediaLyricsUtil() { - LoggerD("entered "); if ( m_extractor && METADATA_EXTRACTOR_ERROR_NONE != metadata_extractor_destroy(m_extractor)) { LoggerD("Metadata extractor destory Fail..."); @@ -54,11 +52,6 @@ MediacontentLyricsPtr MediaLyricsUtil::fetchLyrics(string filepath) 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; @@ -66,11 +59,8 @@ MediacontentLyricsPtr MediaLyricsUtil::fetchLyrics(string filepath) 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; @@ -96,8 +86,6 @@ MediacontentLyricsPtr MediaLyricsUtil::fetchLyrics(string filepath) } else { - LoggerD("sync Lyrics Error. text num is 0"); - char* unSyncText = NULL; attr = METADATA_UNSYNCLYRICS; diff --git a/src/Content/ContentAudio.cpp b/src/Content/ContentAudio.cpp index 91fd7c8..24e6ce5 100755 --- a/src/Content/ContentAudio.cpp +++ b/src/Content/ContentAudio.cpp @@ -173,12 +173,6 @@ vector MediacontentAudio::getEditableAttr() const return m_editableAttrList; } -void MediacontentAudio::display() const -{ - - MediacontentMedia::display(); -} - void MediacontentAudio::appendAudioArtist(const string &value) { m_audioArtist.push_back(value); diff --git a/src/Content/ContentAudio.h b/src/Content/ContentAudio.h index cd98cd7..87181fa 100755 --- a/src/Content/ContentAudio.h +++ b/src/Content/ContentAudio.h @@ -87,8 +87,6 @@ class MediacontentAudio : public MediacontentMedia virtual vector getEditableAttr() const; - void display() const; - protected: string m_audioAlbum; vector m_audioArtist; diff --git a/src/Content/ContentController.cpp b/src/Content/ContentController.cpp old mode 100644 new mode 100755 index feb0370..2c058f5 --- a/src/Content/ContentController.cpp +++ b/src/Content/ContentController.cpp @@ -37,39 +37,34 @@ MediacontentManagerController::MediacontentManagerController(): 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(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; } @@ -82,12 +77,9 @@ void MediacontentManagerController::OnAnswerReceived(const IEventUpdateMediaItem void MediacontentManagerController::OnAnswerReceived(const IEventBrowseFolderPtr &event) { - - LoggerD("MediacontentManagerController::OnAnswerReceived:entered"); - JSCallbackManagerPtr cbm = DPL::StaticPointerCast(event->getPrivateData()); if (!cbm) - { + { LoggerE("no callback manager"); return; } @@ -95,7 +87,7 @@ void MediacontentManagerController::OnAnswerReceived(const IEventBrowseFolderPtr { MediaContentAsyncCallbackManagerSingleton::Instance().unregisterCallbackManager(cbm); if (event->getResult()) - { + { MediaConverterFactory::ConverterType converter = MediaConverterFactory::getConverter(cbm->getContext()); const std::vector &results = event->getMedia(); JSValueRef result = converter->toJSValueRef(results); @@ -103,11 +95,11 @@ void MediacontentManagerController::OnAnswerReceived(const IEventBrowseFolderPtr } 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) { @@ -119,20 +111,17 @@ void MediacontentManagerController::OnAnswerReceived(const IEventBrowseFolderPtr void MediacontentManagerController::OnAnswerReceived(const IEventFindFolderPtr &event) { - - LoggerD("MediacontentManagerController::OnAnswerReceived:entered"); - JSCallbackManagerPtr cbm = DPL::StaticPointerCast(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 &results = event->getFolder(); JSValueRef result = converter->toJSValueRef(results); @@ -140,11 +129,11 @@ void MediacontentManagerController::OnAnswerReceived(const IEventFindFolderPtr & } 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) { diff --git a/src/Content/ContentController.h b/src/Content/ContentController.h index 3288a26..1661816 100755 --- a/src/Content/ContentController.h +++ b/src/Content/ContentController.h @@ -43,11 +43,11 @@ class MediacontentManagerController : 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(); }; diff --git a/src/Content/ContentConverter.cpp b/src/Content/ContentConverter.cpp old mode 100644 new mode 100755 index bbe743e..2c080b7 --- a/src/Content/ContentConverter.cpp +++ b/src/Content/ContentConverter.cpp @@ -36,13 +36,12 @@ namespace Content { 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)) { @@ -54,7 +53,7 @@ JSValueRef MediaConverter::toFunctionOrNull(const JSValueRef& 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)) { @@ -112,12 +111,11 @@ JSValueRef MediaConverter::toJSValueRef(const MediacontentLyricsPtr &arg) MediacontentMediaListPtr MediaConverter::toVectorOfMediaItem(JSValueRef events) { - LoggerD("entered"); MediacontentMediaListPtr result(new MediacontentMediaList()); std::vector resultVector; JSObjectRef objArg = toJSObjectRef(events); - LoggerD("array length "< getEditableAttr() const; - protected: int m_imageWidth; int m_imageHeight; diff --git a/src/Content/ContentListener.cpp b/src/Content/ContentListener.cpp index 8cb4993..606c821 100755 --- a/src/Content/ContentListener.cpp +++ b/src/Content/ContentListener.cpp @@ -115,7 +115,6 @@ ContentListener::~ContentListener() { void ContentListener::oncontentadded(MediacontentMediaPtr content) { - LoggerI("ContentListener::oncontentadded is entered"); JSContextRef context = m_callback->getContext(); MediaConverterFactory::ConverterType converter = MediaConverterFactory::getConverter(context); @@ -125,7 +124,6 @@ void ContentListener::oncontentadded(MediacontentMediaPtr content) void ContentListener::oncontentupdated(MediacontentMediaPtr content) { - LoggerI("ContentListener::oncontentupdated is entered"); JSContextRef context = m_callback->getContext(); MediaConverterFactory::ConverterType converter = MediaConverterFactory::getConverter(context); @@ -136,7 +134,6 @@ void ContentListener::oncontentupdated(MediacontentMediaPtr content) void ContentListener::oncontentremoved(std::string id) { - LoggerI("ContentListener::oncontentremoved is entered"); JSContextRef context = m_callback->getContext(); MediaConverterFactory::ConverterType converter = MediaConverterFactory::getConverter(context); diff --git a/src/Content/ContentManager.cpp b/src/Content/ContentManager.cpp old mode 100644 new mode 100755 index 490d13c..5f8ef50 --- a/src/Content/ContentManager.cpp +++ b/src/Content/ContentManager.cpp @@ -39,62 +39,35 @@ int MediacontentManager::m_instanceCount = 0; 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) { @@ -160,7 +133,6 @@ void MediacontentManager::convertToPlatformFolder(media_folder_h media_folder, M { if ( tmpStr ) { - LoggerD("Folder UUID : " << tmpStr); newFolder->setFolderUUID(tmpStr); free(tmpStr); tmpStr = NULL; @@ -171,7 +143,6 @@ void MediacontentManager::convertToPlatformFolder(media_folder_h media_folder, M { if ( tmpStr ) { - LoggerD("Folder path : " << tmpStr); newFolder->setFolderPath(ContentUtility::convertPathToUri(tmpStr)); free(tmpStr); tmpStr = NULL; @@ -182,7 +153,6 @@ void MediacontentManager::convertToPlatformFolder(media_folder_h media_folder, M { if ( tmpStr ) { - LoggerD("Folder name : " << tmpStr); newFolder->setFolderName(tmpStr); free(tmpStr); tmpStr = NULL; @@ -191,13 +161,11 @@ void MediacontentManager::convertToPlatformFolder(media_folder_h media_folder, M 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 ) { @@ -226,14 +194,11 @@ void MediacontentManager::readCommonDataFromMediaInfo(media_info_h info, Mediaco 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; } @@ -244,7 +209,6 @@ void MediacontentManager::readCommonDataFromMediaInfo(media_info_h info, Mediaco if (tmpStr) { newMedia->setMimeType(tmpStr); - LoggerD("MineType : " << tmpStr); free(tmpStr); tmpStr = NULL; } @@ -255,7 +219,6 @@ void MediacontentManager::readCommonDataFromMediaInfo(media_info_h info, Mediaco if (tmpStr) { newMedia->setDisplayName(tmpStr); - LoggerD("Display Name : " << tmpStr); free(tmpStr); tmpStr = NULL; } @@ -266,7 +229,6 @@ void MediacontentManager::readCommonDataFromMediaInfo(media_info_h info, Mediaco if (tmpStr) { newMedia->setFilePath(ContentUtility::convertPathToUri(tmpStr)); - LoggerD("Path : " << newMedia->getFilePath()); free(tmpStr); tmpStr = NULL; } @@ -277,7 +239,6 @@ void MediacontentManager::readCommonDataFromMediaInfo(media_info_h info, Mediaco if (tmpStr) { newMedia->setThumbnailPath(ContentUtility::convertPathToUri(tmpStr)); - LoggerD("Thumnail Path : " << newMedia->getThumbnailPath()); free(tmpStr); tmpStr = NULL; } @@ -288,7 +249,6 @@ void MediacontentManager::readCommonDataFromMediaInfo(media_info_h info, Mediaco if (tmpStr) { newMedia->setDescription(tmpStr); - LoggerD("Description : " << tmpStr); free(tmpStr); tmpStr = NULL; } @@ -306,19 +266,16 @@ void MediacontentManager::readCommonDataFromMediaInfo(media_info_h info, Mediaco 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); } } @@ -349,7 +306,6 @@ void MediacontentManager::readImageFromMediaInfo( media_info_h info, Mediaconten LogError( "Couldn't convert supplied date."); } - LoggerD("image_meta_get_date_taken : " << tmpStr); //time?? newImage->setReleasedDate(result); free(tmpStr); tmpStr = NULL; @@ -360,7 +316,6 @@ void MediacontentManager::readImageFromMediaInfo( media_info_h info, Mediaconten if( tmpStr ) { newImage->setTitle(tmpStr); - LoggerD(" Image Title: " << tmpStr); free(tmpStr); tmpStr = NULL; } @@ -369,25 +324,21 @@ void MediacontentManager::readImageFromMediaInfo( media_info_h info, Mediaconten 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; @@ -426,7 +377,6 @@ void MediacontentManager::readImageFromMediaInfo( media_info_h info, Mediaconten } newImage->setImageOrientation(orientationStr); - LoggerD(" image Orientation. " << orientationStr); } @@ -475,7 +425,6 @@ void MediacontentManager::readVideoFromMediaInfo( media_info_h info, Mediaconten } newVideo->setReleasedDate(result); - LoggerD("audio_meta_get_recorded_date : " << tmpStr); free(tmpStr); tmpStr = NULL; } @@ -486,7 +435,6 @@ void MediacontentManager::readVideoFromMediaInfo( media_info_h info, Mediaconten if( tmpStr ) { newVideo->setVideoAlbum(tmpStr); - LoggerD(" Video Album. " << tmpStr); free(tmpStr); tmpStr = NULL; } @@ -497,7 +445,6 @@ void MediacontentManager::readVideoFromMediaInfo( media_info_h info, Mediaconten if( tmpStr ) { newVideo->setTitle(tmpStr); - LoggerD(" Video Title. " << tmpStr); free(tmpStr); tmpStr = NULL; } @@ -511,7 +458,6 @@ void MediacontentManager::readVideoFromMediaInfo( media_info_h info, Mediaconten for( unsigned int i=0; i < artists.size(); i++) { string artist = artists.at(i); - LoggerD("Audio artist: " << artist); newVideo->appendVideoArtist(artist); } @@ -590,7 +536,6 @@ void MediacontentManager::readMusicFromMediaInfo( media_info_h info, Mediaconten } newAudio->setReleasedDate(result); - LoggerD("audio_meta_get_recorded_date : " << tmpStr); free(tmpStr); tmpStr = NULL; } @@ -601,7 +546,6 @@ void MediacontentManager::readMusicFromMediaInfo( media_info_h info, Mediaconten if (tmpStr) { newAudio->setTitle(tmpStr); - LoggerD("Audio Title : " << tmpStr); free(tmpStr); tmpStr = NULL; } @@ -612,7 +556,6 @@ void MediacontentManager::readMusicFromMediaInfo( media_info_h info, Mediaconten if (tmpStr) { newAudio->setAudioAlbum(tmpStr); - LoggerD("Audio Album : " << tmpStr); free(tmpStr); tmpStr = NULL; } @@ -626,7 +569,6 @@ void MediacontentManager::readMusicFromMediaInfo( media_info_h info, Mediaconten for( unsigned int i=0; i < artists.size(); i++) { string artist = artists.at(i); - LoggerD("Audio artist: " << artist); newAudio->appendAudioArtist(artist); } @@ -643,7 +585,6 @@ void MediacontentManager::readMusicFromMediaInfo( media_info_h info, Mediaconten for( unsigned int i=0; i < composers.size(); i++) { string composer = composers.at(i); - LoggerD("Audio Composer : " << composer); newAudio->appendAudioComposer(composer); } @@ -655,7 +596,6 @@ void MediacontentManager::readMusicFromMediaInfo( media_info_h info, Mediaconten 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) ) @@ -663,7 +603,6 @@ void MediacontentManager::readMusicFromMediaInfo( media_info_h info, Mediaconten if (tmpStr) { newAudio->setAudioCopyright(tmpStr); - LoggerD("Audio CopyRight: " << tmpStr); free(tmpStr); tmpStr = NULL; } @@ -674,7 +613,6 @@ void MediacontentManager::readMusicFromMediaInfo( media_info_h info, Mediaconten int trackNum = 0; if (tmpStr) { - LoggerD("trackNum: " << tmpStr); try { istringstream(tmpStr) >> trackNum; } catch (...) { @@ -690,13 +628,11 @@ void MediacontentManager::readMusicFromMediaInfo( media_info_h info, Mediaconten 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) ) @@ -708,7 +644,6 @@ void MediacontentManager::readMusicFromMediaInfo( media_info_h info, Mediaconten for( unsigned int i=0; i < genres.size(); i++) { string genre = genres.at(i); - LoggerD("Audio Genre: " << genre); newAudio->appendAudioGenre(genre); } @@ -742,16 +677,12 @@ void MediacontentManager::readMusicFromMediaInfo( media_info_h info, Mediaconten //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); } @@ -760,7 +691,6 @@ bool MediacontentManager::mediaFolderCallback(media_folder_h folder, void *user_ { LoggerD("user data is NULL"); } - return true; } @@ -803,9 +733,9 @@ bool MediacontentManager::mediaItemCallback(media_info_h info, void* user_data) } } - else + else { - LoggerD("event is NULL"); + LoggerD("event is NULL"); } return true; @@ -813,8 +743,6 @@ bool MediacontentManager::mediaItemCallback(media_info_h info, void* user_data) void MediacontentManager::OnRequestReceived(const IEventFindFolderPtr &eFolder) { - LoggerD("entered"); - if ( MEDIA_CONTENT_ERROR_NONE != media_folder_foreach_folder_from_db (NULL, mediaFolderCallback, eFolder.Get())) { @@ -825,13 +753,10 @@ void MediacontentManager::OnRequestReceived(const IEventFindFolderPtr &eFolder) { 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; @@ -861,7 +786,6 @@ void MediacontentManager::OnRequestReceived(const IEventBrowseFolderPtr &eBrowse jsFilter->travel(IVisitor); condition = visitor->getResult(); - LoggerD("execute condition [" << condition << "]"); media_filter_set_condition(filter, condition.c_str(), MEDIA_CONTENT_COLLATE_DEFAULT ); //set condition } @@ -875,7 +799,6 @@ void MediacontentManager::OnRequestReceived(const IEventBrowseFolderPtr &eBrowse { string attriName = attr->getAttributeName(); attriName = visitor->getPlatformAttr(attriName); - LoggerD("Attribute Name [" << attriName << "]"); if (attriName.compare("") != 0) { @@ -900,21 +823,17 @@ void MediacontentManager::OnRequestReceived(const IEventBrowseFolderPtr &eBrowse 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)) @@ -935,7 +854,6 @@ void MediacontentManager::OnRequestReceived(const IEventBrowseFolderPtr &eBrowse 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())) @@ -987,7 +905,6 @@ bool MediacontentManager::updateMediaToDB(MediacontentMediaPtr mediaPtr) string type = mediaPtr->getMediaType(); //media type. string mediaId = mediaPtr->getMediaUUID(); - LoggerD("MediaId : " << mediaId); media_info_h media = NULL; bool ret = true; @@ -1087,40 +1004,6 @@ bool MediacontentManager::updateMediaToDB(MediacontentMediaPtr mediaPtr) 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()) ) @@ -1171,57 +1054,6 @@ bool MediacontentManager::updateMediaToDB(MediacontentMediaPtr mediaPtr) 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"); @@ -1263,7 +1095,6 @@ bool MediacontentManager::updateMediaToDB(MediacontentMediaPtr mediaPtr) void MediacontentManager::OnRequestReceived(const IEventUpdateMediaPtr &eMedia) { - LoggerD("OnRequestReceived::IEventUpdateMediaPtr entered"); try { MediacontentMediaPtr mediaPtr = eMedia->getMediaItem(); @@ -1271,7 +1102,6 @@ void MediacontentManager::OnRequestReceived(const IEventUpdateMediaPtr &eMedia) if(updateMediaToDB(mediaPtr)) { eMedia->setResult(true); - LoggerD("update success"); } else { @@ -1289,15 +1119,13 @@ void MediacontentManager::OnRequestReceived(const IEventUpdateMediaPtr &eMedia) 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; isize(); i++) @@ -1322,9 +1150,7 @@ void MediacontentManager::OnRequestReceived(const IEventUpdateMediaItemsPtr &eIt { LogError("Exception: " << ex.DumpToString()); eItems->setResult(false); - } - //eItems->setCancelAllowed(false); - + } } } diff --git a/src/Content/ContentMedia.cpp b/src/Content/ContentMedia.cpp old mode 100644 new mode 100755 index 7c4f1fc..cabe729 --- a/src/Content/ContentMedia.cpp +++ b/src/Content/ContentMedia.cpp @@ -68,7 +68,6 @@ void MediacontentMedia::setMediaUUID(const string &value) string MediacontentMedia::getMimeType() { - LoggerD("MediacontentMedia::getMimeType"); return m_mimeType; } @@ -174,23 +173,6 @@ void MediacontentMedia::setMediaType(const string &value) 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; diff --git a/src/Content/ContentMedia.h b/src/Content/ContentMedia.h index 069d740..ca5de01 100755 --- a/src/Content/ContentMedia.h +++ b/src/Content/ContentMedia.h @@ -87,7 +87,6 @@ class MediacontentMedia virtual void setSize(unsigned long long value); virtual void setRating(int value, bool isChanged=false); - void display() const; virtual vector getEditableAttr() const; private: diff --git a/src/Content/ContentSearchVisitor.cpp b/src/Content/ContentSearchVisitor.cpp old mode 100644 new mode 100755 index 24bb29d..fb363f6 --- a/src/Content/ContentSearchVisitor.cpp +++ b/src/Content/ContentSearchVisitor.cpp @@ -119,8 +119,6 @@ string MediaSearchVisitor::getPlatformAttr(string attrName) { string platformAttr; map::iterator pos; - LoggerD("attrName=" << attrName); - LoggerD("queryType=" << queryType); if( queryType == QUERY_FOLDER) { @@ -170,10 +168,6 @@ string MediaSearchVisitor::toDateDbStr(tm &date) const 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(); } @@ -218,9 +212,6 @@ string MediaSearchVisitor::convertAttribute(string &attrName, AnyPtr& matchValue } else { - //STARTSWITH('%, ENDSWITH, EXISTS - //valueStr = matchValue->getString(); - ostringstream os; if(matchFlag == MATCH_STARTSWITH) diff --git a/src/Content/ContentVideo.cpp b/src/Content/ContentVideo.cpp old mode 100644 new mode 100755 index 40133e1..7cb34c7 --- a/src/Content/ContentVideo.cpp +++ b/src/Content/ContentVideo.cpp @@ -143,19 +143,5 @@ vector MediacontentVideo::getEditableAttr() const 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(); -} - } } diff --git a/src/Content/ContentVideo.h b/src/Content/ContentVideo.h index c4f210d..e99b4d5 100755 --- a/src/Content/ContentVideo.h +++ b/src/Content/ContentVideo.h @@ -60,8 +60,6 @@ class MediacontentVideo : public MediacontentMedia virtual vector getEditableAttr() const; - void display() const; - private: double m_videoLongitude; double m_videoLatitude; diff --git a/src/Content/IContentManager.cpp b/src/Content/IContentManager.cpp old mode 100644 new mode 100755 index cbd5e99..df69d90 --- a/src/Content/IContentManager.cpp +++ b/src/Content/IContentManager.cpp @@ -46,25 +46,21 @@ IMediacontentManager::~IMediacontentManager() void IMediacontentManager::findFolder(IEventFindFolderPtr &ptr) { - LoggerD("IMediacontentManager::called findFolders"); WrtDeviceApis::Commons::EventRequestReceiver::PostRequest(ptr); } void IMediacontentManager::updateMedia(IEventUpdateMediaPtr &ptr) { - LoggerD("IMediacontentManager::called updateMedia"); WrtDeviceApis::Commons::EventRequestReceiver::PostRequest(ptr); } void IMediacontentManager::browseFolder(IEventBrowseFolderPtr &ptr) { - LoggerD("IMediacontentManager::called IEventBrowseFolder"); WrtDeviceApis::Commons::EventRequestReceiver::PostRequest(ptr); } void IMediacontentManager::updateMediaItems(IEventUpdateMediaItemsPtr &ptr) { - LoggerD("IMediacontentManager::called IEventBrowseFolder"); WrtDeviceApis::Commons::EventRequestReceiver::PostRequest(ptr); } @@ -80,8 +76,6 @@ struct scanCallbackData static gboolean _scan_file_completed_cb(void *user_data) { - LoggerD("called _scan_file_completed_cb:"); - scanCallbackData *data = static_cast(user_data); if(data != NULL) @@ -125,21 +119,16 @@ static gboolean _scan_file_completed_cb(void *user_data) static void _scan_file_thread(void *user_data, Ecore_Thread *thread){ - LoggerD("_scan_file_thread::called"); scanCallbackData *data = static_cast(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; @@ -159,7 +148,6 @@ bool IMediacontentManager::scanFile(scanCompletedCallback callback, std::string 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) ) { @@ -196,138 +184,132 @@ static void content_notification_cb( void *user_data) { - ContentListener *listener = static_cast(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(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; } diff --git a/src/Content/IEventUpdate.h b/src/Content/IEventUpdate.h old mode 100644 new mode 100755 index 94a8efc..5355d92 --- a/src/Content/IEventUpdate.h +++ b/src/Content/IEventUpdate.h @@ -31,24 +31,22 @@ namespace Content { class IEventUpdateMedia : public WrtDeviceApis::Commons::IEvent { - 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) @@ -60,9 +58,9 @@ class IEventUpdateMedia : public WrtDeviceApis::Commons::IEvent IEventUpdateMediaPtr; diff --git a/src/Content/IEventUpdateBatch.h b/src/Content/IEventUpdateBatch.h old mode 100644 new mode 100755 index e055a12..0c9eb55 --- a/src/Content/IEventUpdateBatch.h +++ b/src/Content/IEventUpdateBatch.h @@ -32,12 +32,11 @@ namespace Content { class IEventUpdateMediaItems : public WrtDeviceApis::Commons::IEvent { - public: - IEventUpdateMediaItems():m_result(false) + public: + IEventUpdateMediaItems():m_result(false) { - LoggerD("entered"); } - virtual ~IEventUpdateMediaItems(){} + virtual ~IEventUpdateMediaItems(){} void setResult(bool value) { @@ -59,9 +58,9 @@ class IEventUpdateMediaItems : public WrtDeviceApis::Commons::IEvent IEventUpdateMediaItemsPtr; diff --git a/src/Content/JSAudio.cpp b/src/Content/JSAudio.cpp old mode 100644 new mode 100755 index 8a48a29..b29a84b --- a/src/Content/JSAudio.cpp +++ b/src/Content/JSAudio.cpp @@ -86,7 +86,6 @@ JSClassRef JSAudio::m_jsClassRef = JSClassCreate(JSAudio::getClassInfo()); void JSAudio::initialize(JSContextRef context, JSObjectRef object) { - LoggerD( "entered" ); AudioPrivObject *priv = static_cast( JSObjectGetPrivate( object ) ); if (!priv) { @@ -102,23 +101,20 @@ void JSAudio::initialize(JSContextRef context, JSObjectRef object) void JSAudio::finalize(JSObjectRef object) { - LoggerD( "entered" ); - AudioPrivObject *priv = static_cast( JSObjectGetPrivate( object ) ) ; - if (priv != NULL) - { - delete (priv); - priv = NULL; - JSObjectSetPrivate(object, NULL); - } + AudioPrivObject *priv = static_cast( 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; } @@ -131,7 +127,6 @@ const JSClassDefinition* JSAudio::getClassInfo() MediacontentAudioPtr JSAudio::getAudioObject(JSObjectRef object) { - LoggerD("entered"); AudioPrivObject *priv = static_cast(JSObjectGetPrivate(object)); if(!priv) { @@ -151,7 +146,6 @@ JSValueRef JSAudio::getPropertyAlbum( JSStringRef propertyName, JSValueRef* exception) { - LoggerD("entered"); Try { Converter converter(context); @@ -173,7 +167,6 @@ JSValueRef JSAudio::getPropertyArtist( JSStringRef propertyName, JSValueRef* exception) { - LoggerD("getPropertyArtist::entered"); Try { Converter converter(context); @@ -185,7 +178,6 @@ JSValueRef JSAudio::getPropertyArtist( } 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"); @@ -209,7 +201,6 @@ JSValueRef JSAudio::getPropertyGenre( JSStringRef propertyName, JSValueRef* exception) { - LoggerD("getPropertyGenre::entered"); Try { Converter converter(context); @@ -245,7 +236,6 @@ JSValueRef JSAudio::getPropertyComposer( JSStringRef propertyName, JSValueRef* exception) { - LoggerD("getPropertyComposer::entered"); Try { Converter converter(context); @@ -278,7 +268,6 @@ JSValueRef JSAudio::getPropertyCopyright( JSStringRef propertyName, JSValueRef* exception) { - LoggerD("entered"); Try { Converter converter(context); @@ -300,10 +289,9 @@ JSValueRef JSAudio::getPropertyLyrics( JSStringRef propertyName, JSValueRef* exception) { - LoggerD("entered"); Try { - MediaConverterFactory::ConverterType converter = MediaConverterFactory::getConverter(context); + MediaConverterFactory::ConverterType converter = MediaConverterFactory::getConverter(context); AudioPrivObject *priv = static_cast(JSObjectGetPrivate(object)); if(!priv) @@ -318,9 +306,6 @@ JSValueRef JSAudio::getPropertyLyrics( JSContextRef globalContext = priv->getContext(); - //check lyrics state - LoggerD("lyrics state : " << audio->getLyricsState()); - if ( CONTENT_LYRIC_UNKNOWN == audio->getLyricsState() || CONTENT_LYRIC_EXISTENT == audio->getLyricsState() ) { @@ -342,14 +327,12 @@ JSValueRef JSAudio::getPropertyLyrics( 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(); } } @@ -369,7 +352,6 @@ JSValueRef JSAudio::getPropertyBitrate( JSStringRef propertyName, JSValueRef* exception) { - LoggerD("entered"); Try { Converter converter(context); @@ -389,7 +371,6 @@ JSValueRef JSAudio::getPropertyTrackNum( JSStringRef propertyName, JSValueRef* exception) { - LoggerD("entered"); Try { Converter converter(context); @@ -409,7 +390,6 @@ JSValueRef JSAudio::getPropertyDuration( JSStringRef propertyName, JSValueRef* exception) { - LoggerD("entered"); Try { Converter converter(context); @@ -429,7 +409,6 @@ JSValueRef JSAudio::getPropertySize( JSStringRef propertyName, JSValueRef* exception) { - LoggerD("entered"); Try { Converter converter(context); @@ -451,7 +430,6 @@ bool JSAudio::setPropertyAlbum( JSValueRef value, JSValueRef* exception) { - LoggerD("entered"); Try { Converter converter(context); @@ -478,7 +456,6 @@ bool JSAudio::setPropertyArtist( JSValueRef value, JSValueRef* exception) { - LoggerD("entered"); Try { Converter converter(context); @@ -526,7 +503,6 @@ bool JSAudio::setPropertyComposer( JSValueRef value, JSValueRef* exception) { - LoggerD("entered"); Try { Converter converter(context); @@ -555,7 +531,6 @@ bool JSAudio::setPropertyComposer( } Catch(Exception) { - LoggerW("trying to set incorrect value"); return DeviceAPI::Common::JSTizenExceptionFactory::postException(context, exception, DeviceAPI::Common::JSTizenException::TYPE_MISMATCH_ERROR); } @@ -569,7 +544,6 @@ bool JSAudio::setPropertyGenre( JSValueRef value, JSValueRef* exception) { - LoggerD("entered"); Try { Converter converter(context); @@ -613,7 +587,6 @@ bool JSAudio::setPropertyTrackNumber( JSValueRef value, JSValueRef* exception) { - LoggerD("entered"); Try { Converter converter(context); diff --git a/src/Content/JSAudioLyrics.cpp b/src/Content/JSAudioLyrics.cpp old mode 100644 new mode 100755 index c2ee428..f481698 --- a/src/Content/JSAudioLyrics.cpp +++ b/src/Content/JSAudioLyrics.cpp @@ -66,33 +66,29 @@ JSClassRef JSMediaLyrics::m_jsClassRef = JSClassCreate(JSMediaLyrics::getClassIn void JSMediaLyrics::initialize(JSContextRef context, JSObjectRef object) { - LoggerD( "entered" ); LyricsPrivObject *priv = static_cast( JSObjectGetPrivate( object ) ); if (!priv) { MediacontentLyricsPtr privateData(new MediacontentLyrics()); priv = new LyricsPrivObject(context, privateData); JSObjectSetPrivate(object, static_cast(priv)); - LoggerD("private object is created"); } else - { + { LoggerD("private object already exists"); } } void JSMediaLyrics::finalize(JSObjectRef object) { - LoggerD( "entered" ); LyricsPrivObject *priv = static_cast( JSObjectGetPrivate( object ) ) ; delete priv; } const JSClassRef JSMediaLyrics::getClassRef() { - LoggerD("JSMediaLyrics::getClassRef()"); if (!m_jsClassRef) - { + { m_jsClassRef = JSClassCreate(&m_classInfo); } return m_jsClassRef; @@ -105,15 +101,14 @@ const JSClassDefinition* JSMediaLyrics::getClassInfo() MediacontentLyricsPtr JSMediaLyrics::getLyricsObject(JSObjectRef object) { - LoggerD("entered"); LyricsPrivObject *priv = static_cast(JSObjectGetPrivate(object)); if(!priv) - { + { ThrowMsg(NullPointerException, "Private object is null"); } MediacontentLyricsPtr result = priv->getObject(); if (!result) - { + { ThrowMsg(NullPointerException, "Private object is null"); } return result; @@ -126,11 +121,9 @@ JSValueRef JSMediaLyrics::getPropertyLyricsType( JSStringRef propertyName, JSValueRef* exception) { - LoggerD("entered"); Try { - Converter converter(context); - + Converter converter(context); MediacontentLyricsPtr lyrics = getLyricsObject(object); return converter.toJSValueRef(lyrics->getMediaLyricsType()); @@ -150,36 +143,33 @@ JSValueRef JSMediaLyrics::getPropertyTimeStamps( 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 timeStamps = lyrics->getMediaLyricsTimeStamps(); + JSObjectRef jsResult = JSCreateArrayObject(context, 0, NULL); + vector 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 texts = lyrics->getMediaLyricsTexts(); - if(texts.size() >0) - { - if (NULL == jsResult) - { + JSObjectRef jsResult = JSCreateArrayObject(context, 0, NULL); + vector texts = lyrics->getMediaLyricsTexts(); + if(texts.size() >0) + { + if (NULL == jsResult) + { ThrowMsg(NullPointerException, "Could not create js array object"); } for(unsigned int i=0; i( JSObjectGetPrivate( object ) ); if (!priv) { MediacontentMediaPtr privateData(new MediacontentMedia()); priv = new MediaPrivObject(context, privateData); JSObjectSetPrivate(object, static_cast(priv)); - LoggerD("new event is created" ); } else - { + { LoggerD("private object already exists"); } } void JSMedia::finalize(JSObjectRef object) { - LoggerD( "entered" ); MediaPrivObject *priv = static_cast( 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; } @@ -133,15 +128,14 @@ const JSClassDefinition* JSMedia::getClassInfo() MediacontentMediaPtr JSMedia::getMediaObject(JSObjectRef object) { - LoggerD("entered"); MediaPrivObject *priv = static_cast(JSObjectGetPrivate(object)); if(!priv) - { + { ThrowMsg(NullPointerException, "Private object is null"); } MediacontentMediaPtr result = priv->getObject(); if (!result) - { + { ThrowMsg(NullPointerException, "Private object is null"); } return result; @@ -153,12 +147,10 @@ JSValueRef JSMedia::getPropertyId( JSStringRef propertyName, JSValueRef* exception) { - LoggerD("entered"); Try { Converter converter(context); MediacontentMediaPtr media = getMediaObject(object); - return converter.toJSValueRef(media->getMediaUUID()); } Catch(Exception) @@ -175,7 +167,6 @@ JSValueRef JSMedia::getPropertyMimeType( JSStringRef propertyName, JSValueRef* exception) { - LoggerD("entered"); Try { Converter converter(context); @@ -197,12 +188,10 @@ JSValueRef JSMedia::getPropertyDisplayName( JSStringRef propertyName, JSValueRef* exception) { - LoggerD("getPropertyDisplayName::entered"); Try { Converter converter(context); MediacontentMediaPtr media = getMediaObject(object); - LoggerD("getDisplayName:"<getDisplayName()); return converter.toJSValueRef(media->getDisplayName()); } Catch(Exception) @@ -218,12 +207,10 @@ JSValueRef JSMedia::getPropertyTitle( JSStringRef propertyName, JSValueRef* exception) { - LoggerD("getPropertyDisplayName::entered"); Try { Converter converter(context); MediacontentMediaPtr media = getMediaObject(object); - LoggerD("getTitle:"<getTitle()); return converter.toJSValueRef(media->getTitle()); } Catch(Exception) @@ -240,7 +227,6 @@ JSValueRef JSMedia::getPropertyFilePath( JSStringRef propertyName, JSValueRef* exception) { - LoggerD("entered"); Try { Converter converter(context); @@ -261,7 +247,6 @@ JSValueRef JSMedia::getPropertyThumbnailPath( JSStringRef propertyName, JSValueRef* exception) { - LoggerD("entered"); Try { Converter converter(context); @@ -292,7 +277,6 @@ JSValueRef JSMedia::getPropertyDescription( JSStringRef propertyName, JSValueRef* exception) { - LoggerD("getPropertyDescription::entered"); Try { Converter converter(context); @@ -316,7 +300,6 @@ JSValueRef JSMedia::getPropertyModifiedDate( JSStringRef propertyName, JSValueRef* exception) { - LoggerD("entered"); Try { Converter converter(context); @@ -339,7 +322,6 @@ JSValueRef JSMedia::getPropertyReleasedDate( JSStringRef propertyName, JSValueRef* exception) { - LoggerD("entered"); Try { Converter converter(context); @@ -364,7 +346,6 @@ JSValueRef JSMedia::getPropertyRating( JSStringRef propertyName, JSValueRef* exception) { - LoggerD("entered"); Try { Converter converter(context); @@ -384,7 +365,6 @@ JSValueRef JSMedia::getPropertyType( JSStringRef propertyName, JSValueRef* exception) { - LoggerD("getPropertyType::entered"); Try { Converter converter(context); @@ -405,14 +385,12 @@ JSValueRef JSMedia::getPropertySize( 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) { @@ -431,30 +409,30 @@ JSValueRef JSMedia::getPropertyEditableAttr( { Try { - Converter converter(context); - MediacontentMediaPtr media = getMediaObject(object); - vector 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 = media->getEditableAttr(); + JSObjectRef jsResult = JSCreateArrayObject(context, 0, NULL); + + if (NULL == jsResult) + { + ThrowMsg(NullPointerException, "Could not create js array object"); + } + for(unsigned int i=0; igetRating() != rating) { objMedia->setRating(rating, true); @@ -505,15 +478,12 @@ bool JSMedia::setPropertyDisplayName( 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); @@ -537,15 +507,12 @@ bool JSMedia::setPropertyDescription( 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); diff --git a/src/Content/JSContentManager.cpp b/src/Content/JSContentManager.cpp old mode 100644 new mode 100755 index 24c6e72..fd24299 --- a/src/Content/JSContentManager.cpp +++ b/src/Content/JSContentManager.cpp @@ -114,8 +114,7 @@ JSValueRef JSMediacontentManager::getFolders( 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(JSObjectGetPrivate(thisObject)); @@ -204,8 +203,8 @@ JSValueRef JSMediacontentManager::findItems( 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(JSObjectGetPrivate(thisObject)); @@ -347,8 +346,7 @@ JSValueRef JSMediacontentManager::updateItemsBatch(JSContextRef context, 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(JSObjectGetPrivate(thisObject)); if(!privateObject) { @@ -453,8 +451,8 @@ JSValueRef JSMediacontentManager::updateItem( 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(JSObjectGetPrivate(thisObject)); @@ -580,8 +578,7 @@ JSValueRef JSMediacontentManager::scanFile( 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(JSObjectGetPrivate(thisObject)); @@ -668,8 +665,7 @@ JSValueRef JSMediacontentManager::setChangeListener( 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(JSObjectGetPrivate(thisObject)); @@ -711,8 +707,7 @@ JSValueRef JSMediacontentManager::unsetChangeListener( 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(JSObjectGetPrivate(thisObject)); if(!privateObject) { @@ -757,11 +752,9 @@ const JSClassDefinition* JSMediacontentManager::getClassInfo() void JSMediacontentManager::initialize(JSContextRef context, JSObjectRef object) { - LoggerD("JSContentManager initialize entered"); MediacontentManagerPrivObject *privateObject = static_cast(JSObjectGetPrivate(object)); if (NULL == privateObject) { - LoggerD("Create ContenttManagerPrivObject"); IMediacontentManagerPtr contentManager = MediacontentFactory::getInstance().createMediacontentManagerObject(); privateObject = new MediacontentManagerPrivObject(context, contentManager); if (!JSObjectSetPrivate(object, static_cast(privateObject))) @@ -774,11 +767,9 @@ void JSMediacontentManager::initialize(JSContextRef context, JSObjectRef object) void JSMediacontentManager::finalize(JSObjectRef object) { - LoggerD("Entered"); MediacontentManagerPrivObject* priv = static_cast (JSObjectGetPrivate(object)); if(priv != NULL) { - LoggerD("Deleting coordinates object"); delete priv; JSObjectSetPrivate(object, NULL); priv = NULL; diff --git a/src/Content/JSFolder.cpp b/src/Content/JSFolder.cpp old mode 100644 new mode 100755 index a5192da..800b101 --- a/src/Content/JSFolder.cpp +++ b/src/Content/JSFolder.cpp @@ -77,17 +77,15 @@ JSClassRef JSFolder::m_jsClassRef = JSClassCreate(JSFolder::getClassInfo()); void JSFolder::initialize(JSContextRef context, JSObjectRef object) { - LoggerD( "entered" ); FolderPrivObject *priv = static_cast( JSObjectGetPrivate( object ) ); if (!priv) - { + { MediacontentFolderPtr privateData(new MediacontentFolder()); priv = new FolderPrivObject(context, privateData); JSObjectSetPrivate(object, static_cast(priv)); - LoggerD("new event is created" ); } - else - { + else + { LoggerD("private object already exists"); } } @@ -95,15 +93,13 @@ void JSFolder::initialize(JSContextRef context, JSObjectRef object) void JSFolder::finalize(JSObjectRef object) { - LoggerD( "entered" ); FolderPrivObject *priv = static_cast( JSObjectGetPrivate( object ) ) ; - if (priv != NULL) - { - delete (priv); - priv = NULL; - JSObjectSetPrivate(object, NULL); - } - + if (priv != NULL) + { + delete (priv); + priv = NULL; + JSObjectSetPrivate(object, NULL); + } } @@ -111,8 +107,8 @@ void JSFolder::finalize(JSObjectRef object) const JSClassRef JSFolder::getClassRef() { if (!m_jsClassRef) - { - m_jsClassRef = JSClassCreate(&m_classInfo); + { + m_jsClassRef = JSClassCreate(&m_classInfo); } return m_jsClassRef; } @@ -125,7 +121,6 @@ const JSClassDefinition* JSFolder::getClassInfo() MediacontentFolderPtr JSFolder::getFolderObject(JSObjectRef object) { - LoggerD("entered"); FolderPrivObject *priv = static_cast(JSObjectGetPrivate(object)); if(!priv) { ThrowMsg(NullPointerException, "Private object is null"); @@ -145,12 +140,10 @@ JSValueRef JSFolder::getPropertyId( JSStringRef propertyName, JSValueRef* exception) { - LoggerD("entered"); Try { Converter converter(context); MediacontentFolderPtr folder = getFolderObject(object); - return converter.toJSValueRef(folder->getFolderUUID()); } Catch(Exception) @@ -167,7 +160,6 @@ JSValueRef JSFolder::getPropertyName( JSStringRef propertyName, JSValueRef* exception) { - LoggerD("entered"); Try { Converter converter(context); @@ -188,7 +180,6 @@ JSValueRef JSFolder::getPropertyPath( JSStringRef propertyName, JSValueRef* exception) { - LoggerD("getPropertyPath::entered"); Try { Converter converter(context); @@ -209,7 +200,6 @@ JSValueRef JSFolder::getPropertyStorageType( JSStringRef propertyName, JSValueRef* exception) { - LoggerD("entered"); Try { Converter converter(context); @@ -230,7 +220,6 @@ JSValueRef JSFolder::getPropertyModifiedDate( JSStringRef propertyName, JSValueRef* exception) { - LoggerD("entered"); Try { Converter converter(context); @@ -254,33 +243,28 @@ JSValueRef JSFolder::getPropertyMediaId( JSStringRef propertyName, JSValueRef* exception) { - LoggerD("entered"); Try { Converter converter(context); MediacontentFolderPtr folder = getFolderObject(object); - //folder->getMediaIdList() - //MediaIdListPtr getMediaIdList() const; - //typedef vector MediaIdList; - //typedef DPL::SharedPtr 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; isize(); 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) diff --git a/src/Content/JSImage.cpp b/src/Content/JSImage.cpp old mode 100644 new mode 100755 index 2c7fce1..140e8ed --- a/src/Content/JSImage.cpp +++ b/src/Content/JSImage.cpp @@ -67,8 +67,6 @@ JSClassDefinition JSImage::m_classInfo = 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}, @@ -80,43 +78,38 @@ JSClassRef JSImage::m_jsClassRef = JSClassCreate(JSImage::getClassInfo()); void JSImage::initialize(JSContextRef context, JSObjectRef object) { - LoggerD( "entered" ); + ImagePrivObject *priv = static_cast( JSObjectGetPrivate( object ) ); if (!priv) { MediacontentImagePtr privateData(new MediacontentImage()); priv = new ImagePrivObject(context, privateData); JSObjectSetPrivate(object, static_cast(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( JSObjectGetPrivate( object ) ) ; - if (priv != NULL) - { - delete (priv); - priv = NULL; - JSObjectSetPrivate(object, NULL); - } + ImagePrivObject *priv = static_cast( 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; } @@ -128,7 +121,6 @@ const JSClassDefinition* JSImage::getClassInfo() MediacontentImagePtr JSImage::getImageObject(JSObjectRef object) { - LoggerD("entered"); ImagePrivObject *priv = static_cast(JSObjectGetPrivate(object)); if(!priv) { ThrowMsg(NullPointerException, "Private object is null"); @@ -147,16 +139,12 @@ JSValueRef JSImage::getPropertyGeoLocation( 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) @@ -173,7 +161,6 @@ JSValueRef JSImage::getPropertyWidth( JSStringRef propertyName, JSValueRef* exception) { - LoggerD("entered"); Try { Converter converter(context); @@ -194,7 +181,6 @@ JSValueRef JSImage::getPropertyHeight( JSStringRef propertyName, JSValueRef* exception) { - LoggerD("entered"); Try { Converter converter(context); @@ -214,7 +200,6 @@ JSValueRef JSImage::getPropertyOrientation( JSStringRef propertyName, JSValueRef* exception) { - LoggerD("entered"); Try { Converter converter(context); @@ -237,29 +222,27 @@ bool JSImage::setPropertyOrientation( 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( @@ -269,8 +252,6 @@ bool JSImage::setPropertyGeolocation( JSValueRef value, JSValueRef* exception) { - LoggerD("entered"); - Try { Converter converter(context); diff --git a/src/Content/JSVideo.cpp b/src/Content/JSVideo.cpp old mode 100644 new mode 100755 index 500a619..4a9dec1 --- a/src/Content/JSVideo.cpp +++ b/src/Content/JSVideo.cpp @@ -65,7 +65,6 @@ JSClassDefinition JSVideo::m_classInfo = 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}, @@ -79,7 +78,6 @@ JSClassRef JSVideo::m_jsClassRef = JSClassCreate(JSVideo::getClassInfo()); void JSVideo::initialize(JSContextRef context, JSObjectRef object) { - LoggerD( "entered" ); VideoPrivObject *priv = static_cast( JSObjectGetPrivate( object ) ); if (!priv) { @@ -100,26 +98,21 @@ void JSVideo::initialize(JSContextRef context, JSObjectRef object) void JSVideo::finalize(JSObjectRef object) { - LoggerD( "entered" ); - VideoPrivObject *priv = static_cast( JSObjectGetPrivate( object ) ) ; - if (priv != NULL) - { - delete (priv); - priv = NULL; - JSObjectSetPrivate(object, NULL); - } - - priv = NULL; - + VideoPrivObject *priv = static_cast( 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; } @@ -131,7 +124,6 @@ const JSClassDefinition* JSVideo::getClassInfo() MediacontentVideoPtr JSVideo::getVideoObject(JSObjectRef object) { - LoggerD("entered"); VideoPrivObject *priv = static_cast(JSObjectGetPrivate(object)); if(!priv) { @@ -151,7 +143,6 @@ JSValueRef JSVideo::getPropertyGeoLocation( JSStringRef propertyName, JSValueRef* exception) { - LoggerD("entered"); Try { Converter converter(context); @@ -173,14 +164,13 @@ bool JSVideo::setPropertyGeoLocation( 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()); @@ -203,7 +193,6 @@ JSValueRef JSVideo::getPropertyAlbum( JSStringRef propertyName, JSValueRef* exception) { - LoggerD("entered"); Try { Converter converter(context); @@ -226,28 +215,26 @@ JSValueRef JSVideo::getPropertyArtist( 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); @@ -260,14 +247,13 @@ JSValueRef JSVideo::getPropertyDuration( 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) { @@ -282,14 +268,14 @@ JSValueRef JSVideo::getPropertyWidth( 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) { @@ -305,14 +291,13 @@ JSValueRef JSVideo::getPropertyHeight( 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) { @@ -328,34 +313,33 @@ bool JSVideo::setPropertyArtists( JSValueRef value, JSValueRef* exception) { - LoggerD("entered"); Try { Converter converter(context); MediacontentVideoPtr video = getVideoObject(object); - vector 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 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; } @@ -366,18 +350,17 @@ bool JSVideo::setPropertyAlbum( 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"); diff --git a/src/Content/plugin_config.cpp b/src/Content/plugin_config.cpp index 9427dfe..90f0756 100755 --- a/src/Content/plugin_config.cpp +++ b/src/Content/plugin_config.cpp @@ -74,19 +74,6 @@ static FunctionMapping createContentFunctions() 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 */ diff --git a/src/Content/plugin_initializer.cpp b/src/Content/plugin_initializer.cpp old mode 100644 new mode 100755 index c6eb519..44ac0e9 --- a/src/Content/plugin_initializer.cpp +++ b/src/Content/plugin_initializer.cpp @@ -36,7 +36,7 @@ namespace Content { void on_frame_load_callback(const void * context) { LoggerD("[Tizen\\content] on_frame_load_callback (" << context << ")"); - GlobalContextManager::getInstance()->addGlobalContext(static_cast(context)); + GlobalContextManager::getInstance()->addGlobalContext(static_cast(context)); } void on_frame_unload_callback(const void * context) @@ -49,9 +49,9 @@ 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); } @@ -65,13 +65,13 @@ void on_widget_start_callback(int 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"); } diff --git a/src/DataControl/MappedDataControlConsumer.cpp b/src/DataControl/MappedDataControlConsumer.cpp index 23d0343..82e8599 100644 --- a/src/DataControl/MappedDataControlConsumer.cpp +++ b/src/DataControl/MappedDataControlConsumer.cpp @@ -63,6 +63,8 @@ static const char BUNDLE_KEY_WINDOW[] = "__APP_SVC_K_WIN_ID__"; #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" @@ -99,7 +101,9 @@ static void MappedDataControlGetValueCallback(bundle* b, int request_code, appsv EventGetValuePtr event; int count = 0; size_t index = 0; - + std::ifstream getValueStream; + std::string getValueFilePath; + try { if (data == NULL) @@ -151,11 +155,59 @@ static void MappedDataControlGetValueCallback(bundle* b, int request_code, appsv // 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]); + } +*/ } } @@ -165,6 +217,12 @@ static void MappedDataControlGetValueCallback(bundle* b, int request_code, appsv 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) @@ -799,6 +857,7 @@ void MappedDataControlConsumer::OnRequestReceived(const EventGetValuePtr& event) 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); diff --git a/src/DataSync/DataSyncManager.cpp b/src/DataSync/DataSyncManager.cpp index c710213..c1c8c9d 100755 --- a/src/DataSync/DataSyncManager.cpp +++ b/src/DataSync/DataSyncManager.cpp @@ -431,8 +431,6 @@ void DataSyncManager::OnRequestReceived(const IEventAddProfilePtr &event) ThrowMsg(NullPointerException, "SyncProfileInfo is NULL."); } - LoggerD("url: "<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: "<getSyncInfo()->setId(server_info.id); profile->getSyncInfo()->setPassword(server_info.password); - LoggerD("Url: "<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) { @@ -791,7 +787,7 @@ void DataSyncManager::OnRequestReceived(const IEventGetProfilePtr &event) serviceInfo->setServerDatabaseUri(category_info->tgt_uri); } - LoggerD("Service type: "<getSyncServiceType()<<", DB URI: "<getServerDatabaseUri()); + LoggerD("Service type: "<getSyncServiceType()); profile->getServiceInfo()->push_back(serviceInfo); } if(category_list) { @@ -868,8 +864,6 @@ void DataSyncManager::OnRequestReceived(const IEventGetAllProfilesPtr &event) profile->getSyncInfo()->setId(server_info.id); profile->getSyncInfo()->setPassword(server_info.password); - LoggerD("Url: "<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) { @@ -909,7 +903,7 @@ void DataSyncManager::OnRequestReceived(const IEventGetAllProfilesPtr &event) serviceInfo->setServerDatabaseUri(category_info->tgt_uri); } - LoggerD("Service type: "<getSyncServiceType()<<", DB URI: "<getServerDatabaseUri()); + LoggerD("Service type: "<getSyncServiceType()); profile->getServiceInfo()->push_back(serviceInfo); } if(category_list) { diff --git a/src/DataSync/JSSyncInfo.cpp b/src/DataSync/JSSyncInfo.cpp index abffdb2..bb252b4 100755 --- a/src/DataSync/JSSyncInfo.cpp +++ b/src/DataSync/JSSyncInfo.cpp @@ -167,7 +167,7 @@ JSObjectRef JSSyncInfo::constructor(JSContextRef context, syncInfo->setSyncMode(converter.toSyncMode(converter.toString(arguments[3]))); } - LoggerD("url: "<getUrl()<<", id: "<getId()<<", password: "<getPassword()<<", mode: "<getSyncMode()); + LoggerD("mode: "<getSyncMode()); if (SyncInfo::MANUAL_MODE==syncInfo->getSyncMode()) { if (argumentCount>=5) { diff --git a/src/DataSync/JSSyncProfileInfo.cpp b/src/DataSync/JSSyncProfileInfo.cpp index 8afd5b3..f0920a5 100755 --- a/src/DataSync/JSSyncProfileInfo.cpp +++ b/src/DataSync/JSSyncProfileInfo.cpp @@ -171,7 +171,7 @@ JSObjectRef JSSyncProfileInfo::constructor(JSContextRef context, syncProfileInfo->setServiceInfo(converter.toServiceInfoList(arguments[2])); } - LoggerD("profileName: "<getProfileName()<<", syncInfo url: "<getSyncInfo()->getUrl()<<", serviceInfo.length: "<getServiceInfo()->size()); + LoggerD("profileName: "<getProfileName()<<", serviceInfo.length: "<getServiceInfo()->size()); return createJSSyncProfileInfo(context, syncProfileInfo); } diff --git a/src/DataSync/JSSyncServiceInfo.cpp b/src/DataSync/JSSyncServiceInfo.cpp index 1418b18..e020e16 100755 --- a/src/DataSync/JSSyncServiceInfo.cpp +++ b/src/DataSync/JSSyncServiceInfo.cpp @@ -168,7 +168,7 @@ JSObjectRef JSSyncServiceInfo::constructor(JSContextRef context, syncServiceInfo->setPassword(converter.toString(arguments[4])); } - LoggerD("enable: "<getEnable()<<", serviceType: "<getSyncServiceType()<<", serverDatabaseUri: "<getServerDatabaseUri()<<", id: "<getId()<<", password: "<getPassword()); + LoggerD("enable: "<getEnable()<<", serviceType: "<getSyncServiceType()); return createJSSyncServiceInfo(context, syncServiceInfo); } diff --git a/src/Download/DownloadManager.cpp b/src/Download/DownloadManager.cpp index 4cd771f..efccf3d 100644 --- a/src/Download/DownloadManager.cpp +++ b/src/Download/DownloadManager.cpp @@ -112,7 +112,7 @@ static std::string _get_download_error(int err) } if (!success) { - LoggerE("Platform error %d <%s>", err, msg.c_str()); + LOGE("Platform error %d <%s>", err, msg.c_str()); } return msg; @@ -185,14 +185,14 @@ static gboolean downloadEventCB(void *data) { 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; } @@ -218,14 +218,14 @@ static gboolean downloadEventCB(void *data) { 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()); @@ -247,7 +247,7 @@ static gboolean downloadEventCB(void *data) { 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); @@ -255,11 +255,11 @@ static gboolean downloadEventCB(void *data) { 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; @@ -268,7 +268,6 @@ static gboolean downloadEventCB(void *data) { 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; @@ -282,7 +281,6 @@ static void download_state_changed_cb(int downloadId, download_state_e state, vo 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; @@ -326,12 +324,9 @@ void DownloadManager::removeCallbackFromMap(long downloadId) { long DownloadManager::start(DownloadRequest *request, DownloadCallback *downloadCallback) { - int ret; int downloadId = 0; - LoggerD("entered"); - if (!request) { throw TypeMismatchException("request is NULL."); } @@ -342,8 +337,6 @@ long DownloadManager::start(DownloadRequest *request, DownloadCallback *download std::string networkType = request->getNetworkType(); std::map 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."); } @@ -364,10 +357,9 @@ long DownloadManager::start(DownloadRequest *request, DownloadCallback *download 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()); @@ -420,8 +412,6 @@ long DownloadManager::start(DownloadRequest *request, DownloadCallback *download throw UnknownException(("Platform error while starting download. " + _get_download_error(ret)).c_str()); } - LoggerD("downloadId: %d", downloadId); - setCallbackToMap(downloadId, downloadCallback); return downloadId; @@ -431,8 +421,6 @@ void DownloadManager::cancel(long downloadId) { int ret; - LoggerD("entered. downloadId = %d", downloadId); - ret = download_cancel(downloadId); if (ret != DOWNLOAD_ERROR_NONE) { if (ret == DOWNLOAD_ERROR_ID_NOT_FOUND) { @@ -448,8 +436,6 @@ void DownloadManager::pause(long downloadId) { int ret; - LoggerD("entered. downloadId = %d", downloadId); - ret = download_pause(downloadId); if (ret != DOWNLOAD_ERROR_NONE) { if (ret == DOWNLOAD_ERROR_ID_NOT_FOUND) { @@ -465,8 +451,6 @@ void DownloadManager::resume(long downloadId) { int ret; - LoggerD("entered. downloadId = %d", downloadId); - ret = download_start(downloadId); if (ret != DOWNLOAD_ERROR_NONE) { if (ret == DOWNLOAD_ERROR_ID_NOT_FOUND) { @@ -484,8 +468,6 @@ std::string DownloadManager::getState(long downloadId) 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) { @@ -518,7 +500,7 @@ std::string DownloadManager::getState(long downloadId) break; default: result = "undefined"; - LoggerW("Unknown DownloadState was returned."); + LOGW("Unknown DownloadState was returned."); break; } @@ -538,8 +520,6 @@ DownloadRequest* DownloadManager::getDownloadRequest(long downloadId) 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) { @@ -594,7 +574,7 @@ DownloadRequest* DownloadManager::getDownloadRequest(long downloadId) 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]); @@ -614,7 +594,7 @@ DownloadRequest* DownloadManager::getDownloadRequest(long downloadId) 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); @@ -652,8 +632,6 @@ std::string DownloadManager::getMIMEType(long downloadId) 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) { @@ -680,8 +658,6 @@ void DownloadManager::setListener(long downloadId, DownloadCallback *downloadCal { 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) { diff --git a/src/Download/JSDownloadManager.cpp b/src/Download/JSDownloadManager.cpp index a18a550..2fbb577 100644 --- a/src/Download/JSDownloadManager.cpp +++ b/src/Download/JSDownloadManager.cpp @@ -146,11 +146,11 @@ JSValueRef JSDownloadManager::startDownload(JSContextRef context, 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); } } @@ -185,11 +185,11 @@ JSValueRef JSDownloadManager::setListener(JSContextRef context, 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); } } @@ -219,11 +219,11 @@ JSValueRef JSDownloadManager::cancelDownload(JSContextRef context, 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); } } @@ -253,11 +253,11 @@ JSValueRef JSDownloadManager::pauseDownload(JSContextRef context, 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); } } @@ -287,11 +287,11 @@ JSValueRef JSDownloadManager::resumeDownload(JSContextRef context, 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); } } @@ -322,11 +322,11 @@ JSValueRef JSDownloadManager::getState(JSContextRef context, 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); } } @@ -358,11 +358,11 @@ JSValueRef JSDownloadManager::getDownloadRequest(JSContextRef context, 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); } } @@ -392,11 +392,11 @@ JSValueRef JSDownloadManager::getMIMEType(JSContextRef context, 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); } } diff --git a/src/Download/JSDownloadRequest.cpp b/src/Download/JSDownloadRequest.cpp index f937907..03a6212 100644 --- a/src/Download/JSDownloadRequest.cpp +++ b/src/Download/JSDownloadRequest.cpp @@ -97,14 +97,47 @@ void JSDownloadRequest::finalize(JSObjectRef object) 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; } @@ -129,19 +162,19 @@ JSObjectRef JSDownloadRequest::constructor(JSContextRef context, 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 { @@ -155,13 +188,13 @@ JSObjectRef JSDownloadRequest::constructor(JSContextRef context, } 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); @@ -190,11 +223,19 @@ DownloadRequest* JSDownloadRequest::getPrivateObject(JSContextRef context, JSObj // 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()); + } else { + priv->setHttpHeader(JSUtil::JSValueToStringMap(context, httpHeader)); + } return priv; } diff --git a/src/Download/plugin_initializer.cpp b/src/Download/plugin_initializer.cpp index a10c8d4..bd3fa95 100644 --- a/src/Download/plugin_initializer.cpp +++ b/src/Download/plugin_initializer.cpp @@ -45,36 +45,36 @@ class_definition_options_t DownloadRequestOptions = 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(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(context)); } diff --git a/src/Messaging/JSMessage.cpp b/src/Messaging/JSMessage.cpp index e12ae06..7ffde2f 100644 --- a/src/Messaging/JSMessage.cpp +++ b/src/Messaging/JSMessage.cpp @@ -37,6 +37,7 @@ #include #include #include +#include #include #include // ==== @@ -323,18 +324,69 @@ bool JSMessage::setProperty(JSContextRef context, 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; } @@ -522,15 +574,15 @@ JSObjectRef JSMessage::constructor(JSContextRef context, } 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; } @@ -1732,7 +1784,7 @@ JSValueRef JSMessage::getInResponseTo(JSContextRef context, if (msg->getMessageType() != EMAIL) { LoggerD("not EMAIL type return empty string"); - return converter->toJSValueRef(""); + return JSValueMakeNull(context); } IEmailPtr email = MessageFactory::convertToEmail(msg); @@ -1744,7 +1796,7 @@ JSValueRef JSMessage::getInResponseTo(JSContextRef context, if (convId == msgId) { LoggerD("Not forwared and replied, return empty string"); - return converter->toJSValueRef(""); + return JSValueMakeNull(context); } return converter->toJSValueRef(converter->convertIntToString(convId)); diff --git a/src/Messaging/JSMessageAttachment.cpp b/src/Messaging/JSMessageAttachment.cpp index 846f8dc..792b766 100644 --- a/src/Messaging/JSMessageAttachment.cpp +++ b/src/Messaging/JSMessageAttachment.cpp @@ -30,6 +30,7 @@ #include "Attachment.h" #include +#include #include #include @@ -547,13 +548,15 @@ JSObjectRef JSMessageAttachment::constructor(JSContextRef context, } }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; } diff --git a/src/Messaging/MessagingListener.cpp b/src/Messaging/MessagingListener.cpp index 2f1d4db..d76b5ac 100644 --- a/src/Messaging/MessagingListener.cpp +++ b/src/Messaging/MessagingListener.cpp @@ -538,158 +538,164 @@ void MessagingListener::onAnswerReceived( 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(queryGenerator); - filter->travel(filterVisitor, 0); - std::vector 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(queryGenerator); + filter->travel(filterVisitor, 0); + std::vector 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 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 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(queryGenerator); - filter->travel(filterVisitor, 0); - std::vector 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(queryGenerator); + filter->travel(filterVisitor, 0); + std::vector 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 convPtrs; // for conversation - IConversationPtr conversation = event->getConversation(); + LoggerD("Filter not exist or empty conversation"); + std::vector 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(queryGenerator); - filter->travel(filterVisitor, 0); - std::vector 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(queryGenerator); + filter->travel(filterVisitor, 0); + std::vector 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 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 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) diff --git a/src/NFC/JSNdefRecordURI.cpp b/src/NFC/JSNdefRecordURI.cpp index 489c13c..8deda02 100644 --- a/src/NFC/JSNdefRecordURI.cpp +++ b/src/NFC/JSNdefRecordURI.cpp @@ -168,7 +168,6 @@ JSValueRef JSNdefRecordURI::getProperty(JSContextRef context, JSObjectRef object Converter convert(context); std::string result(uri); free(uri); - LoggerD("uri : " << result); return convert.toJSValueRef(result); } LoggerD("This record is not URI Type"); diff --git a/src/NFC/NdefRecord.cpp b/src/NFC/NdefRecord.cpp old mode 100644 new mode 100755 index 513468c..3aaaeec --- a/src/NFC/NdefRecord.cpp +++ b/src/NFC/NdefRecord.cpp @@ -91,12 +91,14 @@ NdefRecord::NdefRecord(const NdefRecordProperties &ndefRecordProperties, std::ve 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(util.convertToTNF(ndefRecordProperties.tnf)), typeName, ndefRecordProperties.typeName.size(), - id, ndefRecordProperties.id.size(), recordPayload, payload.size()) ; + int result = nfc_ndef_record_create(&handle, static_cast(util.convertToTNF(ndefRecordProperties.tnf)), typeName, typeSize, + id, idSize, recordPayload, payloadSize) ; if (recordPayload) free(recordPayload); if (typeName) @@ -189,10 +191,8 @@ NdefRecordProperties NdefRecord::getNDEFRecordProperties() { NFCUtil util; props.tnf = getTNF(); - LoggerD("tnf : " << props.tnf); props.typeName = getTypeName(); props.id = getID(); - LoggerD("typeName : " << util.byteToString(&props.typeName)); return props; } @@ -243,7 +243,6 @@ bool NdefRecord::getText(char **text) { if (result != NFC_ERROR_NONE) util.throwNFCException(result, "Can't get text of record"); - LoggerD("text : " << *text); return true; } @@ -258,7 +257,6 @@ bool NdefRecord::getLangCode(char **langCode) { if (result != NFC_ERROR_NONE) util.throwNFCException(result, "Can't get langcode of record"); - LoggerD("langCode : " << *langCode); return true; } bool NdefRecord::getEncodeType(nfcTextEncodeUTF *encodeType) { @@ -274,7 +272,6 @@ bool NdefRecord::getEncodeType(nfcTextEncodeUTF *encodeType) { util.throwNFCException(result, "Can't get encode type of record"); *encodeType = _convertToNfcEncodeType(type); - LoggerD("encodeType : " << *encodeType); return true; } @@ -288,7 +285,6 @@ bool NdefRecord::getUri(char **uri) { if (result != NFC_ERROR_NONE) util.throwNFCException(result, "Can't get uri of record"); - LoggerD("uri : " << *uri); return true; } @@ -302,7 +298,6 @@ bool NdefRecord::getMimeType(char **mimeType) { if (result != NFC_ERROR_NONE) util.throwNFCException(result, "Can't get mime type of record"); - LoggerD("mimeType : " << *mimeType); return true; } std::vector NdefRecord::getPayload() { @@ -315,7 +310,6 @@ std::vector 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); } diff --git a/src/Notification/NotificationManager.cpp b/src/Notification/NotificationManager.cpp old mode 100644 new mode 100755 index a0121cd..2b77c1a --- a/src/Notification/NotificationManager.cpp +++ b/src/Notification/NotificationManager.cpp @@ -124,8 +124,10 @@ int NotificationManager::post(StatusNotification *notification) 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) { @@ -133,21 +135,16 @@ int NotificationManager::post(StatusNotification *notification) } 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(); diff --git a/src/Package/JSPackageInformation.cpp b/src/Package/JSPackageInformation.cpp index 827410b..f6eccd2 100644 --- a/src/Package/JSPackageInformation.cpp +++ b/src/Package/JSPackageInformation.cpp @@ -81,7 +81,6 @@ JSClassRef JSPackageInformation::getClassRef() { JSValueRef JSPackageInformation::createJSObject(JSContextRef context, PackageInformation *pkgInfo) { - //LoggerE("createJSObject enter"); JSObjectRef jsValueRef = JSObjectMake(context, getClassRef(), static_cast(pkgInfo)); if (NULL == jsValueRef) { LoggerE("object creation error"); @@ -94,12 +93,10 @@ JSValueRef JSPackageInformation::createJSObject(JSContextRef context, PackageInf void JSPackageInformation::initialize(JSContextRef context, JSObjectRef object) { - LoggerD(">> initialize"); } void JSPackageInformation::finalize(JSObjectRef object) { - LoggerD(">> finalize"); } bool JSPackageInformation::isObjectOfClass(JSContextRef context, JSValueRef value) diff --git a/src/Package/JSPackageManager.cpp b/src/Package/JSPackageManager.cpp index e9b2c9d..727914a 100644 --- a/src/Package/JSPackageManager.cpp +++ b/src/Package/JSPackageManager.cpp @@ -114,7 +114,6 @@ JSValueRef JSPackageManager::install(JSContextRef context, const JSValueRef arguments[], JSValueRef* exception) { - LoggerD("entered"); TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0); AceSecurityStatus status = PACKAGE_CHECK_ACCESS(PACKAGE_FUNCTION_API_INSTALL); @@ -171,7 +170,6 @@ JSValueRef JSPackageManager::uninstall(JSContextRef context, const JSValueRef arguments[], JSValueRef* exception) { - LoggerD("entered"); TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0); AceSecurityStatus status = PACKAGE_CHECK_ACCESS(PACKAGE_FUNCTION_API_INSTALL); @@ -228,7 +226,6 @@ JSValueRef JSPackageManager::getPackagesInfo(JSContextRef context, const JSValueRef arguments[], JSValueRef* exception) { - LoggerD("entered"); TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0); AceSecurityStatus status = PACKAGE_CHECK_ACCESS(PACKAGE_FUNCTION_API_GET_PACKAGES_INFO); @@ -264,7 +261,6 @@ JSValueRef JSPackageManager::getPackageInfo(JSContextRef context, const JSValueRef arguments[], JSValueRef* exception) { - LoggerD("entered"); TIME_TRACER_ITEM_BEGIN(__FUNCTION__, 0); AceSecurityStatus status = PACKAGE_CHECK_ACCESS(PACKAGE_FUNCTION_API_GET_PACKAGE_INFO); @@ -273,7 +269,6 @@ JSValueRef JSPackageManager::getPackageInfo(JSContextRef context, 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); @@ -295,7 +290,6 @@ JSValueRef JSPackageManager::setPackageInfoEventListener(JSContextRef context, 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); @@ -349,7 +343,6 @@ JSValueRef JSPackageManager::unsetPackageInfoEventListener(JSContextRef context, 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); @@ -374,7 +367,6 @@ JSValueRef JSPackageManager::move(JSContextRef context, const JSValueRef arguments[], JSValueRef* exception) { - LoggerD("entered"); //AceSecurityStatus status = PACKAGE_CHECK_ACCESS(PACKAGE_FUNCTION_API_MOVE); //TIZEN_SYNC_ACCESS_HANDLER(status, context, exception); @@ -420,13 +412,13 @@ JSValueRef JSPackageManager::move(JSContextRef context, 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()); } @@ -441,8 +433,6 @@ JSValueRef JSPackageManager::isInstalled(JSContextRef context, const JSValueRef arguments[], JSValueRef* exception) { - LoggerD("entered"); - //AceSecurityStatus status = PACKAGE_CHECK_ACCESS(PACKAGE_FUNCTION_API_IS_INSTALLED); //TIZEN_SYNC_ACCESS_HANDLER(status, context, exception); @@ -457,13 +447,13 @@ JSValueRef JSPackageManager::isInstalled(JSContextRef context, 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()); } @@ -477,8 +467,6 @@ JSValueRef JSPackageManager::getPackageIdFromAppId(JSContextRef context, 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); @@ -493,13 +481,13 @@ JSValueRef JSPackageManager::getPackageIdFromAppId(JSContextRef context, 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()); } diff --git a/src/Package/PackageManager.cpp b/src/Package/PackageManager.cpp index 52553ef..91813ce 100644 --- a/src/Package/PackageManager.cpp +++ b/src/Package/PackageManager.cpp @@ -146,7 +146,6 @@ PackageInstallEventCallback::PackageInstallEventCallback(JSContextRef globalCtx, 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); } @@ -193,35 +192,25 @@ package_manager_request_h PackageInstallEventCallback::getHandle() 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; } @@ -230,7 +219,6 @@ static int get_current_pkg_id(char** pkg_id) 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; @@ -238,8 +226,6 @@ static bool app_callback(package_info_app_component_type_e comp_type, const char static PackageInformation* create_pkg_info(pkgmgrinfo_pkginfo_h handle) { - //LoggerD("enter"); - PackageInformation *pkgInfo = new PackageInformation(); char* id = NULL; @@ -257,7 +243,7 @@ static PackageInformation* create_pkg_info(pkgmgrinfo_pkginfo_h handle) 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 { @@ -266,63 +252,63 @@ static PackageInformation* create_pkg_info(pkgmgrinfo_pkginfo_h handle) 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; } @@ -331,19 +317,19 @@ static PackageInformation* create_pkg_info(pkgmgrinfo_pkginfo_h handle) 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!! @@ -352,8 +338,6 @@ static PackageInformation* create_pkg_info(pkgmgrinfo_pkginfo_h handle) static gboolean getCompleteCB(void *data) { - LoggerD("entered"); - PackageInfoCallbackData *callback = (PackageInfoCallbackData *)data; JSContextRef context = callback->getContext(); @@ -367,7 +351,7 @@ static gboolean getCompleteCB(void *data) 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"); @@ -378,12 +362,10 @@ static gboolean getCompleteCB(void *data) 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; @@ -391,7 +373,6 @@ static gboolean getCompleteCB(void *data) 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) { @@ -405,13 +386,11 @@ static int get_package_list_cb(pkgmgrinfo_pkginfo_h handle, void *user_data) 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); } @@ -430,7 +409,7 @@ static void package_event_cb(app_manger_event_type_e event_type, const char *pac 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; @@ -440,7 +419,7 @@ static void package_event_cb(app_manger_event_type_e event_type, const char *pac 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) { @@ -450,7 +429,6 @@ static void package_event_cb(app_manger_event_type_e event_type, const char *pac break; } case APP_MANAGER_EVENT_UNINSTALLED: { - LoggerD("uninstall : " << package); CallbackUserData *callback = eventCB->getOnUninstalled(); if (callback) { Converter converter(callback->getContext()); @@ -471,7 +449,7 @@ static void package_event_cb(app_manger_event_type_e event_type, const char *pac 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) { @@ -481,7 +459,7 @@ static void package_event_cb(app_manger_event_type_e event_type, const char *pac break; } default: - LoggerD("Fail!! Unknown event type is entered : " << event_type); + LoggerE("Fail!! Unknown event type is entered : " << event_type); break; } @@ -520,10 +498,10 @@ static int app_list_changed_cb_broker(int id, const char *type, const char *pack 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"); } } @@ -538,7 +516,6 @@ void install_request_cb(int id, const char *type, const char *package, package_manager_error_e error, void *user_data) { - LoggerD("install_request_cb "); PackageInstallEventCallback *callback = (PackageInstallEventCallback *)user_data; JSContextRef context = callback->getContext();; @@ -613,7 +590,6 @@ void install_request_cb(int id, const char *type, const char *package, void PackageManager::install(string pkgPath, PackageInstallEventCallback* callback) { - LoggerD("install"); int ret = 0; int id = 0; package_manager_request_h request_h; @@ -633,7 +609,6 @@ void PackageManager::install(string pkgPath, PackageInstallEventCallback* callba 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"); @@ -659,7 +634,6 @@ void PackageManager::install(string pkgPath, PackageInstallEventCallback* callba void PackageManager::uninstall(string pkgPath, PackageInstallEventCallback* callback) { - LoggerD("uninstall"); int ret = 0; int id = 0; package_manager_request_h request_h; @@ -680,7 +654,6 @@ void PackageManager::uninstall(string pkgPath, PackageInstallEventCallback* call 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"); @@ -715,7 +688,7 @@ PackageInformation* PackageManager::getPackageInfo(string pkgId) 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; @@ -741,8 +714,6 @@ PackageInformation* PackageManager::getPackageInfo(string pkgId) 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); } @@ -750,8 +721,6 @@ void PackageManager::getPackagesInfo(PackageInfoCallbackData *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) { @@ -766,10 +735,8 @@ void PackageManager::setPackageInfoEventListener(PackageInfoEventCallback * even void PackageManager::unsetPackageInfoEventListener() { - LoggerD("enter"); - if (m_manager_handle == NULL) { - LoggerD("no package manager handle registered"); + LoggerE("no package manager handle registered"); return; } @@ -777,21 +744,28 @@ void PackageManager::unsetPackageInfoEventListener() 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; @@ -804,7 +778,6 @@ PackageManager::~PackageManager() #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; @@ -837,13 +810,11 @@ void PackageManager::move(string pkgPath, string target, PackageInstallEventCall 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? @@ -856,14 +827,12 @@ bool PackageManager::isInstalled(string pkgId) 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"); } diff --git a/src/Package/PackageManager.h b/src/Package/PackageManager.h index f78f98e..e6d6448 100644 --- a/src/Package/PackageManager.h +++ b/src/Package/PackageManager.h @@ -113,6 +113,10 @@ public: 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(); @@ -120,6 +124,7 @@ private: PackageManager(); ~PackageManager(); pkgmgr_client *m_manager_handle; + string m_curr_app_id; }; diff --git a/src/Package/plugin_initializer.cpp b/src/Package/plugin_initializer.cpp index 2706b29..e8993c2 100644 --- a/src/Package/plugin_initializer.cpp +++ b/src/Package/plugin_initializer.cpp @@ -15,11 +15,15 @@ // limitations under the License. // +#include +#include + #include #include #include #include #include "JSPackageManager.h" +#include "PackageManager.h" #include using namespace WrtDeviceApis; @@ -33,6 +37,10 @@ void on_widget_start_callback(int widgetId) { LoggerD("[Tizen2_1\\Package] on_widget_start_callback ("<setCurrentAppId(tzAppId); + WrtAccessSingleton::Instance().initialize(widgetId); } Catch(WrtDeviceApis::Commons::Exception) { LoggerE("WrtAccess initialization failed"); diff --git a/src/Push/PushManager.cpp b/src/Push/PushManager.cpp index 235c24c..7f6b231 100644 --- a/src/Push/PushManager.cpp +++ b/src/Push/PushManager.cpp @@ -32,6 +32,9 @@ using namespace DeviceAPI::Common; 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; @@ -147,50 +150,6 @@ static void get_param(const char *msg, const char *name, char **value) } } -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); @@ -334,24 +293,14 @@ static void push_unregistration_result_cb(push_result_e result, const char *msg, } 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: "< +#include #include #include @@ -22,6 +24,7 @@ #include #include "JSPushManager.h" +#include "PushManager.h" #include #include @@ -38,6 +41,8 @@ void on_widget_start_callback(int widgetId) 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"); -- 2.7.4