Fix : Remove exception handling codes at the sample code
[platform/framework/native/content.git] / inc / FCntContentSearchResult.h
1 //
2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
3 //
4 // Licensed under the Apache License, Version 2.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://www.apache.org/licenses/LICENSE-2.0
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  * @file                FCntContentSearchResult.h
18  * @brief               This is the header file for the %ContentSearchResult class.
19  *
20  * This header file contains the declarations of the %ContentSearchResult class.
21  */
22
23 #ifndef _FCNT_CONTENT_SEARCH_RESULT_H_
24 #define _FCNT_CONTENT_SEARCH_RESULT_H_
25
26 #include <FBaseObject.h>
27 #include <FCntTypes.h>
28
29 namespace Tizen { namespace Content
30 {
31
32 class _ContentSearchResultImpl;
33 class ContentInfo;
34
35 /**
36  * @class       ContentSearchResult
37  * @brief       This class represents the content search result.
38  *
39  * @since       2.0
40  *
41  * @final       This class is not intended for extension.
42  *
43  * The %ContentSearchResult class gets a pointer to the ContentInfo class and retrieves the content type.
44  *
45  * The search result list comprises of this class, and each node can have a different type of %ContentInfo (ImageContentInfo, AudioContentInfo, VideoContentInfo, or OtherContentInfo).
46  * You must cast the %ContentInfo class into the appropriate content type to use the %ContentSearchResult class.
47  */
48 class _OSP_EXPORT_ ContentSearchResult
49         : public Tizen::Base::Object
50 {
51
52 public:
53         /**
54          * This is the default constructor for this class.
55          *
56          * @since               2.0
57          */
58         ContentSearchResult(void);
59
60         /**
61          * This destructor overrides Tizen::Base::Object::~Object().
62          *
63          * @since               2.0
64          */
65         virtual ~ContentSearchResult(void);
66
67         /**
68          * Gets the content type of the ContentInfo class.
69          *
70          * @since               2.0
71          *
72          * @return              The content type
73          */
74         ContentType GetContentType(void) const;
75
76         /**
77          * Gets the content information of the ContentInfo class.
78          *
79          * @since               2.0
80          *
81          * @return              A pointer to the ContentInfo class
82          */
83         ContentInfo* GetContentInfo(void) const;
84
85 private:
86         /**
87          * The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
88          */
89         ContentSearchResult(const ContentSearchResult& rhs);
90
91         /**
92          * The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
93          */
94         ContentSearchResult& operator =(const ContentSearchResult& rhs);
95
96         void SetContentType(ContentType contentType);
97         void SetContentInfo(ContentInfo* pContentInfo);
98
99 private:
100         ContentType __contentType;
101         ContentInfo* __pContentInfo;
102
103         _ContentSearchResultImpl* __pImpl; // pubonly - for ABC
104         friend class _ContentSearchResultImpl;
105         friend class _ContentSearchImpl;
106         friend class _ContentDirectoryImpl;
107
108 };  // class ContentSearchResult
109
110 }} // Tizen::Content
111
112 #endif // _FCNT_CONTENT_SEARCH_RESULT_H_