2 * Copyright (c) 2012 Samsung Electronics Co., Ltd All Rights Reserved
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 * This file contains the declaration of custom handler dao class.
19 * @file custom_handler_dao_read_only.h
20 * @author Krzysztof Jackiewicz (k.jackiewicz@samsung.com)
22 * @brief This file contains the declaration of custom handler dao
25 #ifndef _CUSTOM_HANDLER_DAO_READ_ONLY_H_
26 #define _CUSTOM_HANDLER_DAO_READ_ONLY_H_
28 #include <dpl/string.h>
29 #include <dpl/exception.h>
30 #include "common_dao_types.h"
32 namespace CustomHandlerDB {
33 class CustomHandlerDAOReadOnly
37 * CustomHandlerDAOReadOnly Exception classes
42 DECLARE_EXCEPTION_TYPE(DPL::Exception, Base)
43 DECLARE_EXCEPTION_TYPE(Base, DatabaseError)
47 explicit CustomHandlerDAOReadOnly(const DPL::String& pkgName);
48 virtual ~CustomHandlerDAOReadOnly();
51 * Returns protocol handler
53 CustomHandlerPtr getProtocolHandler(const DPL::String& protocol,
54 const DPL::String& url);
55 CustomHandlerPtr getProtocolHandler(const DPL::String& protocol,
56 const DPL::String& url,
57 const DPL::String& baseURL);
60 * Returns protocol handler that is agreed or agreed and saved and match
63 CustomHandlerPtr getActivProtocolHandler(const DPL::String& protocol);
66 * Returns content handler
68 CustomHandlerPtr getContentHandler(const DPL::String& content,
69 const DPL::String& url);
70 CustomHandlerPtr getContentHandler(const DPL::String& protocol,
71 const DPL::String& url,
72 const DPL::String& baseURL);
75 * Returns content handler that is agreed or agreed and saved and match
78 CustomHandlerPtr getActivContentHandler(const DPL::String& content);
81 DPL::String m_pkgName;
83 } // namespace CustomHandlerDB
85 #endif // _CUSTOM_HANDLER_DAO_READ_ONLY_H_