|
KiCad PCB EDA Suite
|
#include <lockfile.h>
Public Member Functions | |
| LOCKFILE (const wxString &filename, bool aRemoveOnRelease=true) | |
| LOCKFILE (LOCKFILE &&other) noexcept | |
| ~LOCKFILE () | |
| void | UnlockFile () |
| Unlock and remove the file from the filesystem as long as we still own it. | |
| bool | OverrideLock (bool aRemoveOnRelease=true) |
| Force the lock, overwriting the data that existed already. | |
| bool | IsLockedByMe () |
| wxString | GetUsername () |
| wxString | GetHostname () |
| wxString | GetErrorMsg () |
| bool | Locked () const |
| bool | Valid () const |
| operator bool () const | |
Private Member Functions | |
| bool | checkUserAndHost () |
Private Attributes | |
| wxString | m_originalFile |
| wxString | m_lockFilename |
| wxString | m_username |
| wxString | m_hostname |
| bool | m_fileCreated |
| bool | m_status |
| bool | m_removeOnRelease |
| wxString | m_errorMsg |
Definition at line 38 of file lockfile.h.
|
inline |
Definition at line 41 of file lockfile.h.
References _, LCK, FILEEXT::LockFileExtension, FILEEXT::LockFilePrefix, m_errorMsg, m_fileCreated, m_hostname, m_lockFilename, m_originalFile, m_removeOnRelease, m_status, and m_username.
Referenced by LOCKFILE().
|
inlinenoexcept |
Definition at line 137 of file lockfile.h.
References LOCKFILE().
|
inline |
Definition at line 151 of file lockfile.h.
References UnlockFile().
|
inlineprivate |
Definition at line 284 of file lockfile.h.
References LCK, m_hostname, m_lockFilename, and m_username.
Referenced by UnlockFile().
|
inline |
Definition at line 257 of file lockfile.h.
References m_errorMsg.
|
inline |
Definition at line 252 of file lockfile.h.
References m_hostname.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), KICAD_MANAGER_FRAME::LoadProject(), and KICAD_MANAGER_FRAME::ProjectChanged().
|
inline |
Definition at line 246 of file lockfile.h.
References m_username.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), KICAD_MANAGER_FRAME::LoadProject(), and KICAD_MANAGER_FRAME::ProjectChanged().
|
inline |
Definition at line 232 of file lockfile.h.
References m_hostname, and m_username.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), KICAD_MANAGER_FRAME::LoadProject(), and KICAD_MANAGER_FRAME::ProjectChanged().
|
inline |
Definition at line 259 of file lockfile.h.
References m_fileCreated.
Referenced by BOOST_AUTO_TEST_CASE().
|
inlineexplicit |
Definition at line 269 of file lockfile.h.
References m_status.
|
inline |
Force the lock, overwriting the data that existed already.
Definition at line 179 of file lockfile.h.
References LCK, m_errorMsg, m_fileCreated, m_hostname, m_lockFilename, m_removeOnRelease, m_status, and m_username.
Referenced by BOOST_AUTO_TEST_CASE(), KICAD_MANAGER_FRAME::LoadProject(), and KICAD_MANAGER_FRAME::ProjectChanged().
|
inline |
Unlock and remove the file from the filesystem as long as we still own it.
Definition at line 159 of file lockfile.h.
References checkUserAndHost(), LCK, m_errorMsg, m_fileCreated, m_lockFilename, m_removeOnRelease, and m_status.
Referenced by ~LOCKFILE().
|
inline |
Definition at line 264 of file lockfile.h.
References m_status.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), KICAD_MANAGER_FRAME::LoadProject(), SETTINGS_MANAGER::LoadProject(), and KICAD_MANAGER_FRAME::ProjectChanged().
|
private |
Definition at line 282 of file lockfile.h.
Referenced by GetErrorMsg(), LOCKFILE(), OverrideLock(), and UnlockFile().
|
private |
Definition at line 279 of file lockfile.h.
Referenced by Locked(), LOCKFILE(), OverrideLock(), and UnlockFile().
|
private |
Definition at line 278 of file lockfile.h.
Referenced by checkUserAndHost(), GetHostname(), IsLockedByMe(), LOCKFILE(), and OverrideLock().
|
private |
Definition at line 276 of file lockfile.h.
Referenced by checkUserAndHost(), LOCKFILE(), OverrideLock(), and UnlockFile().
|
private |
Definition at line 275 of file lockfile.h.
Referenced by LOCKFILE().
|
private |
Definition at line 281 of file lockfile.h.
Referenced by LOCKFILE(), OverrideLock(), and UnlockFile().
|
private |
Definition at line 280 of file lockfile.h.
Referenced by LOCKFILE(), operator bool(), OverrideLock(), UnlockFile(), and Valid().
|
private |
Definition at line 277 of file lockfile.h.
Referenced by checkUserAndHost(), GetUsername(), IsLockedByMe(), LOCKFILE(), and OverrideLock().