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 * @file PluginRegistration.cpp
18 * @author Zbigniew Kostrzewa (z.kostrzewa@samsung.com)
21 #include "PluginRegistration.h"
23 #include "PluginRegistrationImpl.h"
25 #include <dpl/assert.h>
27 namespace WrtPluginsApi {
28 PluginRegistration::PluginRegistration(Impl* impl) : m_impl(impl)
30 AssertMsg(impl != 0, "impl is NULL");
33 template<typename SignalSignature>
34 void PluginRegistration::Connect(const typename SignalSignature::Type& slot)
36 m_impl->Connect<SignalSignature>(slot);
39 void PluginRegistration::DisconnectAll()
41 m_impl->DisconnectAll();
44 void PluginRegistration::AddPlugin(Plugin& plugin)
46 m_impl->AddPlugin(plugin);
49 #define EXPLICIT_INSTATIATE_PLUGIN_REGISTRATION(SignalSignature) \
50 template void PluginRegistration::Connect<SignalSignature>( \
51 const typename SignalSignature::Type &)
53 EXPLICIT_INSTATIATE_PLUGIN_REGISTRATION(OnWidgetStart);
54 EXPLICIT_INSTATIATE_PLUGIN_REGISTRATION(OnWidgetStop);
55 EXPLICIT_INSTATIATE_PLUGIN_REGISTRATION(OnFrameLoad);
56 EXPLICIT_INSTATIATE_PLUGIN_REGISTRATION(OnFrameUnload);