Unused code - removed modules CPU, MMPlayer
authorTomasz Iwanek <t.iwanek@samsung.com>
Thu, 22 Nov 2012 09:37:06 +0000 (10:37 +0100)
committerGerrit Code Review <gerrit2@kim11>
Tue, 27 Nov 2012 15:02:06 +0000 (00:02 +0900)
Following modules are not used by wrt-plugins-tizen
and are completely removed in this commit:
- CPU
- MMPlayer

[Issue#]       LINUXNGWAP-563
[Bug]          There is unused code
[Cause]        N/A
[Solution]     Remove unused code and reduce binary size.
[Verification] wrt-plugins-common and wrt-plugins-tizen should be able to be built.

Change-Id: I80d5028da03bc3b56f0c04dc662779d4bfee631e

46 files changed:
CMakeLists.txt
packaging/wrt-plugins-common.spec
pkgconfigs/wrt-plugins-cpu.pc.in [deleted file]
pkgconfigs/wrt-plugins-mmplayer.pc.in [deleted file]
src/Commons/ThreadPool.cpp
src/Commons/ThreadPool.h
src/modules/API/CMakeLists.txt
src/modules/API/Cpu/IManager.cpp [deleted file]
src/modules/API/Cpu/IManager.h [deleted file]
src/modules/API/Cpu/IUnit.cpp [deleted file]
src/modules/API/Cpu/IUnit.h [deleted file]
src/modules/API/Cpu/config.cmake [deleted file]
src/modules/API/MMPlayer/EventGetVolume.h [deleted file]
src/modules/API/MMPlayer/EventIsPlaying.h [deleted file]
src/modules/API/MMPlayer/EventOnStateChange.h [deleted file]
src/modules/API/MMPlayer/EventOpen.h [deleted file]
src/modules/API/MMPlayer/EventPause.h [deleted file]
src/modules/API/MMPlayer/EventPlay.h [deleted file]
src/modules/API/MMPlayer/EventResume.h [deleted file]
src/modules/API/MMPlayer/EventSetWindow.h [deleted file]
src/modules/API/MMPlayer/EventStop.h [deleted file]
src/modules/API/MMPlayer/IMMPlayer.h [deleted file]
src/modules/API/MMPlayer/IManager.cpp [deleted file]
src/modules/API/MMPlayer/IManager.h [deleted file]
src/modules/API/MMPlayer/MMPlayerFactory.cpp [deleted file]
src/modules/API/MMPlayer/MMPlayerFactory.h [deleted file]
src/modules/API/MMPlayer/config.cmake [deleted file]
src/modules/packages/CMakeLists.txt
src/modules/packages/Cpu/CMakeLists.txt [deleted file]
src/modules/packages/MMPlayer/CMakeLists.txt [deleted file]
src/modules/tizen/CMakeLists.txt
src/modules/tizen/Cpu/Manager.cpp [deleted file]
src/modules/tizen/Cpu/Manager.h [deleted file]
src/modules/tizen/Cpu/Unit.cpp [deleted file]
src/modules/tizen/Cpu/Unit.h [deleted file]
src/modules/tizen/Cpu/config.cmake [deleted file]
src/modules/tizen/MMPlayer/MMPlayer.cpp [deleted file]
src/modules/tizen/MMPlayer/MMPlayer.h [deleted file]
src/modules/tizen/MMPlayer/Manager.cpp [deleted file]
src/modules/tizen/MMPlayer/Manager.h [deleted file]
src/modules/tizen/MMPlayer/config.cmake [deleted file]
src/plugin-loading/plugin_model.cpp
src/plugin-loading/plugin_model.h
src/plugin-loading/plugin_property_support.cpp
src/plugin-loading/plugin_property_support.h
src/plugins-installer/jobs/plugin_install/plugin_installer_context.h

index f213c4b..2132922 100644 (file)
@@ -128,7 +128,6 @@ endmacro(configure_and_install_pkg)
 configure_and_install_pkg(wrt-plugins-commons-javascript.pc)
 configure_and_install_pkg(wrt-plugins-commons.pc)
 configure_and_install_pkg(wrt-plugins-filesystem.pc)
-configure_and_install_pkg(wrt-plugins-cpu.pc)
 configure_and_install_pkg(wrt-plugins-widget-interface-dao.pc)
 configure_and_install_pkg(wrt-plugins-widgetdb.pc)
 configure_and_install_pkg(wrt-plugins-plugin-manager.pc)
index 22e4faa..cb80763 100644 (file)
@@ -17,8 +17,6 @@ BuildRequires: pkgconfig(dpl-wrt-dao-ro)
 BuildRequires: pkgconfig(dpl-wrt-dao-rw)
 BuildRequires: pkgconfig(dpl-db-efl)
 BuildRequires: pkgconfig(libpcrecpp)
-BuildRequires: pkgconfig(mm-sound)
-BuildRequires: pkgconfig(mm-player)
 BuildRequires: pkgconfig(icu-i18n)
 BuildRequires: pkgconfig(libxml-2.0)
 BuildRequires: pkgconfig(cert-svc-vcore)
diff --git a/pkgconfigs/wrt-plugins-cpu.pc.in b/pkgconfigs/wrt-plugins-cpu.pc.in
deleted file mode 100644 (file)
index 8793d2e..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-prefix=/usr
-project_name=@CMAKE_PROJECT_NAME@
-exec_prefix=${prefix}
-libdir=${prefix}/lib
-includedir=${prefix}/include/${project_name}
-
-Name: WebRuntime DeviceApis Cpu module
-Description: WebRuntime Cpu module
-Version: @CMAKE_PROJECT_VERSION@
-Requires: dpl-efl wrt-plugins-commons
-Libs: -L${libdir} -lwrt-plugins-cpu
-Cflags: -I${includedir}/Cpu
diff --git a/pkgconfigs/wrt-plugins-mmplayer.pc.in b/pkgconfigs/wrt-plugins-mmplayer.pc.in
deleted file mode 100644 (file)
index a914642..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-prefix=/usr
-project_name=@CMAKE_PROJECT_NAME@
-exec_prefix=${prefix}
-libdir=${prefix}/lib
-includedir=${prefix}/include/${project_name}
-
-Name: WebRuntime DeviceApis MMPlayer module
-Description: WebRuntime MMPlayer module
-Version: @CMAKE_PROJECT_VERSION@
-Requires: dpl-efl wrt-plugins-commons
-Libs: -L${libdir} -lwrt-plugins-mmplayer
-Cflags: -I${includedir}/MMPlayer
index e481b1f..5ec65eb 100755 (executable)
@@ -123,9 +123,6 @@ DPL::Thread *ThreadPool::getThreadRef(ThreadEnum::Enumeration type)
     case ThreadEnum::CONTACT_THREAD:
         thandle = getThreadHandleCreateIfNotExists(ThreadEnum::CONTACT_THREAD);
         break;
-    case ThreadEnum::MMPLAYER_THREAD:
-        thandle = getThreadHandleCreateIfNotExists(ThreadEnum::MMPLAYER_THREAD);
-        break;
     case ThreadEnum::BONDI_THREAD:
         thandle = getThreadHandleCreateIfNotExists(ThreadEnum::BONDI_THREAD);
         break;
index e595af8..7ee9ed6 100755 (executable)
@@ -52,7 +52,6 @@ class ThreadEnum
         APPCONFIG_THREAD,
         GALLERY_THREAD,
         CONTACT_THREAD,
-        MMPLAYER_THREAD,
         BONDI_THREAD,
         GEOLOCATION_THREAD,
         DEVICESTATUS_THREAD,
index cba823c..1a64e70 100644 (file)
@@ -13,7 +13,6 @@
 #    limitations under the License.
 #
 include_config_file(Filesystem)
-include_config_file(Cpu)
 include_config_file(Widget)
 include_config_file(LocalStorage)
 include_config_file(WidgetDB)
diff --git a/src/modules/API/Cpu/IManager.cpp b/src/modules/API/Cpu/IManager.cpp
deleted file mode 100644 (file)
index 0d1c08b..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
- *
- *    Licensed under the Apache License, Version 2.0 (the "License");
- *    you may not use this file except in compliance with the License.
- *    You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *    Unless required by applicable law or agreed to in writing, software
- *    distributed under the License is distributed on an "AS IS" BASIS,
- *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *    See the License for the specific language governing permissions and
- *    limitations under the License.
- */
-#include <Cpu/Manager.h>
-#include "IManager.h"
-
-namespace WrtDeviceApis {
-namespace Cpu {
-namespace Api {
-
-IManager& IManager::getInstance()
-{
-    return Manager::getInstance();
-}
-
-IManager::~IManager()
-{
-}
-
-} // Cpu
-} // Api
-} // WrtDeviceApis
diff --git a/src/modules/API/Cpu/IManager.h b/src/modules/API/Cpu/IManager.h
deleted file mode 100644 (file)
index b92519e..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
- *
- *    Licensed under the Apache License, Version 2.0 (the "License");
- *    you may not use this file except in compliance with the License.
- *    You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *    Unless required by applicable law or agreed to in writing, software
- *    distributed under the License is distributed on an "AS IS" BASIS,
- *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *    See the License for the specific language governing permissions and
- *    limitations under the License.
- */
-#ifndef WRTDEVICEAPIS_CPU_IMANAGER_H_
-#define WRTDEVICEAPIS_CPU_IMANAGER_H_
-
-#include <cstddef>
-#include <dpl/noncopyable.h>
-#include <Cpu/IUnit.h>
-
-namespace WrtDeviceApis {
-namespace Cpu {
-namespace Api {
-
-class IManager : private DPL::Noncopyable
-{
-  public:
-    static IManager& getInstance();
-
-  public:
-    virtual ~IManager() = 0;
-
-    /**
-     * Gets interface to CPU.
-     * @param index Index of CPU to get (1-based).
-     * @return Interface to CPU.
-     * @throw PlatformException If platform error occurs.
-     * @throw OutOfRangeException If index is greater than available CPUs.
-     * @remarks On some platforms passing 0 as index may return unit object
-     *          that gives avarage data for all CPUs. If such interface is
-     *          not supported then NULL is returned.
-     * @remarks Ownership is NOT passed to the caller.
-     */
-    virtual IUnit* getUnit(std::size_t index) const = 0;
-
-    /**
-     * Gets number of available CPUs.
-     * @return Number of CPUs.
-     */
-    virtual std::size_t getUnitsCount() const = 0;
-};
-
-} // Api
-} // Cpu
-} // WrtDeviceApis
-
-#endif // WRTDEVICEAPIS_CPU_IMANAGER_H_
diff --git a/src/modules/API/Cpu/IUnit.cpp b/src/modules/API/Cpu/IUnit.cpp
deleted file mode 100644 (file)
index 5830ce4..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
- *
- *    Licensed under the Apache License, Version 2.0 (the "License");
- *    you may not use this file except in compliance with the License.
- *    You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *    Unless required by applicable law or agreed to in writing, software
- *    distributed under the License is distributed on an "AS IS" BASIS,
- *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *    See the License for the specific language governing permissions and
- *    limitations under the License.
- */
-#include "IUnit.h"
-
-namespace WrtDeviceApis {
-namespace Cpu {
-namespace Api {
-
-IUnit::~IUnit()
-{
-}
-
-} // Cpu
-} // Api
-} // WrtDeviceApis
diff --git a/src/modules/API/Cpu/IUnit.h b/src/modules/API/Cpu/IUnit.h
deleted file mode 100644 (file)
index d4bd382..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
- *
- *    Licensed under the Apache License, Version 2.0 (the "License");
- *    you may not use this file except in compliance with the License.
- *    You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *    Unless required by applicable law or agreed to in writing, software
- *    distributed under the License is distributed on an "AS IS" BASIS,
- *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *    See the License for the specific language governing permissions and
- *    limitations under the License.
- */
-#ifndef WRTDEVICEAPIS_CPU_IUNIT_H_
-#define WRTDEVICEAPIS_CPU_IUNIT_H_
-
-#include <dpl/shared_ptr.h>
-
-namespace WrtDeviceApis {
-namespace Cpu {
-namespace Api {
-
-class IUnit
-{
-  public:
-    virtual ~IUnit() = 0;
-
-    /**
-     * Gets processor utilization percent.
-     * @return CPU utilization percent.
-     */
-    virtual unsigned int getUtilizationPercent() const = 0;
-};
-
-typedef DPL::SharedPtr<IUnit> IUnitPtr;
-
-} // Api
-} // Cpu
-} // WrtDeviceApis
-
-#endif // WRTDEVICEAPIS_CPU_IUNIT_H_
diff --git a/src/modules/API/Cpu/config.cmake b/src/modules/API/Cpu/config.cmake
deleted file mode 100644 (file)
index ceca6f9..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-get_current_path()
-
-set(API_CPU_PATH 
-    ${CURRENT_PATH}
-    PARENT_SCOPE
-)
-
-set(SRCS_API_CPU
-  ${CURRENT_PATH}/IManager.cpp
-  ${CURRENT_PATH}/IUnit.cpp
-  PARENT_SCOPE
-)
diff --git a/src/modules/API/MMPlayer/EventGetVolume.h b/src/modules/API/MMPlayer/EventGetVolume.h
deleted file mode 100644 (file)
index e897f85..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
- *
- *    Licensed under the Apache License, Version 2.0 (the "License");
- *    you may not use this file except in compliance with the License.
- *    You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *    Unless required by applicable law or agreed to in writing, software
- *    distributed under the License is distributed on an "AS IS" BASIS,
- *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *    See the License for the specific language governing permissions and
- *    limitations under the License.
- */
-/*
- * @author      Wojciech Bielawski (w.bielawski@samsung.com)
- * @version     0.1
- * @brief
- */
-
-#ifndef WRTDEVICEAPIS_MMPLAYER_EVENT_GET_VOLUME_H_
-#define WRTDEVICEAPIS_MMPLAYER_EVENT_GET_VOLUME_H_
-
-#include <vector>
-#include <dpl/shared_ptr.h>
-#include <Commons/IEvent.h>
-
-namespace WrtDeviceApis {
-namespace MMPlayer {
-namespace Api {
-
-class EventGetVolume : public Commons::IEvent<EventGetVolume>
-{
-  private:
-    /**
-     * The volume is stored as a value in rage 0-10
-     */
-    int m_volume;
-
-  public:
-    /**
-     * Getters and setters
-     */
-    int getVolume() const
-    {
-        return m_volume;
-    }
-    void setVolume(int volume)
-    {
-        m_volume = volume;
-    }
-
-    EventGetVolume()
-    {
-    }
-};
-
-typedef DPL::SharedPtr<EventGetVolume> EventGetVolumePtr;
-
-} // MMPlayer
-} // Api
-} // WrtDeviceApis
-
-#endif // WRTDEVICEAPIS_MMPLAYER_EVENT_GET_VOLUME_H_
diff --git a/src/modules/API/MMPlayer/EventIsPlaying.h b/src/modules/API/MMPlayer/EventIsPlaying.h
deleted file mode 100644 (file)
index 6cc689c..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
- *
- *    Licensed under the Apache License, Version 2.0 (the "License");
- *    you may not use this file except in compliance with the License.
- *    You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *    Unless required by applicable law or agreed to in writing, software
- *    distributed under the License is distributed on an "AS IS" BASIS,
- *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *    See the License for the specific language governing permissions and
- *    limitations under the License.
- */
-/*
- * @author      Wojciech Bielawski (w.bielawski@samsung.com)
- * @version     0.1
- * @brief
- */
-
-#ifndef WRTDEVICEAPIS_MMPLAYER_EVENT_ISPLAYING_H_
-#define WRTDEVICEAPIS_MMPLAYER_EVENT_ISPLAYING_H_
-
-#include <dpl/shared_ptr.h>
-#include <Commons/IEvent.h>
-#include <MMPlayer/IMMPlayer.h>
-
-namespace WrtDeviceApis {
-namespace MMPlayer {
-namespace Api {
-
-class EventIsPlaying : public Commons::IEvent<EventIsPlaying>
-{
-  private:
-    IMMPlayerPtr m_player;
-    bool m_isPlaying;
-
-  public:
-    /**
-     * Getters and setters
-     */
-    IMMPlayerPtr getPlayer() const
-    {
-        return m_player;
-    }
-    void setIsPlaying(bool isPlaying)
-    {
-        m_isPlaying = isPlaying;
-    }
-    bool getIsPlaying() const
-    {
-        return m_isPlaying;
-    }
-
-    explicit EventIsPlaying(const IMMPlayerPtr &player) :
-        m_player(player),
-        m_isPlaying(false)
-    {
-    }
-};
-
-typedef DPL::SharedPtr<EventIsPlaying> EventIsPlayingPtr;
-} // MMPlayer
-} // Api
-} // WrtDeviceApis
-
-#endif // WRTDEVICEAPIS_MMPLAYER_EVENT_ISPLAYING_H_
diff --git a/src/modules/API/MMPlayer/EventOnStateChange.h b/src/modules/API/MMPlayer/EventOnStateChange.h
deleted file mode 100644 (file)
index 9f3a3f0..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
- *
- *    Licensed under the Apache License, Version 2.0 (the "License");
- *    you may not use this file except in compliance with the License.
- *    You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *    Unless required by applicable law or agreed to in writing, software
- *    distributed under the License is distributed on an "AS IS" BASIS,
- *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *    See the License for the specific language governing permissions and
- *    limitations under the License.
- */
-#ifndef WRTDEVICEAPIS_MMPLAYER_EVENT_ON_STATE_CHANGE_H_
-#define WRTDEVICEAPIS_MMPLAYER_EVENT_ON_STATE_CHANGE_H_
-
-#include <dpl/shared_ptr.h>
-#include <Commons/ListenerEvent.h>
-#include <Commons/ListenerEventEmitter.h>
-
-namespace WrtDeviceApis {
-namespace MMPlayer {
-namespace Api {
-
-class EventOnStateChange : public Commons::ListenerEvent<EventOnStateChange>
-{
-  public:
-    typedef enum
-    {
-        BEGIN,
-        OPENED,
-        STOPPED,
-        PLAYING,
-        COMPLETED,
-        PAUSED,
-        RESUMED
-    } PlayerStates;
-  private:
-    PlayerStates m_playerState;
-
-  public:
-    EventOnStateChange() : m_playerState(BEGIN)
-    {
-    }
-    explicit EventOnStateChange(const PlayerStates state) : m_playerState(state)
-    {
-    }
-    virtual ~EventOnStateChange()
-    {
-    }
-
-    /**
-     * Getters and setters
-     */
-    void setPlayerState(const PlayerStates state)
-    {
-        m_playerState = state;
-    }
-    PlayerStates getPlayerState() const
-    {
-        return m_playerState;
-    }
-};
-
-typedef DPL::SharedPtr<EventOnStateChange> EventOnStateChangePtr;
-typedef Commons::ListenerEventEmitter<EventOnStateChange>
-            EventOnStateChangeEmitter;
-typedef DPL::SharedPtr<EventOnStateChangeEmitter> EventOnStateChangeEmitterPtr;
-} //MMPlayer
-} //Api
-} //WrtDeviceApis
-
-#endif // WRTDEVICEAPIS_MMPLAYER_EVENT_ON_STATE_CHANGE_H_
diff --git a/src/modules/API/MMPlayer/EventOpen.h b/src/modules/API/MMPlayer/EventOpen.h
deleted file mode 100644 (file)
index 7d3eeb8..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
- *
- *    Licensed under the Apache License, Version 2.0 (the "License");
- *    you may not use this file except in compliance with the License.
- *    You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *    Unless required by applicable law or agreed to in writing, software
- *    distributed under the License is distributed on an "AS IS" BASIS,
- *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *    See the License for the specific language governing permissions and
- *    limitations under the License.
- */
-/*
- * @author      Wojciech Bielawski (w.bielawski@samsung.com)
- * @version     0.1
- * @brief
- */
-
-#ifndef WRTDEVICEAPIS_MMPLAYER_EVENT_OPEN_H_
-#define WRTDEVICEAPIS_MMPLAYER_EVENT_OPEN_H_
-
-#include <dpl/shared_ptr.h>
-#include <Commons/IEvent.h>
-#include <MMPlayer/IMMPlayer.h>
-
-namespace WrtDeviceApis {
-namespace MMPlayer {
-namespace Api {
-
-class EventOpen : public Commons::IEvent<EventOpen>
-{
-  private:
-    IMMPlayerPtr m_player;
-    std::string m_filename;
-
-  public:
-    /**
-     * Getters
-     */
-    IMMPlayerPtr getPlayer() const
-    {
-        return m_player;
-    }
-    std::string getFilename() const
-    {
-        return m_filename;
-    }
-
-    EventOpen(const IMMPlayerPtr &player,
-              const std::string &filename) :
-        m_player(player),
-        m_filename(filename)
-    {
-    }
-};
-
-typedef DPL::SharedPtr<EventOpen> EventOpenPtr;
-} // MMPlayer
-} // Api
-} // WrtDeviceApis
-
-#endif // WRTDEVICEAPIS_MMPLAYER_EVENT_OPEN_H_
diff --git a/src/modules/API/MMPlayer/EventPause.h b/src/modules/API/MMPlayer/EventPause.h
deleted file mode 100644 (file)
index 7e38194..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
- *
- *    Licensed under the Apache License, Version 2.0 (the "License");
- *    you may not use this file except in compliance with the License.
- *    You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *    Unless required by applicable law or agreed to in writing, software
- *    distributed under the License is distributed on an "AS IS" BASIS,
- *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *    See the License for the specific language governing permissions and
- *    limitations under the License.
- */
-/*
- * @author      Wojciech Bielawski (w.bielawski@samsung.com)
- * @version     0.1
- * @brief
- */
-
-#ifndef WRTDEVICEAPIS_MMPLAYER_EVENT_PAUSE_H_
-#define WRTDEVICEAPIS_MMPLAYER_EVENT_PAUSE_H_
-
-#include <dpl/shared_ptr.h>
-#include <Commons/IEvent.h>
-#include <MMPlayer/IMMPlayer.h>
-
-namespace WrtDeviceApis {
-namespace MMPlayer {
-namespace Api {
-
-class EventPause : public Commons::IEvent<EventPause>
-{
-  private:
-    IMMPlayerPtr m_player;
-
-  public:
-    /**
-     * Getter
-     */
-    IMMPlayerPtr     getPlayer() const
-    {
-        return m_player;
-    }
-
-    explicit EventPause(const IMMPlayerPtr &player) : m_player(player)
-    {
-    }
-};
-
-typedef DPL::SharedPtr<EventPause> EventPausePtr;
-} // MMPlayer
-} // Api
-} // WrtDeviceApis
-
-#endif // WRTDEVICEAPIS_MMPLAYER_EVENT_PAUSE_H_
diff --git a/src/modules/API/MMPlayer/EventPlay.h b/src/modules/API/MMPlayer/EventPlay.h
deleted file mode 100644 (file)
index ec2393b..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
- *
- *    Licensed under the Apache License, Version 2.0 (the "License");
- *    you may not use this file except in compliance with the License.
- *    You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *    Unless required by applicable law or agreed to in writing, software
- *    distributed under the License is distributed on an "AS IS" BASIS,
- *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *    See the License for the specific language governing permissions and
- *    limitations under the License.
- */
-/*
- * @author      Wojciech Bielawski (w.bielawski@samsung.com)
- * @version     0.1
- * @brief
- */
-
-#ifndef WRTDEVICEAPIS_MMPLAYER_EVENT_PLAY_H_
-#define WRTDEVICEAPIS_MMPLAYER_EVENT_PLAY_H_
-
-#include <dpl/shared_ptr.h>
-#include <Commons/IEvent.h>
-#include <MMPlayer/IMMPlayer.h>
-
-namespace WrtDeviceApis {
-namespace MMPlayer {
-namespace Api {
-
-class EventPlay : public Commons::IEvent<EventPlay>
-{
-  private:
-    IMMPlayerPtr m_player;
-    unsigned int m_repeatTimes;
-
-  public:
-    /**
-     * Getters
-     */
-    IMMPlayerPtr getPlayer() const
-    {
-        return m_player;
-    }
-    unsigned int getRepeatTimes() const
-    {
-        return m_repeatTimes;
-    }
-
-    explicit EventPlay(const IMMPlayerPtr &player,
-                       unsigned int repeatTimes) :
-        m_player(player),
-        m_repeatTimes(repeatTimes)
-    {
-    }
-};
-
-typedef DPL::SharedPtr<EventPlay> EventPlayPtr;
-} // MMPlayer
-} // Api
-} // WrtDeviceApis
-
-#endif // WRTDEVICEAPIS_MMPLAYER_EVENT_PLAY_H_
diff --git a/src/modules/API/MMPlayer/EventResume.h b/src/modules/API/MMPlayer/EventResume.h
deleted file mode 100644 (file)
index d700160..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
- *
- *    Licensed under the Apache License, Version 2.0 (the "License");
- *    you may not use this file except in compliance with the License.
- *    You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *    Unless required by applicable law or agreed to in writing, software
- *    distributed under the License is distributed on an "AS IS" BASIS,
- *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *    See the License for the specific language governing permissions and
- *    limitations under the License.
- */
-/*
- * @author      Wojciech Bielawski (w.bielawski@samsung.com)
- * @version     0.1
- * @brief
- */
-
-#ifndef WRTDEVICEAPIS_MMPLAYER_EVENT_RESUME_H_
-#define WRTDEVICEAPIS_MMPLAYER_EVENT_RESUME_H_
-
-#include <dpl/shared_ptr.h>
-#include <Commons/IEvent.h>
-#include <MMPlayer/IMMPlayer.h>
-
-namespace WrtDeviceApis {
-namespace MMPlayer {
-namespace Api {
-
-class EventResume : public Commons::IEvent<EventResume>
-{
-  private:
-    IMMPlayerPtr m_player;
-
-  public:
-    /**
-     * Getter
-     */
-    IMMPlayerPtr getPlayer() const
-    {
-        return m_player;
-    }
-
-    explicit EventResume(const IMMPlayerPtr &player) : m_player(player)
-    {
-    }
-};
-
-typedef DPL::SharedPtr<EventResume> EventResumePtr;
-} // MMPlayer
-} // Api
-} // WrtDeviceApis
-
-#endif // WRTDEVICEAPIS_MMPLAYER_EVENT_RESUME_H_
diff --git a/src/modules/API/MMPlayer/EventSetWindow.h b/src/modules/API/MMPlayer/EventSetWindow.h
deleted file mode 100644 (file)
index 89431c9..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
- *
- *    Licensed under the Apache License, Version 2.0 (the "License");
- *    you may not use this file except in compliance with the License.
- *    You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *    Unless required by applicable law or agreed to in writing, software
- *    distributed under the License is distributed on an "AS IS" BASIS,
- *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *    See the License for the specific language governing permissions and
- *    limitations under the License.
- */
-/*
- * @author      Wojciech Bielawski (w.bielawski@samsung.com)
- * @version     0.1
- * @brief
- */
-
-#ifndef WRTDEVICEAPIS_MMPLAYER_EVENT_SET_WINDOW_H_
-#define WRTDEVICEAPIS_MMPLAYER_EVENT_SET_WINDOW_H_
-
-#include <dpl/shared_ptr.h>
-#include <MMPlayer/IMMPlayer.h>
-#include <Commons/IEvent.h>
-
-namespace WrtDeviceApis {
-namespace MMPlayer {
-namespace Api {
-
-class EventSetWindow : public Commons::IEvent<EventSetWindow>
-{
-  private:
-    IMMPlayerPtr m_player;
-    int m_posX;
-    int m_posY;
-    int m_width;
-    int m_height;
-
-  public:
-    /**
-     * Getter
-     */
-    IMMPlayerPtr getPlayer() const
-    {
-        return m_player;
-    }
-
-    EventSetWindow(const IMMPlayerPtr &player,
-            int posX,
-            int posY,
-            int width,
-            int height) :
-        m_player(player),
-        m_posX(posX),
-        m_posY(posY),
-        m_width(width),
-        m_height(height)
-    {
-    }
-};
-
-typedef DPL::SharedPtr<EventSetWindow> EventSetWindowPtr;
-} // MMPlayer
-} // Api
-} // WrtDeviceApis
-
-#endif // WRTDEVICEAPIS_MMPLAYER_EVENT_SET_WINDOW_H_
diff --git a/src/modules/API/MMPlayer/EventStop.h b/src/modules/API/MMPlayer/EventStop.h
deleted file mode 100644 (file)
index 8300dcf..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
- *
- *    Licensed under the Apache License, Version 2.0 (the "License");
- *    you may not use this file except in compliance with the License.
- *    You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *    Unless required by applicable law or agreed to in writing, software
- *    distributed under the License is distributed on an "AS IS" BASIS,
- *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *    See the License for the specific language governing permissions and
- *    limitations under the License.
- */
-/*
- * @author      Wojciech Bielawski (w.bielawski@samsung.com)
- * @version     0.1
- * @brief
- */
-
-#ifndef WRTDEVICEAPIS_MMPLAYER_EVENT_STOP_H_
-#define WRTDEVICEAPIS_MMPLAYER_EVENT_STOP_H_
-
-#include <dpl/shared_ptr.h>
-#include <Commons/IEvent.h>
-#include <MMPlayer/IMMPlayer.h>
-
-namespace WrtDeviceApis {
-namespace MMPlayer {
-namespace Api {
-
-class EventStop : public Commons::IEvent<EventStop>
-{
-  private:
-    IMMPlayerPtr m_player;
-
-  public:
-    /**
-     * Getter
-     */
-    IMMPlayerPtr     getPlayer() const
-    {
-        return m_player;
-    }
-
-    explicit EventStop(const IMMPlayerPtr &player) : m_player(player)
-    {
-    }
-};
-
-typedef DPL::SharedPtr<EventStop> EventStopPtr;
-} // MMPlayer
-} // Api
-} // WrtDeviceApis
-
-#endif // WRTDEVICEAPIS_MMPLAYER_EVENT_STOP_H_
diff --git a/src/modules/API/MMPlayer/IMMPlayer.h b/src/modules/API/MMPlayer/IMMPlayer.h
deleted file mode 100644 (file)
index 7f4f8b5..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
- *
- *    Licensed under the Apache License, Version 2.0 (the "License");
- *    you may not use this file except in compliance with the License.
- *    You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *    Unless required by applicable law or agreed to in writing, software
- *    distributed under the License is distributed on an "AS IS" BASIS,
- *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *    See the License for the specific language governing permissions and
- *    limitations under the License.
- */
-#ifndef WRTDEVICEAPIS_MMPLAYER_IMMPlayer_H_
-#define WRTDEVICEAPIS_MMPLAYER_IMMPlayer_H_
-
-#include <dpl/noncopyable.h>
-#include <dpl/shared_ptr.h>
-#include <MMPlayer/EventOnStateChange.h>
-
-namespace WrtDeviceApis {
-namespace MMPlayer {
-namespace Api {
-
-class IMMPlayer : DPL::Noncopyable
-{
-  public:
-    virtual ~IMMPlayer()
-    {
-    }
-
-    /**
-     * Sets on player state change event emitter.
-     * @param emitter On player state change event emitter.
-     * @throw PlatformException If platform error occurs.
-     */
-    virtual void setEmitter(const EventOnStateChangeEmitterPtr& emitter) = 0;
-
-    /**
-     * Gets on player state change event emitter.
-     * @throw PlatformException If platform error occurs.
-     */
-    virtual EventOnStateChangeEmitterPtr getEmitter() = 0;
-
-    /**
-     * Removes on state change event emitter.
-     */
-    virtual void clearEmitter() = 0;
-
-    /**
-     * Gets how many times opened file will be played since now
-     */
-    virtual unsigned int getRepeatTimes() const = 0;
-
-    /**
-     * Sets how many times opened file should be played
-     */
-    virtual void setRepeatTimes(unsigned int count) = 0;
-
-  protected:
-    IMMPlayer()
-    {
-    }
-};
-
-typedef DPL::SharedPtr<IMMPlayer> IMMPlayerPtr;
-}
-}
-}
-
-#endif // WRTDEVICEAPIS_MMPLAYER_IMMPlayer_H_
diff --git a/src/modules/API/MMPlayer/IManager.cpp b/src/modules/API/MMPlayer/IManager.cpp
deleted file mode 100644 (file)
index c6dad66..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
- *
- *    Licensed under the Apache License, Version 2.0 (the "License");
- *    you may not use this file except in compliance with the License.
- *    You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *    Unless required by applicable law or agreed to in writing, software
- *    distributed under the License is distributed on an "AS IS" BASIS,
- *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *    See the License for the specific language governing permissions and
- *    limitations under the License.
- */
-#include "IManager.h"
-#include <MMPlayer/Manager.h>
-#include <Commons/ThreadPool.h>
-
-namespace WrtDeviceApis {
-namespace MMPlayer {
-namespace Api {
-
-using namespace Commons;
-
-IManager& IManager::getInstance()
-{
-    static Manager instance;
-    return instance;
-}
-
-IManager::IManager() :
-    EventRequestReceiver<EventOpen>(ThreadEnum::MMPLAYER_THREAD),
-    EventRequestReceiver<EventPlay>(ThreadEnum::MMPLAYER_THREAD),
-    EventRequestReceiver<EventPause>(ThreadEnum::MMPLAYER_THREAD),
-    EventRequestReceiver<EventResume>(ThreadEnum::MMPLAYER_THREAD),
-    EventRequestReceiver<EventStop>(ThreadEnum::MMPLAYER_THREAD),
-    EventRequestReceiver<EventIsPlaying>(ThreadEnum::MMPLAYER_THREAD),
-    EventRequestReceiver<EventSetWindow>(ThreadEnum::MMPLAYER_THREAD),
-    EventRequestReceiver<EventGetVolume>(ThreadEnum::MMPLAYER_THREAD)
-{
-}
-
-IManager::~IManager()
-{
-}
-
-}
-}
-}
diff --git a/src/modules/API/MMPlayer/IManager.h b/src/modules/API/MMPlayer/IManager.h
deleted file mode 100644 (file)
index 2e0c637..0000000
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
- *
- *    Licensed under the Apache License, Version 2.0 (the "License");
- *    you may not use this file except in compliance with the License.
- *    You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *    Unless required by applicable law or agreed to in writing, software
- *    distributed under the License is distributed on an "AS IS" BASIS,
- *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *    See the License for the specific language governing permissions and
- *    limitations under the License.
- */
-#ifndef WRTDEVICEAPIS_MMPLAYER_IMANAGER_H_
-#define WRTDEVICEAPIS_MMPLAYER_IMANAGER_H_
-
-#include <dpl/noncopyable.h>
-#include <MMPlayer/EventOpen.h>
-#include <MMPlayer/EventPlay.h>
-#include <MMPlayer/EventPause.h>
-#include <MMPlayer/EventResume.h>
-#include <MMPlayer/EventStop.h>
-#include <MMPlayer/EventIsPlaying.h>
-#include <MMPlayer/EventSetWindow.h>
-#include <MMPlayer/EventGetVolume.h>
-
-namespace WrtDeviceApis {
-namespace MMPlayer {
-namespace Api {
-
-class IManager :
-    public Commons::EventRequestReceiver<EventOpen>,
-    public Commons::EventRequestReceiver<EventPlay>,
-    public Commons::EventRequestReceiver<EventPause>,
-    public Commons::EventRequestReceiver<EventResume>,
-    public Commons::EventRequestReceiver<EventStop>,
-    public Commons::EventRequestReceiver<EventIsPlaying>,
-    public Commons::EventRequestReceiver<EventSetWindow>,
-    public Commons::EventRequestReceiver<EventGetVolume>
-{
-  public:
-    static IManager &getInstance();
-    virtual ~IManager();
-
-    /**
-     * Opens a file
-     * @param event @see WrtDeviceApis::Api::MMPlayer::EventOpen.
-     * @exception Commons::PlatformException when platform error occurs
-     */
-    virtual void openFile(const EventOpenPtr& event) = 0;
-    /**
-     * Plays current file. If file is already playing player starts from the beginning
-     * @param event @see WrtDeviceApis::Api::MMPlayer::EventPlay.
-     * @exception Commons::PlatformException when platform error occurs
-     */
-    virtual void play(const EventPlayPtr& event) = 0;
-    /**
-     * Pauses current playing file. If no file is currently playing noting happens
-     * @param event @see WrtDeviceApis::Api::MMPlayer::EventPause.
-     * @exception Commons::PlatformException when platform error occurs
-     * @exception Commons::InvalidArgumentException when fileName is empty
-     */
-    virtual void pause(const EventPausePtr& event) = 0;
-    /**
-     * Resumes after pause. If file is not paused nothing happens
-     * @param event @see WrtDeviceApis::Api::MMPlayer::EventResume.
-     * @exception Commons::PlatformException when platform error occurs
-     */
-    virtual void resume(const EventResumePtr& event) = 0;
-    /**
-     * Stops current playing file. If file is not playing nothing happens
-     * @param event @see WrtDeviceApis::Api::MMPlayer::EventStop.
-     * @exception Commons::PlatformException when platform error occurs
-     */
-    virtual void stop(const EventStopPtr& event) = 0;
-    /**
-     * Sets window for video files
-     * @param event @see WrtDeviceApis::Api::MMPlayer::EventSetWindow.
-     * @exception Commons::PlatformException when platform error occurs
-     */
-    virtual void setWindow(const EventSetWindowPtr& event) = 0;
-    /**
-     * Returns current playing state
-     * @param event @see WrtDeviceApis::Api::MMPlayer::EventIsPlaying.
-     * @return True if player is in playing state
-     * @exception Commons::PlatformException when platform error occurs
-     */
-    virtual void isPlaying(const EventIsPlayingPtr& event) = 0;
-    /**
-     * Returns current playing state
-     * @param [out] event @see WrtDeviceApis::Api::MMPlayer::EventIsPlaying.
-     * @exception Commons::PlatformException when platform error occurs
-     */
-    virtual void getVolume(const EventGetVolumePtr& event) = 0;
-
-  protected:
-    IManager();
-
-    virtual void OnRequestReceived(const EventOpenPtr& event) = 0;
-    virtual void OnRequestReceived(const EventPlayPtr& event) = 0;
-    virtual void OnRequestReceived(const EventPausePtr& event) = 0;
-    virtual void OnRequestReceived(const EventResumePtr& event) = 0;
-    virtual void OnRequestReceived(const EventStopPtr& event) = 0;
-    virtual void OnRequestReceived(const EventIsPlayingPtr& event) = 0;
-    virtual void OnRequestReceived(const EventSetWindowPtr& event) = 0;
-    virtual void OnRequestReceived(const EventGetVolumePtr& event) = 0;
-};
-}
-}
-}
-
-#endif // WRTDEVICEAPIS_MMPLAYER_IMANAGER_H_
diff --git a/src/modules/API/MMPlayer/MMPlayerFactory.cpp b/src/modules/API/MMPlayer/MMPlayerFactory.cpp
deleted file mode 100644 (file)
index e649e13..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
- *
- *    Licensed under the Apache License, Version 2.0 (the "License");
- *    you may not use this file except in compliance with the License.
- *    You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *    Unless required by applicable law or agreed to in writing, software
- *    distributed under the License is distributed on an "AS IS" BASIS,
- *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *    See the License for the specific language governing permissions and
- *    limitations under the License.
- */
-#include "MMPlayerFactory.h"
-#include "IMMPlayer.h"
-#include <MMPlayer/MMPlayer.h>
-
-namespace WrtDeviceApis {
-namespace MMPlayer {
-namespace Api {
-
-IMMPlayerPtr MMPlayerFactory::getNewPlayer()
-{
-    return IMMPlayerPtr(new MMPlayer());
-}
-
-MMPlayerFactory& MMPlayerFactory::getInstance()
-{
-    static MMPlayerFactory theInstance;
-    return theInstance;
-}
-
-MMPlayerFactory::MMPlayerFactory()
-{
-}
-
-}
-}
-}
diff --git a/src/modules/API/MMPlayer/MMPlayerFactory.h b/src/modules/API/MMPlayer/MMPlayerFactory.h
deleted file mode 100644 (file)
index 892934b..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
- *
- *    Licensed under the Apache License, Version 2.0 (the "License");
- *    you may not use this file except in compliance with the License.
- *    You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *    Unless required by applicable law or agreed to in writing, software
- *    distributed under the License is distributed on an "AS IS" BASIS,
- *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *    See the License for the specific language governing permissions and
- *    limitations under the License.
- */
-#ifndef WRTDEVICEAPIS_MMPLAYER_MMPLAYERFACTORY_H_
-#define WRTDEVICEAPIS_MMPLAYER_MMPLAYERFACTORY_H_
-
-#include <dpl/noncopyable.h>
-#include <MMPlayer/IMMPlayer.h>
-
-namespace WrtDeviceApis {
-namespace MMPlayer {
-namespace Api {
-
-class MMPlayerFactory : DPL::Noncopyable
-{
-  public:
-    IMMPlayerPtr getNewPlayer();
-    static MMPlayerFactory& getInstance();
-
-  protected:
-    MMPlayerFactory();
-};
-
-}
-}
-}
-
-#endif // WRTDEVICEAPIS_MMPLAYER_MMPLAYERFACTORY_H_
diff --git a/src/modules/API/MMPlayer/config.cmake b/src/modules/API/MMPlayer/config.cmake
deleted file mode 100644 (file)
index cbeca2c..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-get_current_path()
-
-set(API_MMPLAYER_PATH 
-    ${CURRENT_PATH}
-    PARENT_SCOPE
-)
-
-set(SRCS_API_MMPLAYER
-  ${CURRENT_PATH}/MMPlayerFactory.cpp
-  ${CURRENT_PATH}/IManager.cpp
-  PARENT_SCOPE
-)
index 4d566f4..beadcd3 100644 (file)
 #
 
 set(TARGET_MODULE_FILESYSTEM "wrt-plugins-filesystem")
-set(TARGET_MODULE_CAMERA "wrt-plugins-camera")
-set(TARGET_MODULE_CALENDAR "wrt-plugins-calendar")
-set(TARGET_MODULE_MESSAGING "wrt-plugins-messaging")
-set(TARGET_MODULE_HAPTICS "wrt-plugins-haptics")
-set(TARGET_MODULE_CONTACT "wrt-plugins-contact")
-set(TARGET_MODULE_CPU "wrt-plugins-cpu")
-set(TARGET_MODULE_ACCELEROMETER "wrt-plugins-accelerometer")
 set(TARGET_MODULE_WIDGET "wrt-plugins-widget")
-set(TARGET_MODULE_TASK "wrt-plugins-task")
-set(TARGET_MODULE_ORIENTATION "wrt-plugins-orientation")
-set(TARGET_MODULE_RADIO "wrt-plugins-radio")
-set(TARGET_MODULE_POWER "wrt-plugins-power")
-set(TARGET_MODULE_PROFILE "wrt-plugins-profile")
-set(TARGET_MODULE_SYSTEMINFO "wrt-plugins-systeminfo")
 set(TARGET_MODULE_LOCALSTORAGE "wrt-plugins-localstorage")
 set(TARGET_MODULE_WIDGET_INTERFACE_DAO "wrt-plugins-widget-interface-dao")
 set(TARGET_MODULE_STORAGEEVENT "wrt-plugins-storageevent")
@@ -37,7 +24,6 @@ set(TARGET_MODULE_WIDGETDB "wrt-plugins-widgetdb")
 set(TARGET_MODULE_PLUGIN_MANAGER "wrt-plugins-plugin-manager")
 
 add_subdirectory(Filesystem)
-add_subdirectory(Cpu)
 add_subdirectory(Widget)
 add_subdirectory(LocalStorage)
 add_subdirectory(WidgetInterfaceDAO)
diff --git a/src/modules/packages/Cpu/CMakeLists.txt b/src/modules/packages/Cpu/CMakeLists.txt
deleted file mode 100644 (file)
index 5ace91c..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-# Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
-#
-#    Licensed under the Apache License, Version 2.0 (the "License");
-#    you may not use this file except in compliance with the License.
-#    You may obtain a copy of the License at
-#
-#        http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS,
-#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#    See the License for the specific language governing permissions and
-#    limitations under the License.
-#
-macro(install_header_file HEADER_FILE)
-    INSTALL(FILES ${API_CPU_PATH}/${HEADER_FILE}
-        DESTINATION ${DESTINATION_HEADER_PREFIX}/Cpu)
-endmacro()
-
-set(TARGET_NAME ${TARGET_MODULE_CPU})
-
-include_directories(
-    ${INCLUDES_PLATFORM_IMPLEMENTATION_CPU}
-)
-
-set(SRCS
-  ${SRCS_API_CPU}
-  ${SRCS_PLATFORM_IMPLEMENTATION_CPU}
-)
-
-add_library(${TARGET_NAME} SHARED ${SRCS})
-target_link_libraries(${TARGET_NAME}
-   ${LIBS_COMMONS}
-   ${TARGET_COMMONS}
-   ${LIBS_PLATFORM_IMPLEMENTATION_CPU}
-)
-set_target_properties(${TARGET_NAME} PROPERTIES 
- SOVERSION ${CMAKE_PROJECT_API_VERSION}
- VERSION ${CMAKE_PROJECT_VERSION}
-)
-
-INSTALL(TARGETS ${TARGET_NAME} LIBRARY DESTINATION
-    ${DESTINATION_LIB_PREFIX})
-
-install_header_file(IManager.h)
-install_header_file(IUnit.h)
diff --git a/src/modules/packages/MMPlayer/CMakeLists.txt b/src/modules/packages/MMPlayer/CMakeLists.txt
deleted file mode 100644 (file)
index 11af869..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-# Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
-#
-#    Licensed under the Apache License, Version 2.0 (the "License");
-#    you may not use this file except in compliance with the License.
-#    You may obtain a copy of the License at
-#
-#        http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS,
-#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#    See the License for the specific language governing permissions and
-#    limitations under the License.
-#
-macro(install_header_file HEADER_FILE)
-    INSTALL(FILES ${API_MMPLAYER_PATH}/${HEADER_FILE}
-        DESTINATION ${DESTINATION_HEADER_PREFIX}/MMPlayer)
-endmacro()
-
-set(TARGET_NAME ${TARGET_MODULE_MMPLAYER})
-
-include_directories(
-    ${INCLUDES_PLATFORM_IMPLEMENTATION_MMPLAYER}
-)
-
-set(SRCS
-  ${SRCS_API_MMPLAYER}
-  ${SRCS_PLATFORM_IMPLEMENTATION_MMPLAYER}
-)
-
-add_library(${TARGET_NAME} SHARED ${SRCS})
-target_link_libraries(${TARGET_NAME}
-   ${LIBS_COMMONS}
-   ${TARGET_COMMONS}
-   ${LIBS_PLATFORM_IMPLEMENTATION_MMPLAYER}
-)
-set_target_properties(${TARGET_NAME} PROPERTIES 
- SOVERSION ${CMAKE_PROJECT_API_VERSION}
- VERSION ${CMAKE_PROJECT_VERSION}
-)
-
-INSTALL(TARGETS ${TARGET_NAME} LIBRARY DESTINATION
-    ${DESTINATION_LIB_PREFIX})
-
-install_header_file(EventGetVolume.h)
-install_header_file(EventIsPlaying.h)
-install_header_file(EventOnStateChange.h)
-install_header_file(EventOpen.h)
-install_header_file(EventPause.h)
-install_header_file(EventPlay.h)
-install_header_file(EventResume.h)
-install_header_file(EventSetWindow.h)
-install_header_file(EventStop.h)
-install_header_file(IManager.h)
-install_header_file(IMMPlayer.h)
-install_header_file(MMPlayerFactory.h)
index ce3b4d7..85b3a95 100644 (file)
 ################################################################################
 
 include_config_file(Filesystem)
-include_config_file(Cpu)
 include_config_file(Widget)
 include_config_file(LocalStorage)
 include_config_file(WidgetInterfaceDAO)
 add_subdirectory(WidgetInterfaceDAO)
 include_config_file(WidgetDB)
 include_config_file(PluginManager)
-#DEPRACATED MODULES
-#include_config_file(Networking)
-#include_config_file(Geolocation)
-#include_config_file(FeatureLoader)
-#include_config_file(Camera-Webkit)
-##include_config_file(Telephony)
-#include_config_file(Display)
-#include_config_file(Gallery)
-##include_config_file(AppLauncher)
-#include_config_file(Device)
-#include_config_file(Memory)
-#include_config_file(PhoneBook)
-#include_config_file(UI)
-#include_config_file(System)
diff --git a/src/modules/tizen/Cpu/Manager.cpp b/src/modules/tizen/Cpu/Manager.cpp
deleted file mode 100644 (file)
index 3134165..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
- *
- *    Licensed under the Apache License, Version 2.0 (the "License");
- *    you may not use this file except in compliance with the License.
- *    You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *    Unless required by applicable law or agreed to in writing, software
- *    distributed under the License is distributed on an "AS IS" BASIS,
- *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *    See the License for the specific language governing permissions and
- *    limitations under the License.
- */
-#include "Manager.h"
-#include <Commons/Exception.h>
-
-namespace {
-const std::size_t NUMBER_OF_AVAILABLE_CPUS = 1;
-}
-
-namespace WrtDeviceApis {
-namespace Cpu {
-
-Manager& Manager::getInstance()
-{
-    static Manager instance;
-    return instance;
-}
-
-Api::IUnit* Manager::getUnit(std::size_t index) const
-{
-    if (index > NUMBER_OF_AVAILABLE_CPUS) {
-        Throw(Commons::OutOfRangeException);
-    }
-
-    Units::const_iterator it = m_units.find(index);
-    if (it != m_units.end()) {
-        return it->second;
-    }
-    return (m_units[index] = new Unit(index));
-}
-
-std::size_t Manager::getUnitsCount() const
-{
-    return NUMBER_OF_AVAILABLE_CPUS;
-}
-
-Manager::Manager()
-{
-}
-
-} // Cpu
-} // WrtDeviceApis
diff --git a/src/modules/tizen/Cpu/Manager.h b/src/modules/tizen/Cpu/Manager.h
deleted file mode 100644 (file)
index f08baff..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
- *
- *    Licensed under the Apache License, Version 2.0 (the "License");
- *    you may not use this file except in compliance with the License.
- *    You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *    Unless required by applicable law or agreed to in writing, software
- *    distributed under the License is distributed on an "AS IS" BASIS,
- *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *    See the License for the specific language governing permissions and
- *    limitations under the License.
- */
-#ifndef WRTDEVICEAPIS_CPU_MANAGER_H_
-#define WRTDEVICEAPIS_CPU_MANAGER_H_
-
-#include <cstddef>
-#include <map>
-#include <Cpu/IManager.h>
-#include "Unit.h"
-
-namespace WrtDeviceApis {
-namespace Cpu {
-
-class Manager : public Api::IManager
-{
-  public:
-    static Manager& getInstance();
-
-  public:
-    Api::IUnit* getUnit(std::size_t index) const;
-    std::size_t getUnitsCount() const;
-
-  private:
-    typedef std::map<std::size_t, Api::IUnit*> Units;
-
-  private:
-    Manager();
-
-  private:
-    mutable Units m_units;
-};
-
-} // Cpu
-} // WrtDeviceApis
-
-#endif // WRTDEVICEAPIS_CPU_MANAGER_H_
diff --git a/src/modules/tizen/Cpu/Unit.cpp b/src/modules/tizen/Cpu/Unit.cpp
deleted file mode 100644 (file)
index eca8c2f..0000000
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
- *
- *    Licensed under the Apache License, Version 2.0 (the "License");
- *    you may not use this file except in compliance with the License.
- *    You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *    Unless required by applicable law or agreed to in writing, software
- *    distributed under the License is distributed on an "AS IS" BASIS,
- *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *    See the License for the specific language governing permissions and
- *    limitations under the License.
- */
-#include <unistd.h>
-#include <stdio.h>
-#include <fstream>
-#include <sstream>
-#include <pcrecpp.h>
-#include <Commons/Exception.h>
-#include "Unit.h"
-
-namespace {
-const unsigned int GET_STATS_TIMEOUT = 1; // in seconds
-const char* STAT_FILE = "/proc/stat";
-const char* CPU_PATTERN_PREFIX = "^cpu";
-const char* CPU_PATTERN_POSTFIX = "\\s+(\\d+)\\s+(\\d+)\\s+(\\d+)\\s+(\\d+)";
-}
-
-namespace WrtDeviceApis {
-namespace Cpu {
-
-Unit::Unit(std::size_t index) : m_index(index)
-{
-    std::ostringstream oss(CPU_PATTERN_PREFIX);
-    if (m_index > 0) {
-        oss << m_index - 1;
-    }
-    oss << CPU_PATTERN_POSTFIX;
-    m_utilizationPattern = oss.str();
-}
-
-unsigned int Unit::getUtilizationPercent() const
-{
-    UtilizationStats usage0 = getUtilization();
-    sleep(GET_STATS_TIMEOUT);
-    UtilizationStats usage1 = getUtilization();
-
-    unsigned sum0 = usage0.m_user + usage0.m_nice + usage0.m_system +
-        usage0.m_idle;
-    unsigned sum1 = usage1.m_user + usage1.m_nice + usage1.m_system +
-        usage1.m_idle;
-
-    unsigned percent =
-        (100 -
-         ((usage1.m_idle -
-           usage0.m_idle) / (double) (sum1 - sum0)) * 100);
-
-    return percent;
-}
-
-Unit::UtilizationStats Unit::getUtilization() const
-{
-    std::ifstream file(STAT_FILE);
-    if (!file) {
-        ThrowMsg(Commons::UnsupportedException,
-                 "Could not open statistics file.");
-    }
-
-    UtilizationStats result;
-    memset(&result, 0, sizeof(UtilizationStats));
-    bool matched = false;
-    std::string line;
-    while (!file.eof() && !!std::getline(file, line)) {
-        if (pcrecpp::RE(m_utilizationPattern.c_str()).FullMatch(
-                line,
-                &result.m_user,
-                &result.m_nice,
-                &result.m_system,
-                &result.m_idle))
-        {
-            matched = true;
-            break;
-        }
-    }
-    file.close();
-
-    if (!matched) {
-        ThrowMsg(Commons::UnsupportedException, "Total memory data not found.");
-    }
-
-    return result;
-}
-
-} // Cpu
-} // WrtDeviceApis
diff --git a/src/modules/tizen/Cpu/Unit.h b/src/modules/tizen/Cpu/Unit.h
deleted file mode 100644 (file)
index 7540b97..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
- *
- *    Licensed under the Apache License, Version 2.0 (the "License");
- *    you may not use this file except in compliance with the License.
- *    You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *    Unless required by applicable law or agreed to in writing, software
- *    distributed under the License is distributed on an "AS IS" BASIS,
- *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *    See the License for the specific language governing permissions and
- *    limitations under the License.
- */
-#ifndef WRTDEVICEAPIS_CPU_UNIT_H_
-#define WRTDEVICEAPIS_CPU_UNIT_H_
-
-#include <string>
-#include <Cpu/IUnit.h>
-
-namespace WrtDeviceApis {
-namespace Cpu {
-
-class Manager;
-
-class Unit : public Api::IUnit
-{
-    friend class Manager;
-
-  public:
-    unsigned int getUtilizationPercent() const;
-
-  private:
-    /**
-     * Stores processor utilization statistics.
-     */
-    struct UtilizationStats
-    {
-        unsigned int m_user;
-        unsigned int m_nice;
-        unsigned int m_system;
-        unsigned int m_idle;
-    };
-
-  private:
-    explicit Unit(std::size_t index);
-
-    /**
-     * Gets processor utilization statistics.
-     * @return Processor utilization statistics.
-     * @throw UnsupportedException If data could not be retrieved.
-     */
-    UtilizationStats getUtilization() const;
-
-  private:
-    std::size_t m_index; ///< Index of CPU interface to represent.
-
-    /**
-     * Regex pattern used to get processor utilization statistics from
-     * stat file.
-     */
-    std::string m_utilizationPattern;
-};
-
-} // Cpu
-} // WrtDeviceApis
-
-#endif // WRTDEVICEAPIS_CPU_UNIT_H_
diff --git a/src/modules/tizen/Cpu/config.cmake b/src/modules/tizen/Cpu/config.cmake
deleted file mode 100644 (file)
index 7cedc97..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-get_current_path()
-
-pkg_search_module(pcrecpp REQUIRED libpcrecpp)
-
-set(INCLUDES_PLATFORM_IMPLEMENTATION_CPU
-  ${pcrecpp_INCLUDE_DIRS}
-  PARENT_SCOPE
-)
-
-set(LIBS_PLATFORM_IMPLEMENTATION_CPU
-  ${pcrecpp_LIBRARIES}
-  PARENT_SCOPE
-)
-
-set(SRCS_PLATFORM_IMPLEMENTATION_CPU
-  ${CURRENT_PATH}/Manager.cpp
-  ${CURRENT_PATH}/Unit.cpp
-  PARENT_SCOPE
-)
diff --git a/src/modules/tizen/MMPlayer/MMPlayer.cpp b/src/modules/tizen/MMPlayer/MMPlayer.cpp
deleted file mode 100644 (file)
index 0520e3a..0000000
+++ /dev/null
@@ -1,243 +0,0 @@
-/*
- * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
- *
- *    Licensed under the Apache License, Version 2.0 (the "License");
- *    you may not use this file except in compliance with the License.
- *    You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *    Unless required by applicable law or agreed to in writing, software
- *    distributed under the License is distributed on an "AS IS" BASIS,
- *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *    See the License for the specific language governing permissions and
- *    limitations under the License.
- */
-#include "MMPlayer.h"
-#include <mmf/mm.h>
-#include <mm_player.h>
-#include <dpl/log/log.h>
-#include <Commons/Exception.h>
-
-
-namespace WrtDeviceApis {
-namespace MMPlayer {
-
-using namespace Api;
-
-MMPlayer::MMPlayer() :
-    Commons::EventListener<EventOnEOS>(Commons::ThreadEnum::NULL_THREAD),
-    m_player(0),
-    m_currentState(STATE_UNDEFINED),
-    m_repeatTimes(0)
-{
-    Try {
-        init();
-    } Catch(Commons::Exception) {
-        LogError("Unknown exception while constructing MMPlayer");
-    }
-}
-
-MMPlayer::~MMPlayer()
-{
-    LogInfo("Enter");
-    finalize();
-}
-
-MMHandleType MMPlayer::getHandler() const
-{
-    return m_player;
-}
-
-void MMPlayer::setEmitter(const EventOnStateChangeEmitterPtr& emitter)
-{
-    LogDebug("Enter");
-    DPL::Mutex::ScopedLock lock(&m_emitterMtx);
-    m_onStateChangeEmitter = emitter;
-}
-
-EventOnStateChangeEmitterPtr MMPlayer::getEmitter()
-{
-    DPL::Mutex::ScopedLock lock(&m_emitterMtx);
-    return m_onStateChangeEmitter;
-}
-
-void MMPlayer::clearEmitter()
-{
-    LogDebug("Enter");
-    DPL::Mutex::ScopedLock lock(&m_emitterMtx);
-    m_onStateChangeEmitter.Reset();
-}
-
-int MMPlayer::onStateChange(int message,
-        void *param,
-        void* data)
-{
-    LogInfo("Enter");
-    static DPL::Mutex playerMtx;
-    MMPlayer *this_ = static_cast<MMPlayer*>(data);
-    if (this_) {
-        EventOnStateChangePtr event(new EventOnStateChange());
-        { //Separated block to avoid deadlock when this_->m_emitterMtx will be locked
-            DPL::Mutex::ScopedLock lock(&playerMtx);
-            switch (message) {
-            case MM_MESSAGE_ERROR:
-            {
-                MMMessageParamType* type =
-                    static_cast<MMMessageParamType*>(param);
-                if (type && (MM_MSG_UNION_CODE == type->union_type)) {
-                    LogError(
-                        "Error from platform, code: " << std::hex <<
-                        type->code);
-                }
-                event->setPlayerState(EventOnStateChange::BEGIN);
-                break;
-            }
-
-            case MM_MESSAGE_BEGIN_OF_STREAM:
-                LogInfo("Begin of stream");
-                event->setPlayerState(EventOnStateChange::PLAYING);
-                break;
-
-            case MM_MESSAGE_END_OF_STREAM:
-                LogInfo("End of stream");
-                event->setPlayerState(EventOnStateChange::COMPLETED);
-
-                // mm_player_stop should be executed outside the callback
-                {
-                    EventOnEOSPtr eventEOS(new EventOnEOS());
-                    if (this_->m_onEOSEmitter) {
-                        this_->m_onEOSEmitter->emit(eventEOS);
-                    } else {
-                        LogError("EOS emitter not set");
-                    }
-                }
-                break;
-
-            case MM_MESSAGE_STATE_INTERRUPTED:
-                // since platform reports always param->union_type == 0, only what can be done is to use field code
-                // and pray it won't be changed right before demo
-            {
-                MMMessageParamType* type =
-                    static_cast<MMMessageParamType*>(param);
-                LogInfo("Player callback message: " << std::hex << message);
-                if (type && (MM_MSG_UNION_CODE == type->union_type)) {
-                    LogError("Code: " << std::hex << type->code);
-                    if (MM_PLAYER_STATE_PAUSED == type->code) {
-                        LogInfo("Sending pause event");
-                        event->setPlayerState(EventOnStateChange::PAUSED);
-                    } else {
-                        return 0;
-                    }
-                }
-            }
-            break;
-
-            default:
-                LogInfo("Player callback message: " << std::hex << message);
-                MMMessageParamType* type =
-                    static_cast<MMMessageParamType*>(param);
-                if (type && (MM_MSG_UNION_CODE == type->union_type)) {
-                    LogInfo("Code: " << type->code);
-                }
-                return 0;
-            }
-        }
-
-        DPL::Mutex::ScopedLock lock(&this_->m_emitterMtx);
-        if (this_->m_onStateChangeEmitter) {
-            this_->m_onStateChangeEmitter->emit(event);
-        }
-        return 0;
-    }
-    return -1;
-}
-
-void MMPlayer::init()
-{
-    LogDebug("Enter");
-    int err = mm_player_create(&m_player);
-    if (MM_ERROR_NONE != err || !m_player) {
-        LogError("Can't create player");
-        Throw(Commons::PlatformException);
-    }
-
-    err = mm_player_set_message_callback(m_player,
-                                         MMPlayer::onStateChange,
-                                         this);
-    if (MM_ERROR_NONE != err) {
-        LogDebug("Can't set player's callback. Error code: " << std::hex << err);
-        mm_player_destroy(m_player);
-        ThrowMsg(Commons::PlatformException, "Can't set player's callback.");
-    }
-    //Set emmiter for EOS event
-    m_onEOSEmitter.Reset(new EventOnEOSEmitter());
-    m_onEOSEmitter->setListener(this);
-}
-
-void MMPlayer::finalize()
-{
-    LogDebug("Enter");
-    //if the music is playing, stop music.
-    if (MM_PLAYER_STATE_PLAYING == getState()) {
-        LogInfo("Sending stop request");
-        int err = mm_player_stop(m_player);
-        if (MM_ERROR_NONE != err) {
-            LogError("Can't stop player. Error code: " << std::hex << err);
-        }
-    }
-
-    int err = mm_player_set_message_callback(m_player, NULL, NULL);
-    if (MM_ERROR_NONE != err) {
-        LogDebug("Can't set player's callback. Error code: " << std::hex << err);
-    }
-    err = mm_player_destroy(m_player);
-    if (MM_ERROR_NONE != err) {
-        LogError(
-            "There were some problems during player destruction. Error code: "
-            << std::hex << err);
-    }
-}
-
-MMPlayerStateType MMPlayer::getState() const
-{
-    MMPlayerStateType state;
-    int err = mm_player_get_state(m_player, &state);
-    if (MM_ERROR_NONE != err) {
-        LogError("Can't get player status. Error code: " << std::hex << err);
-        ThrowMsg(Commons::PlatformException, "Can't get player status.");
-    }
-    LogInfo("Current player state: " << static_cast<int>(state));
-    return state;
-}
-
-void MMPlayer::onAnswerReceived(const EventOnEOSPtr& /*event*/)
-{
-    LogInfo("Enter");
-    int err = mm_player_stop(m_player);
-    if (MM_ERROR_NONE != err) {
-        LogError("Can't stop player. Error code: " << std::hex << err);
-    }
-    LogInfo("Repeat " << m_repeatTimes << " more time" <<
-            ((m_repeatTimes == 1) ? "" : "s"));
-    if (m_repeatTimes > 0) {
-        --m_repeatTimes;
-        int err = mm_player_start(m_player);
-        if (MM_ERROR_NONE != err) {
-            LogError("Can't start play. Error code: " << std::hex << err);
-        }
-    }
-}
-
-unsigned int MMPlayer::getRepeatTimes() const
-{
-    return m_repeatTimes;
-}
-
-void MMPlayer::setRepeatTimes(unsigned int count)
-{
-    m_repeatTimes = count;
-}
-
-}
-}
diff --git a/src/modules/tizen/MMPlayer/MMPlayer.h b/src/modules/tizen/MMPlayer/MMPlayer.h
deleted file mode 100644 (file)
index 37b8f16..0000000
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
- * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
- *
- *    Licensed under the Apache License, Version 2.0 (the "License");
- *    you may not use this file except in compliance with the License.
- *    You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *    Unless required by applicable law or agreed to in writing, software
- *    distributed under the License is distributed on an "AS IS" BASIS,
- *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *    See the License for the specific language governing permissions and
- *    limitations under the License.
- */
-#ifndef WRTDEVICEAPIS_MMPLAYER_MMPLAYER_H_
-#define WRTDEVICEAPIS_MMPLAYER_MMPLAYER_H_
-
-#include <mmf/mm.h>
-#include <mm_player.h>
-#include <dpl/shared_ptr.h>
-#include <dpl/mutex.h>
-#include <MMPlayer/IMMPlayer.h>
-#include <MMPlayer/MMPlayerFactory.h>
-#include <MMPlayer/EventOnStateChange.h>
-
-namespace WrtDeviceApis {
-namespace MMPlayer {
-/**
- * Event to send from callback when end of stream will be reported -> mm_player_stop should be executed
- */
-class EventOnEOS : public Commons::ListenerEvent<EventOnEOS>
-{
-};
-
-typedef DPL::SharedPtr<EventOnEOS> EventOnEOSPtr;
-typedef Commons::ListenerEventEmitter<EventOnEOS> EventOnEOSEmitter;
-typedef DPL::SharedPtr<EventOnEOSEmitter> EventOnEOSEmitterPtr;
-
-class MMPlayer :
-    public Api::IMMPlayer,
-    public Commons::EventListener<EventOnEOS>
-{
-    friend class Api::MMPlayerFactory;
-
-  public:
-    typedef enum
-    {
-        STATE_OPENED,
-        STATE_STOPPED,
-        STATE_PLAYING,
-        STATE_PAUSED,
-        STATE_COMPLETED,
-        STATE_UNDEFINED
-    } MMPLAYER_STATES;
-
-  private:
-    MMHandleType m_player;
-    MMPLAYER_STATES m_currentState;
-    unsigned int m_repeatTimes;
-
-    /**
-     * MMPlayer constructor
-     * \exception Commons::PlatformException when platform error occurs
-     */
-    explicit MMPlayer();
-
-  public:
-    /**
-     * MMPlayer destructor
-     */
-    virtual ~MMPlayer();
-
-    /**
-     * Gets handler to platform player type
-     */
-    virtual MMHandleType getHandler() const;
-
-    /**
-     * @See Api::MMPlayer::IMMPlayer::setEmitter
-     */
-    virtual void setEmitter(
-            const Api::EventOnStateChangeEmitterPtr& emitter);
-    /**
-     * @See Api::MMPlayer::IMMPlayer::getEmitter
-     */
-    Api::EventOnStateChangeEmitterPtr getEmitter();
-    /**
-     * @See Api::MMPlayer::IMMPlayer::clearEmitter
-     */
-    virtual void clearEmitter();
-
-    /**
-     * Gets player state
-     */
-    virtual MMPlayerStateType getState() const;
-
-    /**
-     * Used to recieve EventOnEOS
-     */
-    virtual void onAnswerReceived(const EventOnEOSPtr& event);
-
-    virtual unsigned int getRepeatTimes() const;
-
-    virtual void setRepeatTimes(unsigned int count);
-
-  private:
-    /**
-     * Callback method called by platform when player state changes.
-     * @param message Platform message
-     * @param param Platform parameter
-     * @param data User data.
-     */
-    static int onStateChange(int message,
-            void* param,
-            void* data);
-
-    /**
-     * Initialize player
-     * @throw Commons::PlatformException when platform error occures
-     */
-    void init();
-    /**
-     * Finalize player
-     */
-    void finalize();
-
-    DPL::Mutex m_emitterMtx;
-    Api::EventOnStateChangeEmitterPtr m_onStateChangeEmitter;
-    EventOnEOSEmitterPtr m_onEOSEmitter;
-};
-
-typedef DPL::SharedPtr<MMPlayer> MMPlayerPtr;
-
-}
-}
-
-#endif // WRTDEVICEAPIS_MMPLAYER_MMPLAYER_H_
diff --git a/src/modules/tizen/MMPlayer/Manager.cpp b/src/modules/tizen/MMPlayer/Manager.cpp
deleted file mode 100644 (file)
index 4a39576..0000000
+++ /dev/null
@@ -1,339 +0,0 @@
-/*
- * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
- *
- *    Licensed under the Apache License, Version 2.0 (the "License");
- *    you may not use this file except in compliance with the License.
- *    You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *    Unless required by applicable law or agreed to in writing, software
- *    distributed under the License is distributed on an "AS IS" BASIS,
- *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *    See the License for the specific language governing permissions and
- *    limitations under the License.
- */
-#include "Manager.h"
-#include <mmf/mm.h>
-#include <mm_sound.h>
-#include <mm_player.h>
-#include <WidgetDB/WidgetDBMgr.h>
-#include <Commons/WrtAccess/WrtAccess.h>
-#include <MMPlayer/EventOnStateChange.h>
-#include "MMPlayer.h"
-
-using namespace std;
-
-namespace WrtDeviceApis {
-namespace MMPlayer {
-
-using namespace Api;
-
-Manager::Manager()
-{
-}
-
-Manager::~Manager()
-{
-}
-
-void Manager::openFile(const EventOpenPtr& event)
-{
-    EventRequestReceiver<EventOpen>::PostRequest(event);
-}
-
-void Manager::play(const EventPlayPtr& event)
-{
-    EventRequestReceiver<EventPlay>::PostRequest(event);
-}
-
-void Manager::pause(const EventPausePtr& event)
-{
-    EventRequestReceiver<EventPause>::PostRequest(event);
-}
-
-void Manager::resume(const EventResumePtr& event)
-{
-    EventRequestReceiver<EventResume>::PostRequest(event);
-}
-
-void Manager::stop(const EventStopPtr& event)
-{
-    EventRequestReceiver<EventStop>::PostRequest(event);
-}
-
-void Manager::setWindow(const EventSetWindowPtr& event)
-{
-    EventRequestReceiver<EventSetWindow>::PostRequest(event);
-}
-
-void Manager::isPlaying(const EventIsPlayingPtr& event)
-{
-    EventRequestReceiver<EventIsPlaying>::PostRequest(event);
-}
-
-void Manager::getVolume(const EventGetVolumePtr& event)
-{
-    EventRequestReceiver<EventGetVolume>::PostRequest(event);
-}
-
-void Manager::OnRequestReceived(const EventOpenPtr& event)
-{
-    LogDebug("Entered");
-
-    string fullName = event->getFilename();
-    MMPlayerPtr player = DPL::DynamicPointerCast<MMPlayer>(event->getPlayer());
-    if (!player) {
-        LogError("MMPlayerPtr cast error");
-        event->setExceptionCode(Commons::ExceptionCodes::PlatformException);
-        return;
-    }
-
-    int err;
-    if (MM_PLAYER_STATE_NULL != player->getState()) {
-        err = mm_player_unrealize(player->getHandler());
-        if (MM_ERROR_NONE != err) {
-            LogError("Can't unrealize player. Error code: " << std::hex << err);
-            event->setExceptionCode(Commons::ExceptionCodes::PlatformException);
-            return;
-        }
-    }
-
-    if (!fullName.length()) {
-        event->setExceptionCode(
-            Commons::ExceptionCodes::InvalidArgumentException);
-        return;
-    }
-
-    //Check if current installation path should be added
-    if ((fullName[0] != '/') && (fullName.find("://") == string::npos)) {
-        try {
-            using namespace WrtDeviceApis::Commons;
-            std::string installationPath;
-            int widgetId = WrtAccessSingleton::Instance().getWidgetId();
-
-            WidgetDB::Api::IWidgetDBPtr widgetDB = 
-                WidgetDB::Api::getWidgetDB(widgetId);
-            installationPath = widgetDB->getConfigValue(
-                    WidgetDB::Api::ConfigAttribute::INSTALL_PATH);
-
-            LogInfo("Config attribute: " << installationPath);
-            fullName.insert(0, installationPath);
-        } catch (const Commons::Exception &ex) {
-            LogError("Obtaining config info failed");
-            event->setExceptionCode(ex.getCode());
-            return;
-        }
-    }
-
-    LogDebug("Opening file: " << fullName);
-    char *errorBuffer = NULL;
-    err = mm_player_set_attribute(
-            player->getHandler(), &errorBuffer, "profile_uri",
-            fullName.c_str(), fullName.length(), NULL);
-    if (MM_ERROR_NONE != err) {
-        LogError(
-            "Setting attribute error. Code: " << std::hex << err <<
-            ". Message: " << errorBuffer);
-        free(errorBuffer);
-        event->setExceptionCode(Commons::ExceptionCodes::PlatformException);
-        return;
-    }
-
-    err = mm_player_realize(player->getHandler());
-    if (MM_ERROR_NONE != err) {
-        LogError("Can't realize player. Error code:" << std::hex << err);
-        if (static_cast<int>(MM_ERROR_PLAYER_INVALID_URI) == err) {
-            LogDebug("x");
-            event->setExceptionCode(
-                Commons::ExceptionCodes::InvalidArgumentException);
-        } else {
-            event->setExceptionCode(Commons::ExceptionCodes::PlatformException);
-        }
-        return;
-    }
-
-    if (player->getEmitter()) {
-        EventOnStateChangePtr eventStateChanged(new EventOnStateChange(
-                                                    EventOnStateChange::OPENED));
-        player->getEmitter()->emit(eventStateChanged);
-    }
-}
-
-void Manager::OnRequestReceived(const EventPlayPtr& event)
-{
-    LogDebug("Entered");
-
-    MMPlayerPtr player = DPL::DynamicPointerCast<MMPlayer>(event->getPlayer());
-    if (!player) {
-        LogError("MMPlayerPtr cast error");
-        event->setExceptionCode(Commons::ExceptionCodes::PlatformException);
-        return;
-    }
-
-    //Check if player currently plays media
-    if (MM_PLAYER_STATE_PLAYING == player->getState() || 0 ==
-        event->getRepeatTimes()) {
-        LogDebug("already playing");
-        return;
-    }
-    player->setRepeatTimes(event->getRepeatTimes() - 1);
-
-    int err = mm_player_start(player->getHandler());
-    if (MM_ERROR_NONE != err) {
-        LogError("Can't start play. Error code: " << std::hex << err);
-        event->setExceptionCode(Commons::ExceptionCodes::PlatformException);
-    }
-    //Event onStateChange will be emitted trough platform callback
-}
-
-void Manager::OnRequestReceived(const EventPausePtr& event)
-{
-    LogDebug("Entered");
-
-    MMPlayerPtr player = DPL::DynamicPointerCast<MMPlayer>(event->getPlayer());
-    if (!player) {
-        LogError("MMPlayerPtr cast error");
-        event->setExceptionCode(Commons::ExceptionCodes::PlatformException);
-        return;
-    }
-    if (MM_PLAYER_STATE_PLAYING != player->getState()) {
-        return;
-    }
-
-    int err = mm_player_pause(player->getHandler());
-    if (MM_ERROR_NONE != err) {
-        event->setExceptionCode(Commons::ExceptionCodes::PlatformException);
-    }
-    if (player->getEmitter()) {
-        EventOnStateChangePtr eventStateChanged(new EventOnStateChange(
-                                                    EventOnStateChange::PAUSED));
-        player->getEmitter()->emit(eventStateChanged);
-    }
-}
-
-void Manager::OnRequestReceived(const EventResumePtr& event)
-{
-    LogDebug("Entered");
-
-    MMPlayerPtr player = DPL::DynamicPointerCast<MMPlayer>(event->getPlayer());
-    if (!player) {
-        LogError("MMPlayerPtr cast error");
-        event->setExceptionCode(Commons::ExceptionCodes::PlatformException);
-        return;
-    }
-    if (MM_PLAYER_STATE_PAUSED != player->getState()) {
-        return;
-    }
-
-    int err = mm_player_resume(player->getHandler());
-    if (MM_ERROR_NONE != err) {
-        LogError("Can't resume player. Error code: " << std::hex << err);
-        event->setExceptionCode(Commons::ExceptionCodes::PlatformException);
-    }
-    if (player->getEmitter()) {
-        EventOnStateChangePtr eventStateChanged(new EventOnStateChange(
-                                                    EventOnStateChange::RESUMED));
-        player->getEmitter()->emit(eventStateChanged);
-    }
-}
-
-void Manager::OnRequestReceived(const EventStopPtr& event)
-{
-    LogDebug("Entered");
-
-    MMPlayerPtr player = DPL::DynamicPointerCast<MMPlayer>(event->getPlayer());
-    if (!player) {
-        LogError("MMPlayerPtr cast error");
-        event->setExceptionCode(Commons::ExceptionCodes::PlatformException);
-        return;
-    }
-    if (MM_PLAYER_STATE_PLAYING != player->getState() &&
-        MM_PLAYER_STATE_PAUSED != player->getState()) {
-        return;
-    }
-
-    int err = mm_player_stop(player->getHandler());
-    if (MM_ERROR_NONE != err) {
-        LogError("Can't stop player. Error code: " << std::hex << err);
-        event->setExceptionCode(Commons::ExceptionCodes::PlatformException);
-    }
-
-    if (player->getEmitter()) {
-        EventOnStateChangePtr eventStateChanged(new EventOnStateChange(
-                                                    EventOnStateChange::STOPPED));
-        player->getEmitter()->emit(eventStateChanged);
-    }
-}
-
-void Manager::OnRequestReceived(const EventSetWindowPtr& /*event*/)
-{
-    LogDebug("Entered");
-    LogError("Not implemented");
-    //TODO: set display parameter, when xID will be available
-}
-
-void Manager::OnRequestReceived(const EventIsPlayingPtr& event)
-{
-    LogDebug("Entered");
-
-    MMPlayerPtr player = DPL::DynamicPointerCast<MMPlayer>(event->getPlayer());
-    Try
-    {
-        if (!player) {
-            LogError("MMPlayerPtr cast error");
-            event->setExceptionCode(Commons::ExceptionCodes::PlatformException);
-            return;
-        }
-        event->setIsPlaying(MM_PLAYER_STATE_PLAYING == player->getState());
-    }
-    Catch(Commons::PlatformException)
-    {
-        LogError("Can't get player status.");
-        event->setExceptionCode(Commons::ExceptionCodes::PlatformException);
-        return;
-    }
-}
-
-void Manager::OnRequestReceived(const EventGetVolumePtr& event)
-{
-    LogDebug("Entered");
-    unsigned int volume = 0;
-    int steps = 0;
-
-    int err = mm_sound_volume_get_step(VOLUME_TYPE_MEDIA, &steps);
-    if (MM_ERROR_NONE != err) {
-        LogError(
-            "Can't get volume steps count. Error code: " << std::hex <<
-            err);
-        event->setExceptionCode(Commons::ExceptionCodes::PlatformException);
-        return;
-    }
-    LogInfo("Volume steps count: " << steps);
-    try
-    {
-        err = mm_sound_volume_get_value(VOLUME_TYPE_MEDIA, &volume);
-        if (MM_ERROR_NONE != err) {
-            LogError(
-                "Can't get player's volume. Error code: " << std::hex <<
-                err);
-            Throw(Commons::UnknownException);
-        }
-        LogInfo("Platform player's volume: " << volume);
-        if (steps > 1) {
-            event->setVolume((10.0 * volume) / (steps - 1));
-        } else {
-            LogError("no steps defined");
-            event->setVolume(0);
-        }
-    }
-    catch (const Commons::UnknownException &ex)
-    {
-        LogError("Can't scale the volume");
-        event->setExceptionCode(Commons::ExceptionCodes::PlatformException);
-    }
-}
-
-}
-}
-
diff --git a/src/modules/tizen/MMPlayer/Manager.h b/src/modules/tizen/MMPlayer/Manager.h
deleted file mode 100644 (file)
index 9c51bc4..0000000
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
- *
- *    Licensed under the Apache License, Version 2.0 (the "License");
- *    you may not use this file except in compliance with the License.
- *    You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *    Unless required by applicable law or agreed to in writing, software
- *    distributed under the License is distributed on an "AS IS" BASIS,
- *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *    See the License for the specific language governing permissions and
- *    limitations under the License.
- */
-#ifndef WRTDEVICEAPIS_MMPLAYER_MANAGER_H_
-#define WRTDEVICEAPIS_MMPLAYER_MANAGER_H_
-
-#include <MMPlayer/IManager.h>
-
-namespace WrtDeviceApis {
-namespace MMPlayer {
-
-class Manager : public Api::IManager
-{
-  public:
-    Manager();
-    virtual ~Manager();
-
-    /**
-     * Opens a file
-     * @param event @see WrtDeviceApis::Api::EventOpen.
-     * @exception Commons::PlatformException when platform error occurs
-     */
-    virtual void openFile(const Api::EventOpenPtr& event);
-    /**
-     * Plays current file. If file is already playing player starts from the beginning
-     * @param event @see WrtDeviceApis::Api::EventPlay.
-     * @exception Commons::PlatformException when platform error occurs
-     */
-    virtual void play(const Api::EventPlayPtr& event);
-    /**
-     * Pauses current playing file. If no file is currently playing noting happens
-     * @param event @see WrtDeviceApis::Api::EventPause.
-     * @exception Commons::PlatformException when platform error occurs
-     * @exception Commons::InvalidArgumentException when fileName is empty
-     */
-    virtual void pause(const Api::EventPausePtr& event);
-    /**
-     * Resumes after pause. If file is not paused nothing happens
-     * @param event @see WrtDeviceApis::Api::EventResume.
-     * @exception Commons::PlatformException when platform error occurs
-     */
-    virtual void resume(const Api::EventResumePtr& event);
-    /**
-     * Stops current playing file. If file is not playing nothing happens
-     * @param event @see WrtDeviceApis::Api::EventStop.
-     * @exception Commons::PlatformException when platform error occurs
-     */
-    virtual void stop(const Api::EventStopPtr& event);
-    /**
-     * Sets window for video files
-     * @param event @see WrtDeviceApis::Api::EventSetWindow.
-     * @exception Commons::PlatformException when platform error occurs
-     */
-    virtual void setWindow(const Api::EventSetWindowPtr& event);
-    /**
-     * Returns current playing state
-     * @param event @see WrtDeviceApis::Api::EventIsPlaying.
-     * @return True if player is in playing state
-     * @exception Commons::PlatformException when platform error occurs
-     */
-    virtual void isPlaying(const Api::EventIsPlayingPtr& event);
-    /**
-     * Returns current playing state
-     * @param [out] event @see WrtDeviceApis::Api::EventIsPlaying.
-     * @exception Commons::PlatformException when platform error occurs
-     */
-    virtual void getVolume(const Api::EventGetVolumePtr& event);
-
-  protected:
-    virtual void OnRequestReceived(const Api::EventOpenPtr& event);
-    virtual void OnRequestReceived(const Api::EventPlayPtr& event);
-    virtual void OnRequestReceived(const Api::EventPausePtr& event);
-    virtual void OnRequestReceived(const Api::EventResumePtr& event);
-    virtual void OnRequestReceived(const Api::EventStopPtr& event);
-    virtual void OnRequestReceived(const Api::EventSetWindowPtr& event);
-    virtual void OnRequestReceived(const Api::EventIsPlayingPtr& event);
-    virtual void OnRequestReceived(const Api::EventGetVolumePtr& event);
-};
-
-}
-}
-
-#endif // WRTDEVICEAPIS_MMPLAYER_MANAGER_H_
diff --git a/src/modules/tizen/MMPlayer/config.cmake b/src/modules/tizen/MMPlayer/config.cmake
deleted file mode 100644 (file)
index a2f46e7..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-get_current_path()
-
-pkg_search_module(mmsound REQUIRED mm-sound)
-pkg_search_module(mmplayer REQUIRED mm-player)
-pkg_search_module(libpcrecpp REQUIRED libpcrecpp)
-
-set(INCLUDES_PLATFORM_IMPLEMENTATION_MMPLAYER
-  ${mmplayer_INCLUDE_DIRS}
-  ${mmsound_INCLUDE_DIRS}
-  ${libpcrecpp_INCLUDE_DIRS}
-  PARENT_SCOPE
-)
-
-set(LIBS_PLATFORM_IMPLEMENTATION_MMPLAYER
-  ${mmplayer_LIBRARIES}
-  ${mmsound_LIBRARIES}  
-  ${libpcrecpp_LIBRARIES}
-  PARENT_SCOPE
-)
-
-set(SRCS_PLATFORM_IMPLEMENTATION_MMPLAYER
-  ${CURRENT_PATH}/Manager.cpp
-  ${CURRENT_PATH}/MMPlayer.cpp
-  PARENT_SCOPE
-)
index b6884c8..58b56d8 100644 (file)
@@ -71,8 +71,3 @@ WrtDB::DbPluginHandle PluginModel::getHandle() const
 {
     return Handle.Get();
 }
-
-bool PluginModel::operator< (const PluginModel& obj) const
-{
-    return obj.Handle.Get() < Handle.Get();
-}
index a870c87..624f86e 100644 (file)
@@ -83,8 +83,6 @@ class PluginModel : public DPL::Event::Model
   public:
     PluginModel(const WrtDB::DbPluginHandle& handle);
 
-    bool operator< (const PluginModel& obj) const;
-
   private:
     WrtDB::DbPluginHandle getHandle() const;
 };
