34 lines
702 B
C++
34 lines
702 B
C++
#ifndef SNAVERURLVALIDATOR_H
|
|
#define SNAVERURLVALIDATOR_H
|
|
|
|
#include <QString>
|
|
|
|
class SNaverUrlValidator
|
|
{
|
|
private:
|
|
static const QString m_strSubDomain;
|
|
static const QString m_strProtocol;
|
|
static const QString m_strBaseHost;
|
|
static const QString m_strSecondaryHost;
|
|
|
|
QString m_strUserId;
|
|
QString m_strArticleNum;
|
|
|
|
QString m_strUrl;
|
|
|
|
bool m_isBaseHost;
|
|
bool m_isSecondaryHost;
|
|
|
|
private:
|
|
bool validateUrl();
|
|
int getHostStartPosition();
|
|
int checkHost(int _nHostStartPosition);
|
|
int checkPath(int _nHostStartPosition);
|
|
public:
|
|
SNaverUrlValidator(QString url);
|
|
QString makeUrl();
|
|
};
|
|
|
|
|
|
#endif // SNAVERURLVALIDATOR_H
|