Added support for loading image files synchronously
[platform/core/uifw/dali-adaptor.git] / platform-abstractions / slp / resource-loader / resource-shader-requester.h
1 #ifndef __DALI_SLP_PLATFORM_RESOURCE_SHADER_REQUESTER_H__
2 #define __DALI_SLP_PLATFORM_RESOURCE_SHADER_REQUESTER_H__
3
4 //
5 // Copyright (c) 2014 Samsung Electronics Co., Ltd.
6 //
7 // Licensed under the Flora License, Version 1.0 (the License);
8 // you may not use this file except in compliance with the License.
9 // You may obtain a copy of the License at
10 //
11 //     http://floralicense.org/license/
12 //
13 // Unless required by applicable law or agreed to in writing, software
14 // distributed under the License is distributed on an AS IS BASIS,
15 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 // See the License for the specific language governing permissions and
17 // limitations under the License.
18 //
19
20 #include "resource-requester-base.h"
21 #include "resource-thread-shader.h"
22
23 namespace Dali
24 {
25 namespace SlpPlatform
26 {
27
28 /**
29  * Class to own request thread and manage resource requests for shader
30  */
31 class ResourceShaderRequester : public ResourceRequesterBase
32 {
33 public:
34   /**
35    * Constructor
36    * @param[in] resourceLoader The resource loader with which to communicate results
37    */
38   ResourceShaderRequester( ResourceLoader& resourceLoader );
39
40   /**
41    * Destructor
42    */
43   virtual ~ResourceShaderRequester();
44
45   /**
46    * @copydoc ResourceRequester::Pause()
47    */
48   virtual void Pause();
49
50   /**
51    * @copydoc ResourceRequester::Resume()
52    */
53   virtual void Resume();
54
55   /**
56    * @copydoc ResourceRequester::LoadResource()
57    */
58   virtual void LoadResource( Integration::ResourceRequest& request );
59
60   /**
61    * @copydoc ResourceRequester::LoadResourceSynchronously()
62    */
63   virtual Integration::ResourcePointer LoadResourceSynchronously( const Integration::ResourceType& type, const std::string& path );
64
65   /**
66    * @copydoc ResourceRequester::LoadFurtherResources()
67    */
68   virtual Integration::LoadStatus LoadFurtherResources( Integration::ResourceRequest& request, LoadedResource partialResource );
69
70   /**
71    * @copydoc ResourceRequester::SaveResource()
72    */
73   virtual void SaveResource(const Integration::ResourceRequest& request );
74
75   /**
76    * @copydoc ResourceRequester::CancelLoad()
77    */
78   virtual void CancelLoad(Integration::ResourceId id, Integration::ResourceTypeId typeId);
79
80 protected:
81   ResourceThreadShader* mThreadShader; ///< Thread to load requests
82 };
83
84 } // SlpPlatform
85 } // Dali
86
87 #endif // __DALI_SLP_PLATFORM_RESOURCE_SHADER_REQUESTER_H__