/**********************************************************************
 * LeechCraft - modular cross-platform feature rich internet client.
 * Copyright (C) 2006-2014  Georg Rudoy
 *
 * Distributed under the Boost Software License, Version 1.0.
 * (See accompanying file LICENSE or copy at https://www.boost.org/LICENSE_1_0.txt)
 **********************************************************************/

#include "pasteservicefactory.h"
#include <QIcon>
#include "bpasteservice.h"
#include "pasteorgruservice.h"

namespace LC::Azoth::Autopaste
{
	namespace
	{
		template<typename T>
		T* Creator (QObject *entry)
		{
			return new T { entry };
		}
	}

	PasteServiceFactory::PasteServiceFactory ()
	{
		Infos_.push_back ({ "bpaste.net", QIcon (), &Creator<BPasteService> });
		Infos_.push_back ({ "paste.org.ru", QIcon (), &Creator<PasteOrgRuService> });
	}

	QList<PasteServiceFactory::PasteInfo> PasteServiceFactory::GetInfos () const
	{
		return Infos_;
	}
}