index 4786ea7..bf54b6f 100644 (file)
@@ -90,24 +90,6 @@ void WindowPropertySupport::setBundleToWindowProperty(const char* bundle)
     }
 }
 
-
-void WindowPropertySupport::setBundleToNavigatorProperty(const char* bundle)
-{
-    LogInfo("set window.navigator.__bundle: " << bundle);
-
-    if(bundle)
-    {
-        m_bundle = bundle;
-
-        JSStringRef bundleString = JSStringCreateWithUTF8CString(bundle);
-
-        setPropertyToNavigator(BUNDLE_PROPERTY_NAME,
-                               JSValueMakeString(m_context, bundleString));
-
-        JSStringRelease(bundleString);
-    }
-}
-
 void WindowPropertySupport::setThemeToNavigatorProperty(const char* theme)
 {
     LogInfo("set window.navigator.__theme: " << theme);
index a489a77..a1914da 100644 (file)
@@ -38,7 +38,6 @@ class WindowPropertySupport
 
       void setScaleToNavigatorProperty(const double scale);
       void setBundleToWindowProperty(const char* bundle);
-      void setBundleToNavigatorProperty(const char* bundle);
       void setThemeToNavigatorProperty(const char* theme);
 
       explicit WindowPropertySupport(JSGlobalContextRef m_context);