Added generic folders for non-platform specific implementations 47/199647/6
authorAdeel Kazmi <adeel.kazmi@samsung.com>
Wed, 13 Feb 2019 17:21:06 +0000 (17:21 +0000)
committerAdeel Kazmi <adeel.kazmi@samsung.com>
Thu, 14 Feb 2019 13:50:42 +0000 (13:50 +0000)
This should make adding new adaptations easier as it wouldn't require
copying these files.

Change-Id: I88cc5fcd4ee738ed748f5668a4aa0353b8afb68b

dali/internal/accessibility/file.list
dali/internal/accessibility/generic/accessibility-adaptor-impl-generic.cpp [moved from dali/internal/accessibility/ubuntu/accessibility-adaptor-impl-ubuntu.cpp with 97% similarity]
dali/internal/adaptor/file.list
dali/internal/adaptor/generic/adaptor-impl-generic.cpp [moved from dali/internal/adaptor/ubuntu/adaptor-impl-ubuntu.cpp with 92% similarity]
dali/internal/clipboard/generic/clipboard-impl-generic.cpp [new file with mode: 0755]

index 01fd0aa..c0674f6 100644 (file)
@@ -34,6 +34,6 @@ adaptor_accessibility_tizen_wearable_src_files=\
 
 # module: accessibility, backend: ubuntu
 adaptor_accessibility_ubuntu_src_files=\
-    ${adaptor_accessibility_dir}/ubuntu/accessibility-adaptor-impl-ubuntu.cpp \
+    ${adaptor_accessibility_dir}/generic/accessibility-adaptor-impl-generic.cpp \
     ${adaptor_accessibility_dir}/ubuntu/tts-player-factory-ubuntu.cpp \
     ${adaptor_accessibility_dir}/ubuntu/tts-player-impl-ubuntu.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
index fa47a4b..803b95b 100644 (file)
@@ -21,6 +21,6 @@ adaptor_adaptor_tizen_wearable_src_files=\
 
 # module: adaptor, backend: ubuntu
 adaptor_adaptor_ubuntu_src_files=\
-    ${adaptor_adaptor_dir}/ubuntu/adaptor-impl-ubuntu.cpp \
+    ${adaptor_adaptor_dir}/generic/adaptor-impl-generic.cpp \
     ${adaptor_adaptor_dir}/ubuntu/framework-ubuntu.cpp
 
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -29,7 +29,7 @@ namespace Adaptor
 
 void Adaptor::GetDataStoragePath( std::string& path)
 {
-  path = DALI_SHADERBIN_DIR;
+  path = "";
 }
 
 void Adaptor::GetAppId( std::string& appId )
diff --git a/dali/internal/clipboard/generic/clipboard-impl-generic.cpp b/dali/internal/clipboard/generic/clipboard-impl-generic.cpp
new file mode 100755 (executable)
index 0000000..fe5ab5e
--- /dev/null
@@ -0,0 +1,107 @@
+/*
+ * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ *
+ * 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.
+ *
+ */
+
+// CLASS HEADER
+#include <dali/internal/clipboard/common/clipboard-impl.h>
+
+// INTERNAL INCLUDES
+#include <dali/internal/system/common/singleton-service-impl.h>
+
+namespace Dali
+{
+
+namespace Internal
+{
+
+namespace Adaptor
+{
+
+struct Clipboard::Impl
+{
+};
+
+Clipboard::Clipboard( Impl* impl )
+: mImpl( impl )
+{
+}
+
+Clipboard::~Clipboard()
+{
+}
+
+Dali::Clipboard Clipboard::Get()
+{
+  Dali::Clipboard clipboard;
+
+  Dali::SingletonService service( SingletonService::Get() );
+  if ( service )
+  {
+    // Check whether the singleton is already created
+    Dali::BaseHandle handle = service.GetSingleton( typeid( Dali::Clipboard ) );
+    if(handle)
+    {
+      // If so, downcast the handle
+      clipboard = Dali::Clipboard( dynamic_cast< Clipboard* >( handle.GetObjectPtr() ) );
+    }
+    else
+    {
+      Clipboard::Impl* impl( new Clipboard::Impl() );
+      clipboard = Dali::Clipboard( new Clipboard(impl) );
+      service.Register( typeid(Dali::Clipboard), clipboard );
+    }
+  }
+
+  return clipboard;
+}
+
+bool Clipboard::SetItem(const std::string &itemData )
+{
+  return true;
+}
+
+void Clipboard::RequestItem()
+{
+}
+
+unsigned int Clipboard::NumberOfItems()
+{
+  return 0u;
+}
+
+void Clipboard::ShowClipboard()
+{
+}
+
+void Clipboard::HideClipboard(bool skipFirstHide)
+{
+}
+
+bool Clipboard::IsVisible() const
+{
+  return false;
+}
+
+char* Clipboard::ExcuteBuffered( bool type, void *event )
+{
+  return NULL;
+}
+
+} // namespace Adaptor
+
+} // namespace Internal
+
+} // namespace Dali