22 #ifndef CTKXNATSESSION_H
23 #define CTKXNATSESSION_H
25 #include "ctkXNATCoreExport.h"
27 #include <QScopedPointer>
31 #include <QVariantMap>
37 class ctkXnatSessionPrivate;
244 const QString& resource,
300 QScopedPointer<ctkXnatSessionPrivate>
d_ptr;
305 Q_SLOT
void emitTimeOut();
The ctkXnatDataModel class reprents the root object in a XNAT data hierarchy.
A login profile for XNAT sessions.
The ctkXnatSession class reprents a session object associated with a specific XNAT connection.
Q_SIGNAL void sessionAboutToBeClosed()
Signals that the session is about to be closed.
QString version() const
Get the XNAT server version.
ctkXnatLoginProfile loginProfile() const
Get the current login profile for this session object.
QList< ctkXnatObject * > httpResults(const QUuid &uuid, const QString &schemaType)
TODO.
void close()
Closes this XNAT session.
void setDefaultDownloadDir(const QString &path)
Sets the default location where files will be saved after being downloaded.
QUrl url() const
Get XNAT server url.
bool isOpen() const
Returns the open state of this XNAT session.
QList< QVariantMap > httpSync(const QUuid &uuid)
TODO.
QUuid httpHead(const QString &resourceUri)
Sends a http HEAD request to the xnat instance.
const QMap< QByteArray, QByteArray > httpHeadSync(const QUuid &uuid)
Reads the result of a head request.
Q_SIGNAL void aboutToTimeOut()
Signals that the session will time out in one minute.
void download(const QString &fileName, const QString &resource, const UrlParameters ¶meters=UrlParameters(), const HttpRawHeaders &rawHeaders=HttpRawHeaders())
ctkXnatDataModel * dataModel() const
QScopedPointer< ctkXnatSessionPrivate > d_ptr
QMap< QByteArray, QByteArray > HttpRawHeaders
QUuid httpPut(const QString &resource, const UrlParameters ¶meters=UrlParameters(), const HttpRawHeaders &rawHeaders=HttpRawHeaders())
TODO.
QString password() const
Get the password for this XNAT session.
Q_SIGNAL void timedOut()
Signals that the session has timed out.
void upload(ctkXnatFile *xnatFile, const UrlParameters ¶meters=UrlParameters(), const HttpRawHeaders &rawHeaders=HttpRawHeaders())
void setHttpNetworkProxy(const QNetworkProxy &proxy)
Sets a network proxy that will be used to connect with XNAT.
QDateTime expirationDate() const
Get the expiration date for this XNAT session.
void open()
Open a new XNAT session.
void processResult(QUuid queryId, QList< QVariantMap > parameters)
Q_SIGNAL void progress(QUuid, double)
bool exists(const ctkXnatObject *object)
void remove(ctkXnatObject *object)
QUuid httpGet(const QString &resource, const UrlParameters ¶meters=UrlParameters(), const HttpRawHeaders &rawHeaders=HttpRawHeaders())
TODO.
QDateTime renew()
Re-new the XNAT session.
QMap< QString, QString > UrlParameters
ctkXnatSession(const ctkXnatLoginProfile &loginProfile)
void onProgress(QUuid queryId, double onProgress)
Q_SIGNAL void sessionRenewed(const QDateTime &expirationDate)
Signals that the session was re-newed.
Q_SIGNAL void sessionOpened()
Signals that the session was just opened.
QString sessionId() const
Get the sessionId for this XNAT session.
QString defaultDownloadDir() const
returns the default download location
QString userName() const
Get the user name for this XNAT session.