File indexing completed on 2019-04-16 17:04:21

0001 /*
0002     This file is part of Choqok, the KDE micro-blogging client
0003 
0004     Copyright (C) 2008-2012 Mehrdad Momeny <mehrdad.momeny@gmail.com>
0005 
0006     This program is free software; you can redistribute it and/or
0007     modify it under the terms of the GNU General Public License as
0008     published by the Free Software Foundation; either version 2 of
0009     the License or (at your option) version 3 or any later version
0010     accepted by the membership of KDE e.V. (or its successor approved
0011     by the membership of KDE e.V.), which shall act as a proxy
0012     defined in Section 14 of version 3 of the license.
0013 
0014 
0015     This program is distributed in the hope that it will be useful,
0016     but WITHOUT ANY WARRANTY; without even the implied warranty of
0017     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
0018     GNU General Public License for more details.
0019 
0020     You should have received a copy of the GNU General Public License
0021     along with this program; if not, see http://www.gnu.org/licenses/
0022 */
0023 
0024 #ifndef SHORTENER_H
0025 #define SHORTENER_H
0026 
0027 #include <QString>
0028 
0029 #include "plugin.h"
0030 
0031 
0032 namespace Choqok{
0033 /**
0034 @brief The base class for a Shortener plugin main class.
0035 
0036 @author Mehrdad Momeny \<mehrdad.momeny@gmail.com\>
0037 */
0038 class CHOQOK_EXPORT Shortener : public Plugin
0039 {
0040 Q_OBJECT
0041 public:
0042     virtual ~Shortener();
0043     /**
0044         Shorten the @p url and return the shortened URL
0045     */
0046     virtual QString shorten( const QString &url );
0047 
0048 protected:
0049     Shortener( const KComponentData &instance, QObject *parent );
0050 };
0051 }//End Namespace Choqok
0052 #endif