ACF $AcfVersion:0$
Public Member Functions | List of all members
ifile::ITempFileManager Class Referenceabstract

Manager for working with the temporary files. More...

#include <ITempFileManager.h>

Inheritance diagram for ifile::ITempFileManager:
istd::IPolymorphic ifile::CTempFileManagerComp

Public Member Functions

virtual QByteArray BeginSession (const QString &subPath=QString(), const QByteArray &proposedSessionId=QByteArray())=0
 Start a new session for managing temporary files.
 
virtual QByteArray AddFileItem (const QByteArray &sessionId, const QString &fileName, const QByteArray &proposedSessionId=QByteArray())=0
 Add a new file to the session.
 
virtual QString GetPath (const QByteArray &sessionId, const QByteArray &id) const =0
 Get the generated path of the file or folder by its ID.
 
virtual bool RemoveFileItem (const QByteArray &sessionId, const QByteArray &id)=0
 Remove the file or folder given by its ID.
 
virtual void FinishSession (const QByteArray &sessionId)=0
 Finish the given session.
 
virtual void ResetAllSessions ()=0
 Remove all running sessions.
 
- Public Member Functions inherited from istd::IPolymorphic
virtual ~IPolymorphic ()
 

Detailed Description

Manager for working with the temporary files.

Definition at line 20 of file ITempFileManager.h.

Member Function Documentation

◆ AddFileItem()

virtual QByteArray ifile::ITempFileManager::AddFileItem ( const QByteArray &  sessionId,
const QString &  fileName,
const QByteArray &  proposedSessionId = QByteArray() 
)
pure virtual

Add a new file to the session.

The generated file path will be inside of the session's base folder.

Implemented in ifile::CTempFileManagerComp.

◆ BeginSession()

virtual QByteArray ifile::ITempFileManager::BeginSession ( const QString &  subPath = QString(),
const QByteArray &  proposedSessionId = QByteArray() 
)
pure virtual

Start a new session for managing temporary files.

A new folder with the name subPath will be created inside of the root directory for the temp files (e.g. system temp). After a session was created, you can generate file paths for temporary files using returned session-ID.

Parameters
subPathPath to the subfolder for the session files inside of the temp directory used for this session.
proposedSessionIdThe used-ID for the new session. If this value is empty, an unique ID will be generated automatically.
Returns
Created session-ID or an empty value if the creation of the new session was failed.
Note
If a session with the same name or the same session-ID already exists, no new session will be created and the existing session-ID will be returned.

Implemented in ifile::CTempFileManagerComp.

◆ FinishSession()

virtual void ifile::ITempFileManager::FinishSession ( const QByteArray &  sessionId)
pure virtual

Finish the given session.

All files contained in the session folder and the folder itself will be removed.

Implemented in ifile::CTempFileManagerComp.

◆ GetPath()

virtual QString ifile::ITempFileManager::GetPath ( const QByteArray &  sessionId,
const QByteArray &  id 
) const
pure virtual

Get the generated path of the file or folder by its ID.

Implemented in ifile::CTempFileManagerComp.

◆ RemoveFileItem()

virtual bool ifile::ITempFileManager::RemoveFileItem ( const QByteArray &  sessionId,
const QByteArray &  id 
)
pure virtual

Remove the file or folder given by its ID.

Implemented in ifile::CTempFileManagerComp.

◆ ResetAllSessions()

virtual void ifile::ITempFileManager::ResetAllSessions ( )
pure virtual

Remove all running sessions.

Implemented in ifile::CTempFileManagerComp.


The documentation for this class was generated from the following file: