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
30 PluginRegistration::PluginRegistration(Impl* impl) : m_impl(impl)
32 Assert(impl != 0 && "impl is NULL");
35 template<typename SignalSignature>
36 void PluginRegistration::Connect(const typename SignalSignature::Type& slot)
38 m_impl->Connect<SignalSignature>(slot);
41 void PluginRegistration::DisconnectAll()
43 m_impl->DisconnectAll();
46 void PluginRegistration::AddPlugin(Plugin& plugin)
48 m_impl->AddPlugin(plugin);
51 #define EXPLICIT_INSTATIATE_PLUGIN_REGISTRATION(SignalSignature) \
52 template void PluginRegistration::Connect<SignalSignature>( \
53 const typename SignalSignature::Type&)
55 EXPLICIT_INSTATIATE_PLUGIN_REGISTRATION(OnWidgetStart);
56 EXPLICIT_INSTATIATE_PLUGIN_REGISTRATION(OnWidgetStop);
57 EXPLICIT_INSTATIATE_PLUGIN_REGISTRATION(OnFrameLoad);
58 EXPLICIT_INSTATIATE_PLUGIN_REGISTRATION(OnFrameUnload);