Q4Wine  2.0
Q4Wine is a Qt GUI for Wine.
Public Member Functions | Static Public Member Functions | List of all members
q4wine::lib::WinePrefix Class Reference

Describes a wine prefix configuration. More...

#include <q4wine/src/lib/wineprefix.hpp>

Inheritance diagram for q4wine::lib::WinePrefix:
q4wine::lib::DBObject

Public Member Functions

 WinePrefix ()
 
 WinePrefix (std::string name, std::string path, std::string arch, WineVersion *version, std::string mountPoint=std::string(), std::string virtualDrive=std::string(), std::string execTemplate=DEFAULT_EXEC_TEMPLATE, uintptr_t id=0)
 
 ~WinePrefix ()
 
virtual bool save (void)
 Object into DB. More...
 
std::string getEnvVariables (const WineApplication *wineApp)
 
std::string getExecutionString (const WineApplication *wineApp)
 
void setName (std::string name)
 
void setPath (std::string path)
 
void setArch (std::string arch)
 
void setVersion (WineVersion *version)
 
void setMountPoint (std::string mountPoint)
 
void setVirtualDrive (std::string virtualDevice)
 
void setExecutionTemplate (std::string execTemplate)
 
const std::string getName (void) const
 
const std::string getPath (void) const
 
const std::string getArch (void) const
 
WineVersiongetVersion (void) const
 
const std::string getMountPoint (void) const
 
const std::string getVirtualDrive (void) const
 
const std::string getExecutionTemplate (void) const
 
- Public Member Functions inherited from q4wine::lib::DBObject
 DBObject (std::string tableName, intptr_t id=0)
 
virtual ~DBObject ()
 
void setId (intptr_t id)
 
intptr_t getId (void) const
 

Static Public Member Functions

static WinePrefixgetInstance (intptr_t id)
 Create WinePrefix object from DB by version.id. More...
 

Additional Inherited Members

- Protected Attributes inherited from q4wine::lib::DBObject
DBEnginedb_
 
std::string tableName_
 
intptr_t id_
 

Detailed Description

Wine Terms

In terms of Wine WINEPREFIX is a directory which holds a virtual windows drive with separate wine settings (drives, virtual desktop, special dlls and so on).

Q4Wine Terms

In terms of Q4Wine WinePrefix is a set of options which describe basic WINEPREFIX configuration.

Note
It is possible to have multiple WinePrefix pointed to the single directory. In combination with WineVersion: setups is possible to run a number of truly independent wine processes.
Author
Alexey S. Malakhov breze.nosp@m.rk@g.nosp@m.mail..nosp@m.com

Constructor & Destructor Documentation

q4wine::lib::WinePrefix::WinePrefix ( )

Constructs an empty WinePreifx object.

q4wine::lib::WinePrefix::WinePrefix ( std::string  name,
std::string  path,
std::string  arch,
WineVersion version,
std::string  mountPoint = std::string(),
std::string  virtualDrive = std::string(),
std::string  execTemplate = DEFAULT_EXEC_TEMPLATE,
uintptr_t  id = 0 
)

Constructs an WinePreifx object.

Parameters
nameIs user defined name, should be unique. See also: setName getName
pathThe name of the directory where Wine will store its data. See also: setPath getPath
archIs the architecture supported by a given Wine prefix. It is set at prefix creation time and cannot be changed afterwards without wiping prefix directory content. See also: setArch getArch
versionAn WineVersion instance. See alse: setVersion getVersion
mountPointAn mount point directory where Disk images or CD/DVD drives will be mounted by user request. See also: setMountPoint getMountPoint
virtualDriveAn virtual drive letter for mount point. See also: setVirtualDrive getVirtualDrive
execTemplateWill be used to format command line string to run wine programs. See alse: setExecutionTemplate getExecutionTemplate
idThe associated row id. If it set to 0, then the object is not associated with any database record. See also: DBObject::setId DBObject::getId
q4wine::lib::WinePrefix::~WinePrefix ( )

Destroys this WinePrefix object.

Member Function Documentation

const std::string q4wine::lib::WinePrefix::getArch ( void  ) const
std::string q4wine::lib::WinePrefix::getEnvVariables ( const WineApplication wineApp)

Constructs wine env variables (WINEPREFIX, WINESERVER, WINELOADER, WINEDLLPATH, WINEARCH) using WinePrefix and WineVersion data.

Example: WINEPREFIX='/mnt/ssd/wine/' WINESERVER='/usr/bin/wineserver' WINELOADER='/usr/bin/wine' WINEDLLPATH='/usr/lib64/wine/' WINEARCH='win64'

Returns
Formatted env variables
std::string q4wine::lib::WinePrefix::getExecutionString ( const WineApplication wineApp)

Constructs execution string from temaplteString using WineAppliction data.

Parameters
wineAppAn reference to WineApplication instace.
Returns
Execution string.
const std::string q4wine::lib::WinePrefix::getExecutionTemplate ( void  ) const
WinePrefix * q4wine::lib::WinePrefix::getInstance ( intptr_t  id)
static
Parameters
idRecord id.
Returns
WinePrefix object or NULL if not found.
const std::string q4wine::lib::WinePrefix::getMountPoint ( void  ) const
const std::string q4wine::lib::WinePrefix::getName ( void  ) const
const std::string q4wine::lib::WinePrefix::getPath ( void  ) const
WineVersion * q4wine::lib::WinePrefix::getVersion ( void  ) const
const std::string q4wine::lib::WinePrefix::getVirtualDrive ( void  ) const
bool q4wine::lib::WinePrefix::save ( void  )
virtual
Returns
True on success.

Implements q4wine::lib::DBObject.

void q4wine::lib::WinePrefix::setArch ( std::string  arch)
void q4wine::lib::WinePrefix::setExecutionTemplate ( std::string  execTemplate)
void q4wine::lib::WinePrefix::setMountPoint ( std::string  mountPoint)
void q4wine::lib::WinePrefix::setName ( std::string  name)
void q4wine::lib::WinePrefix::setPath ( std::string  path)
void q4wine::lib::WinePrefix::setVersion ( WineVersion version)
void q4wine::lib::WinePrefix::setVirtualDrive ( std::string  virtualDevice)

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