2 // Open Service Platform
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
5 // Licensed under the Apache License, Version 2.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
9 // http://www.apache.org/licenses/LICENSE-2.0
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
19 * @file FMedia_RecorderCapability.h
20 * @brief This header file contains the implementation header for Recorder capability.
23 #ifndef _FMEDIA_INTERNAL_RECORDER_CAPABILITY_H_
24 #define _FMEDIA_INTERNAL_RECORDER_CAPABILITY_H_
27 #include "FMedia_RecorderTypes.h"
28 #include "FMedia_CapabilityTypes.h"
30 namespace Tizen { namespace Media
33 typedef Tizen::Base::Object* (*_RecorderQueryFunc)(_RecorderSourceType, _QueryType, _ResultType&);
36 * @class _RecorderCapability
37 * @brief This class is common for recorder capability.
40 class _RecorderCapability
41 : public Tizen::Base::Object
45 * function to get the for specific key type
47 * @return The list which contains the values
48 * @param[in] key camera operation query key
49 * @param[out] itemType item type of returned IList
50 * @exception E_SUCCESS The method is successful.
51 * @exception E_OBJ_NOT_FOUND invalid key
52 * @exception E_SYSTEM A system error has occurred.
53 * @exception E_UNSUPPORTED_OPERATION operation not supported
55 static Tizen::Base::Collection::ArrayList* GetListN(_RecorderOperationType key, _ResultType& itemType);
59 * function to check the feature support
62 * @param[in] key camera operation query key
63 * @exception E_SUCCESS The method is successful.
64 * @exception E_SYSTEM A system error has occurred.
65 * @exception E_OUT_OF_MEMORY system has no memory
66 * @exception E_OBJ_NOT_FOUND invalid key
67 * @exception E_UNSUPPORTED_OPERATION operation not supported
69 static bool IsSupported(_RecorderOperationType key);
72 * function to get the default value for a specific key
74 * @return The object which contains the values
75 * @param[in] key Recorder operation query key
76 * @param[in] queryType parameter to get the list items or default value of an attribute
77 * @param[out] itemType item type of returned IList
78 * @exception E_SUCCESS The method is successful.
79 * @exception E_SYSTEM A system error has occurred.
80 * @exception E_OUT_OF_MEMORY system has no memory
81 * @exception E_OBJ_NOT_FOUND invalid key
82 * @exception E_UNSUPPORTED_OPERATION operation not supported
84 static Tizen::Base::Object* GetValueN(_RecorderOperationType key, _QueryType queryType, _ResultType& itemType);
89 _RecorderOperationType key;
90 _RecorderSourceType sourceType;
91 _RecorderQueryFunc serviceRoutine;
97 _RecorderCapability(void);
101 * Resources are deallocated by this method.
103 ~_RecorderCapability(void);
106 * function to get the supported Video file format
108 * @return The object which contains the values
109 * @param[in] sourceType camera type [primary/secondary]
110 * @param[in] queryType parameter to get the list items or default value of an attribute
111 * @param[out] itemType item type of returned IList
112 * @exception E_SUCCESS The method is successful.
113 * @exception E_SYSTEM A system error has occurred.
114 * @exception E_OUT_OF_MEMORY system has no memory
115 * @exception E_OBJ_NOT_FOUND invalid key
117 static Tizen::Base::Object* GetSupportedVideoFileFormatN(_RecorderSourceType sourceType, _QueryType queryType, _ResultType& itemType);
121 * function to get the supported Audio file format
123 * @return The object which contains the values
124 * @param[in] sourceType camera type [primary/secondary]
125 * @param[in] queryType parameter to get the list items or default value of an attribute
126 * @param[out] itemType item type of returned IList
127 * @exception E_SUCCESS The method is successful.
128 * @exception E_SYSTEM A system error has occurred.
129 * @exception E_OUT_OF_MEMORY system has no memory
130 * @exception E_OBJ_NOT_FOUND invalid key
132 static Tizen::Base::Object* GetSupportedAudioFileFormatN(_RecorderSourceType sourceType, _QueryType queryType, _ResultType& itemType);
136 * function to get the supported Audio Encoder list
138 * @return The object which contains the values
139 * @param[in] sourceType camera type [primary/secondary]
140 * @param[in] queryType parameter to get the list items or default value of an attribute
141 * @param[out] itemType item type of returned IList
142 * @exception E_SUCCESS The method is successful.
143 * @exception E_SYSTEM A system error has occurred.
144 * @exception E_OUT_OF_MEMORY system has no memory
145 * @exception E_OBJ_NOT_FOUND invalid key
147 static Tizen::Base::Object* GetSupportedAudioEncoderN(_RecorderSourceType sourceType, _QueryType queryType, _ResultType& itemType);
150 * function to get the supported Video Encoder list
152 * @return The object which contains the values
153 * @param[in] sourceType camera type [primary/secondary]
154 * @param[in] queryType parameter to get the list items or default value of an attribute
155 * @param[out] itemType item type of returned IList
156 * @exception E_SUCCESS The method is successful.
157 * @exception E_SYSTEM A system error has occurred.
158 * @exception E_OUT_OF_MEMORY system has no memory
159 * @exception E_OBJ_NOT_FOUND invalid key
161 static Tizen::Base::Object* GetSupportedVideoEncoderN(_RecorderSourceType sourceType, _QueryType queryType, _ResultType& itemType);
163 static bool SupportedRecorderVideoFileFormatCb(recorder_file_format_e format, void *pUserData);
164 static bool SupportedRecorderAudioFileFormatCb(recorder_file_format_e format, void *pUserData);
165 static bool SupportedRecorderAudioEncoderCb(recorder_audio_codec_e codec, void *pUserData);
166 static bool SupportedRecorderVideoEncoderCb(recorder_video_codec_e codec, void *pUserData);
168 _RecorderCapability(const _RecorderCapability& rhs);
169 _RecorderCapability& operator =(const _RecorderCapability& rhs);
171 static const keyServiceMap __SERVICE_MAP[];