LibreOffice Module svl (master) 1
|
#include <sharecontrolfile.hxx>
Public Member Functions | |
ShareControlFile (std::u16string_view aOrigURL) | |
virtual | ~ShareControlFile () override |
std::vector< LockFileEntry > | GetUsersData () |
void | SetUsersDataAndStore (std::unique_lock< std::mutex > &rGuard, std::vector< LockFileEntry > &&aUserNames) |
LockFileEntry | InsertOwnEntry () |
bool | HasOwnEntry () |
void | RemoveEntry (const LockFileEntry &aOptionalSpecification) |
void | RemoveEntry () |
void | RemoveFile () |
Public Member Functions inherited from svt::LockFileCommon | |
LockFileCommon (OUString aLockFileURL) | |
virtual | ~LockFileCommon () |
const OUString & | GetURL () const |
void | SetURL (const OUString &aURL) |
Private Member Functions | |
void | Close () |
bool | IsValid () const |
void | RemoveFileImpl (std::unique_lock< std::mutex > &rGuard) |
std::vector< LockFileEntry > | GetUsersDataImpl (std::unique_lock< std::mutex > &rGuard) |
Private Attributes | |
css::uno::Reference< css::io::XStream > | m_xStream |
css::uno::Reference< css::io::XInputStream > | m_xInputStream |
css::uno::Reference< css::io::XOutputStream > | m_xOutputStream |
css::uno::Reference< css::io::XSeekable > | m_xSeekable |
css::uno::Reference< css::io::XTruncate > | m_xTruncate |
std::vector< LockFileEntry > | m_aUsersData |
Additional Inherited Members | |
Static Public Member Functions inherited from svt::LockFileCommon | |
static void | ParseList (const css::uno::Sequence< sal_Int8 > &aBuffer, std::vector< LockFileEntry > &rOutput) |
static LockFileEntry | ParseEntry (const css::uno::Sequence< sal_Int8 > &aBuffer, sal_Int32 &o_nCurPos) |
static OUString | ParseName (const css::uno::Sequence< sal_Int8 > &aBuffer, sal_Int32 &o_nCurPos) |
static OUString | EscapeCharacters (const OUString &aSource) |
static OUString | GetOOOUserName () |
static OUString | GetCurrentLocalTime () |
static LockFileEntry | GenerateOwnEntry () |
static INetURLObject | ResolveLinks (const INetURLObject &aDocURL) |
Static Protected Member Functions inherited from svt::LockFileCommon | |
static OUString | GenerateOwnLockFileURL (std::u16string_view aOrigURL, std::u16string_view aPrefix) |
This method generates the URL of the lock file based on the document URL and the specified prefix. More... | |
Protected Attributes inherited from svt::LockFileCommon | |
std::mutex | m_aMutex |
Definition at line 36 of file sharecontrolfile.hxx.
svt::ShareControlFile::ShareControlFile | ( | std::u16string_view | aOrigURL | ) |
Definition at line 47 of file sharecontrolfile.cxx.
References ucbhelper::Content::executeCommand(), ucbhelper::Content::get(), comphelper::getProcessComponentContext(), svt::LockFileCommon::GetURL(), IsValid(), m_xInputStream, m_xOutputStream, m_xSeekable, m_xStream, m_xTruncate, ucbhelper::Content::openWriteableStreamNoLock(), ucbhelper::Content::setPropertyValue(), u, and xStream.
|
overridevirtual |
Definition at line 104 of file sharecontrolfile.cxx.
References Close().
|
private |
Definition at line 114 of file sharecontrolfile.cxx.
References m_aUsersData, m_xInputStream, m_xOutputStream, m_xSeekable, m_xStream, and m_xTruncate.
Referenced by RemoveFileImpl(), and ~ShareControlFile().
std::vector< o3tl::enumarray< LockFileComponent, OUString > > svt::ShareControlFile::GetUsersData | ( | ) |
Definition at line 140 of file sharecontrolfile.cxx.
References GetUsersDataImpl(), and svt::LockFileCommon::m_aMutex.
|
private |
Definition at line 146 of file sharecontrolfile.cxx.
References aBuffer, IsValid(), m_aUsersData, m_xInputStream, m_xSeekable, nLength, svt::LockFileCommon::ParseList(), and SAL_MAX_INT32.
Referenced by GetUsersData(), HasOwnEntry(), InsertOwnEntry(), and RemoveEntry().
bool svt::ShareControlFile::HasOwnEntry | ( | ) |
Definition at line 255 of file sharecontrolfile.cxx.
References svt::LockFileCommon::GenerateOwnEntry(), GetUsersDataImpl(), IsValid(), LOCALHOST, svt::LockFileCommon::m_aMutex, m_aUsersData, SYSUSERNAME, and USERURL.
LockFileEntry svt::ShareControlFile::InsertOwnEntry | ( | ) |
Definition at line 213 of file sharecontrolfile.cxx.
References svt::LockFileCommon::GenerateOwnEntry(), GetUsersDataImpl(), IsValid(), LOCALHOST, svt::LockFileCommon::m_aMutex, m_aUsersData, SetUsersDataAndStore(), SYSUSERNAME, and USERURL.
|
inlineprivate |
Definition at line 47 of file sharecontrolfile.hxx.
References m_xSeekable, and m_xStream.
Referenced by GetUsersDataImpl(), HasOwnEntry(), InsertOwnEntry(), RemoveEntry(), RemoveFileImpl(), SetUsersDataAndStore(), and ShareControlFile().
void svt::ShareControlFile::RemoveEntry | ( | ) |
Definition at line 281 of file sharecontrolfile.cxx.
References svt::LockFileCommon::GenerateOwnEntry(), and RemoveEntry().
Referenced by RemoveEntry().
void svt::ShareControlFile::RemoveEntry | ( | const LockFileEntry & | aOptionalSpecification | ) |
Definition at line 286 of file sharecontrolfile.cxx.
References GetUsersDataImpl(), IsValid(), LOCALHOST, svt::LockFileCommon::m_aMutex, m_aUsersData, RemoveFileImpl(), SetUsersDataAndStore(), SYSUSERNAME, and USERURL.
void svt::ShareControlFile::RemoveFile | ( | ) |
Definition at line 318 of file sharecontrolfile.cxx.
References svt::LockFileCommon::m_aMutex, and RemoveFileImpl().
|
private |
Definition at line 324 of file sharecontrolfile.cxx.
References Close(), comphelper::getProcessComponentContext(), svt::LockFileCommon::GetURL(), and IsValid().
Referenced by RemoveEntry(), and RemoveFile().
void svt::ShareControlFile::SetUsersDataAndStore | ( | std::unique_lock< std::mutex > & | rGuard, |
std::vector< LockFileEntry > && | aUserNames | ||
) |
Definition at line 182 of file sharecontrolfile.cxx.
References aBuffer, aData, svt::LockFileCommon::EscapeCharacters(), IsValid(), LAST, m_aUsersData, m_xOutputStream, m_xSeekable, m_xTruncate, and OUStringToOString().
Referenced by InsertOwnEntry(), and RemoveEntry().
|
private |
Definition at line 44 of file sharecontrolfile.hxx.
Referenced by Close(), GetUsersDataImpl(), HasOwnEntry(), InsertOwnEntry(), RemoveEntry(), and SetUsersDataAndStore().
|
private |
Definition at line 39 of file sharecontrolfile.hxx.
Referenced by Close(), GetUsersDataImpl(), and ShareControlFile().
|
private |
Definition at line 40 of file sharecontrolfile.hxx.
Referenced by Close(), SetUsersDataAndStore(), and ShareControlFile().
|
private |
Definition at line 41 of file sharecontrolfile.hxx.
Referenced by Close(), GetUsersDataImpl(), SetUsersDataAndStore(), and ShareControlFile().
|
private |
Definition at line 38 of file sharecontrolfile.hxx.
Referenced by Close(), and ShareControlFile().
|
private |
Definition at line 42 of file sharecontrolfile.hxx.
Referenced by Close(), SetUsersDataAndStore(), and ShareControlFile().