Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
liblinphone
Commits
723ee9a1
Commit
723ee9a1
authored
Jan 11, 2018
by
Ronan
Browse files
fix(main-db-tester): use resource db file
parent
c646c50c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
8 deletions
+7
-8
tester/db/linphone.db
tester/db/linphone.db
+0
-0
tester/main-db-tester.cpp
tester/main-db-tester.cpp
+7
-8
No files found.
tester/db/linphone.db
View file @
723ee9a1
No preview for this file type
tester/main-db-tester.cpp
View file @
723ee9a1
...
...
@@ -17,14 +17,15 @@
*/
#include "address/address.h"
#include "core/core.h"
#include "core/core
-p
.h"
#include "db/main-db.h"
#include "event-log/events.h"
// TODO: Remove me. <3
#include "private.h"
#include "liblinphone_tester.h"
#include "t
ester_utils
.h"
#include "t
ools/tester
.h"
// =============================================================================
...
...
@@ -44,23 +45,21 @@ static const string getDatabasePath () {
class
MainDbProvider
{
public:
MainDbProvider
()
{
mCoreManager
=
linphone_core_manager_
new
(
"marie_rc"
);
mMainDb
=
new
MainDb
(
mCoreManager
->
lc
->
cppPtr
->
getSharedFromThis
());
mMainDb
->
connect
(
MainDb
::
Sqlite3
,
getDatabasePath
()
);
mCoreManager
=
linphone_core_manager_
create
(
"marie_rc"
);
linphone_config_set_string
(
linphone_core_get_config
(
mCoreManager
->
lc
),
"storage"
,
"uri"
,
getDatabasePath
().
c_str
());
linphone_core_manager_start
(
mCoreManager
,
false
);
}
~
MainDbProvider
()
{
delete
mMainDb
;
linphone_core_manager_destroy
(
mCoreManager
);
}
const
MainDb
&
getMainDb
()
{
return
*
m
M
ainDb
;
return
*
L_GET_PRIVATE
(
mCoreManager
->
lc
->
cppPtr
)
->
mainDb
;
}
private:
LinphoneCoreManager
*
mCoreManager
;
MainDb
*
mMainDb
;
};
// -----------------------------------------------------------------------------
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment