Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F113182
matrix-sdk-sessions-test.hpp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
matrix-sdk-sessions-test.hpp
View Options
/*
* This file is part of kazv.
* SPDX-FileCopyrightText: 2024 tusooa <tusooa@kazv.moe>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
#pragma once
#include
<kazv-defs.hpp>
#include
<memory>
#include
<QObject>
#include
<matrix-sdk.hpp>
class
MatrixSdkSessionsTest
:
public
QObject
{
Q_OBJECT
private
:
std
::
string
m_userDataDir
;
void
clearDir
();
void
createSession
(
std
::
string
userId
,
std
::
string
deviceId
);
public
:
template
<
class
...
Args
>
static
std
::
unique_ptr
<
MatrixSdk
>
makeMatrixSdkImpl
(
std
::
string
userDataDir
,
Args
&&
...
args
)
{
std
::
unique_ptr
<
MatrixSdk
>
sdk
(
new
MatrixSdk
(
std
::
forward
<
Args
>
(
args
)...));
sdk
->
setUserDataDir
(
userDataDir
);
return
sdk
;
}
template
<
class
...
Args
>
std
::
unique_ptr
<
MatrixSdk
>
makeMatrixSdk
(
Args
&&
...
args
)
{
return
makeMatrixSdkImpl
(
m_userDataDir
,
std
::
forward
<
Args
>
(
args
)...);
}
private
Q_SLOTS
:
void
initTestCase
();
void
init
();
void
cleanup
();
void
testListSessions
();
void
testListLegacySessions
();
void
testLoadSession
();
void
testSessionLock
();
void
testSaveSessionFailure
();
};
File Metadata
Details
Attached
Mime Type
text/x-c++
Expires
Sun, Nov 24, 3:47 PM (1 d, 1 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
39447
Default Alt Text
matrix-sdk-sessions-test.hpp (1 KB)
Attached To
Mode
rK kazv
Attached
Detach File
Event Timeline
Log In to Comment