Tizen 2.1 base
[apps/osp/Home.git] / inc / HmPackageInfoListRetrieveThread.h
1 //
2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
3 //
4 // Licensed under the Flora License, Version 1.0 (the License);
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 //     http://floralicense.org/license/
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an AS IS BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 //
16
17 /**
18  * @file        PackageInfoListRetrieveThread.h
19  * @brief       The file contains declaration of PackageInfoListRetrieveThread,
20  * which is a worker thread and being used to retrieve the list PackageInfos, for the Applications installed on device.
21  */
22
23 #ifndef _HM_PACKAGE_INFO_LIST_RETRIEVE_THREAD_H_
24 #define _HM_PACKAGE_INFO_LIST_RETRIEVE_THREAD_H_
25
26 #include <FBase.h>
27 #include "HmIPackageInfoListListener.h"
28
29 /**
30  * @class       PackageInfoListRetrieveThread
31  * @brief       The worker thread class for retriving and listing of various types of packages.
32  */
33 class PackageInfoListRetrieveThread
34         : public Tizen::Base::Runtime::Thread
35 {
36 public:
37         /**
38          * Constructor
39          */
40         PackageInfoListRetrieveThread(IPackageInfoListListener* pPackageListener);
41
42         /**
43          * Destructor
44          */
45         virtual ~PackageInfoListRetrieveThread(void);
46
47         /**
48          * Starts this Thread, for listing specified type of packages.
49          *
50          * @return              result, E_SUCCESS if thread starts properly, else system wide error code.
51          * @param[in]   typeOfInstall, tells of which kind of packages to be listed.
52          */
53         result SetPackageType(void);
54
55         //this method gets called when the thread is created without an IRunnable instance. In this thread it lists the specified type of packages.
56         virtual Tizen::Base::Object* Run(void);
57
58 private:
59         /**
60          * The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
61          */
62         PackageInfoListRetrieveThread(const PackageInfoListRetrieveThread&);
63
64         /**
65          * The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
66          */
67         PackageInfoListRetrieveThread& operator =(const PackageInfoListRetrieveThread&);
68
69 private:
70         IPackageInfoListListener* __pPackageListener; //The listener to listen about the completion of package listing
71 };
72
73 #endif //_HM_PACKAGE_INFO_LIST_RETRIEVE_THREAD_H_