Update NEWS for 0.3.1
[nomnom.git] / src / feed / nfeed.cpp
blob0bb7b0d90b493a241bd96e41ebca185ab1f28de4
1 /* NomNom
2 * Copyright (C) 2011 Toni Gundogdu <legatvs@gmail.com>
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 #include "config.h"
20 #include <QStringList>
21 #include <QFileInfo>
22 #include <QProcess>
24 #include <NFeed>
26 namespace nn
29 namespace feed
32 QStringList to_args(const QStringList& _args,
33 const QString& type,
34 const QString& ident,
35 const int startIndex,
36 const int maxResults,
37 const bool all)
39 QStringList args = _args;
40 args << "--json"
41 << "-t"
42 << type
43 << ident;
44 if (all)
45 args << "-a";
46 else
48 args << "-s" << QString::number(startIndex);
49 args << "-m" << QString::number(maxResults);
51 return args;
54 } // namespace feed
56 } // namespace nn
58 /* vim: set ts=2 sw=2 tw=72 expandtab: */