File indexing completed on 2024-12-22 04:57:54

0001 /*
0002     SPDX-FileCopyrightText: 2016 Stefan Stäglich <sstaeglich@kdemail.net>
0003 
0004     SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #include "o1tomboy.h"
0008 
0009 O1Tomboy::O1Tomboy(QObject *parent)
0010     : O1(parent)
0011 {
0012 }
0013 
0014 void O1Tomboy::setBaseURL(const QString &value)
0015 {
0016     setRequestTokenUrl(QUrl(value + QStringLiteral("/oauth/request_token")));
0017     setAuthorizeUrl(QUrl(value + QStringLiteral("/oauth/authorize")));
0018     setAccessTokenUrl(QUrl(value + QStringLiteral("/oauth/access_token")));
0019     setClientId(QStringLiteral("anyone"));
0020     setClientSecret(QStringLiteral("anyone"));
0021 }
0022 
0023 QString O1Tomboy::getRequestToken() const
0024 {
0025     return requestToken_;
0026 }
0027 
0028 QString O1Tomboy::getRequestTokenSecret() const
0029 {
0030     return requestTokenSecret_;
0031 }
0032 
0033 void O1Tomboy::restoreAuthData(const QString &token, const QString &secret)
0034 {
0035     requestToken_ = token;
0036     requestTokenSecret_ = secret;
0037     setLinked(true);
0038 }
0039 
0040 #include "moc_o1tomboy.cpp"