26 QMutexLocker l(&
_lock);
43 QMutexLocker l(&
_lock);
67 QMutexLocker l(&
_lock);
73 VFS::LOG( QString(
"Issuing request for session: '%1'").arg(
id), 9 );
98 QObject *o = sender();
103 QMutexLocker l(&
_lock);
114 printf(
"COULD NOT FIND KEY FOR %p. Undefined behavior.\n", (
void *) s);
#define POST_ID_SESSION_DATA
bool _success
if the request was successfully completed
QJsonObject _metadata
the request payload
The VFS_session object represents a single session.
The socket client created by VFS_tcp_export.
QString _exportRoot
The VFS path to export.
The VFS_tcp_export class needs path information to translate between mounted VFS instances.
postID _id
The ID of this request.
virtual void execute()
DOCME.
A static class coupled with VFS_tcp_export_client for managing sessions.
static VFS_tcp_export_sessionManager _instance
A static instance of this class, used to receive expirations.
static QMutex _lock
A mutex for locking _sessions.
static QMap< QString, bool > _requests
Sessions which are currently under request.
static QMap< QString, VFS_session * > _sessions
The sessions registered to this node.
static bool registerSession(QString id, VFS_session *session)
Register a session with the session registry.
static VFS_session * fetchSession(QString id)
Fetch a session by id.
void expireSession(bool)
A session has expired.
static bool requestSession(QString id, VFS_tcp_export_client *client)
Request a session by id from a given VFS_tcp_export_client.
static void LOG(QString message, int level=0, QString user="server")
Send a message to the VFS::_messages VFS_stream.