1 /***************************************************************************
2 * Copyright (C) 2004 by Kita Developers *
3 * ikemo@users.sourceforge.jp *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
9 ***************************************************************************/
10 #ifndef KITAKITA_MISC_H
11 #define KITAKITA_MISC_H
13 #include <QtCore/QString>
15 #include <kdemacros.h>
25 /* URL conversion mode. see also Kita::convertURL() */
34 * @author Hideki Ikemoto
36 /*------------------------------*/
37 /* conversion of URL */
38 KDE_EXPORT KUrl getDatUrl(const KUrl& url , QString& refstr);
39 KDE_EXPORT KUrl getDatUrl(const KUrl& url);
41 QString getThreadUrl(const KUrl& url, QString& refstr);
42 KDE_EXPORT QString getThreadUrl(const KUrl& url);
43 KDE_EXPORT QString getWriteUrl(const KUrl& datUrl);
45 QString convertUrl(int mode, const KUrl& url , QString& refstr);
47 QString datToOfflaw(const KUrl& datUrl);
50 /*------------------------------*/
52 KDE_EXPORT uint datToSince(const KUrl& datUrl);
53 KDE_EXPORT int stringToPositiveNum(const QChar *cdat, const unsigned int length);
54 KDE_EXPORT QString getCategory(const QString& line);
55 KDE_EXPORT bool isBoardUrl(const QString& url);
56 KDE_EXPORT QString fontToString(const QFont& font);
58 /*------------------------------*/
59 /* internal parsing functions */
60 KDE_EXPORT QStringList parseSearchQuery(const QString& input);
64 void InitParseMachiBBS();
65 QString ParseMachiBBSOneLine(const QString& inputLine, int& nextNum);
68 QString ParseJBBSOneLine(const QString& line, int& nextNum);
71 /* for Flash CGI/Mini Thread */
72 QString ParseFlashCGIOneLine(const QString& line);