ACF $AcfVersion:0$
CSystemLocationComp.h
Go to the documentation of this file.
1// SPDX-License-Identifier: LGPL-2.1-or-later OR GPL-2.0-or-later OR GPL-3.0-or-later OR LicenseRef-ACF-Commercial
2#pragma once
3
4
5// ACF includes
11
12
13namespace ifile
14{
15
16
22 virtual public ifile::IFileNameParam
23{
24public:
26
62
63 I_BEGIN_COMPONENT(CSystemLocationComp);
64 I_REGISTER_INTERFACE(iser::ISerializable);
65 I_REGISTER_INTERFACE(ifile::IFileNameParam);
66 I_ASSIGN(m_locationTypeAttrPtr, "LocationType", "Type of system location:\n0 - user's desktop directory\n1 - user's document\n2 - user's fonts\n3 - user's applications\n4 - users music\n5 - user's movies\n6 - user's movies\n7 - system's temporary directory\n8 - user's home directory\n9 - directory location where persistent application data can be stored\n10 - Returns a directory location where user-specific non-essential (cached) data should be written\n100 - Working directory for the running executable\n101 - Directory of the executable file\n102 - Path to the executable file\n103 - Application's local content folder\n104 - User-indepedent company data folder\n105 - User-indepedent application's data folder", true, 0);
67 I_ASSIGN(m_applicationInfoCompPtr, "ApplicationInfo", "Application info", false, "ApplicationInfo");
68 I_END_COMPONENT;
69
70 // reimplemented (ifile::IFileNameParam)
71 virtual int GetPathType() const override;
72 virtual const QString& GetPath() const override;
73 virtual void SetPath(const QString& path) override;
74
75 // reimplemented (iser::ISerializable)
76 virtual bool Serialize(iser::IArchive& archive) override;
77
78protected:
79 // reimplemented (icomp::CComponentBase)
80 virtual void OnComponentCreated() override;
81
82private:
83 I_REF(ibase::IApplicationInfo, m_applicationInfoCompPtr);
84
85 I_ATTR(int, m_locationTypeAttrPtr);
86
87 QString m_storagePath;
88};
89
90
91} // namespace ifile
92
93
This interface provides some information about the application.
Base class for component implementation.
Provider of system pathes.
virtual const QString & GetPath() const override
Get path.
virtual bool Serialize(iser::IArchive &archive) override
Load or store state of this object as a archive stream.
virtual int GetPathType() const override
Get intended type of the path.
virtual void OnComponentCreated() override
icomp::CComponentBase BaseClass
virtual void SetPath(const QString &path) override
Set path.
@ SL_SHARED_COMPANY_DIRECTORY
User- and application-independent company data folder.
@ SL_EXECUTABLE_DIRECTORY
Path to the directory where the executable file is located.
@ SL_EXECUTABLE_FILE
Path to the exectuable file.
@ SL_SHARED_APPDATA_DIRECTORY
User-independent application's data folder.
@ SL_WORKING_DIRECTORY
Working directory of the application.
@ SL_EXECUTABLE_CONTENT
Directory for the application's content.
Common interface for any file system item name (e.g directory, file or URL path)
Represents an input/output persistence archive for object serialization.
Definition IArchive.h:164
Common class for all classes which objects can be archived or restored from archive.
Contains interfaces and implementations of file system related components.