Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linphone-desktop
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
linphone-desktop
Commits
d4cd3d30
Commit
d4cd3d30
authored
Nov 17, 2016
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(app): use wrapper
parent
38e44163
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
47 additions
and
9 deletions
+47
-9
CMakeLists.txt
tests/CMakeLists.txt
+5
-2
App.cpp
tests/src/app/App.cpp
+2
-2
CoreManager.cpp
tests/src/components/core/CoreManager.cpp
+9
-0
CoreManager.hpp
tests/src/components/core/CoreManager.hpp
+31
-0
LinphoneCore.cpp
tests/src/components/linphone/LinphoneCore.cpp
+0
-5
No files found.
tests/CMakeLists.txt
View file @
d4cd3d30
...
@@ -26,6 +26,8 @@ foreach (package ${QT5_PACKAGES})
...
@@ -26,6 +26,8 @@ foreach (package ${QT5_PACKAGES})
endif
()
endif
()
endforeach
()
endforeach
()
list
(
APPEND LIBS
"
${
CMAKE_SOURCE_DIR
}
/../OUTPUT/desktop/lib64/liblinphone++.so"
)
set
(
SOURCES
set
(
SOURCES
src/app/App.cpp
src/app/App.cpp
src/app/Logger.cpp
src/app/Logger.cpp
...
@@ -33,7 +35,7 @@ set(SOURCES
...
@@ -33,7 +35,7 @@ set(SOURCES
src/components/contacts/ContactModel.cpp
src/components/contacts/ContactModel.cpp
src/components/contacts/ContactsListModel.cpp
src/components/contacts/ContactsListModel.cpp
src/components/contacts/ContactsListProxyModel.cpp
src/components/contacts/ContactsListProxyModel.cpp
src/components/
linphone/LinphoneCore
.cpp
src/components/
core/CoreManager
.cpp
src/components/notifier/Notifier.cpp
src/components/notifier/Notifier.cpp
src/components/settings/AccountSettingsModel.cpp
src/components/settings/AccountSettingsModel.cpp
src/components/settings/SettingsModel.cpp
src/components/settings/SettingsModel.cpp
...
@@ -48,7 +50,7 @@ set(HEADERS
...
@@ -48,7 +50,7 @@ set(HEADERS
src/components/contacts/ContactModel.hpp
src/components/contacts/ContactModel.hpp
src/components/contacts/ContactsListModel.hpp
src/components/contacts/ContactsListModel.hpp
src/components/contacts/ContactsListProxyModel.hpp
src/components/contacts/ContactsListProxyModel.hpp
src/components/
linphone/LinphoneCore
.hpp
src/components/
core/CoreManager
.hpp
src/components/notifier/Notifier.hpp
src/components/notifier/Notifier.hpp
src/components/presence/Presence.hpp
src/components/presence/Presence.hpp
src/components/settings/AccountSettingsModel.hpp
src/components/settings/AccountSettingsModel.hpp
...
@@ -132,4 +134,5 @@ qt5_add_resources(RESOURCES ${QRC_RESOURCES})
...
@@ -132,4 +134,5 @@ qt5_add_resources(RESOURCES ${QRC_RESOURCES})
add_executable
(
${
LINPHONE_EXEC
}
${
SOURCES
}
${
HEADERS
}
${
RESOURCES
}
)
add_executable
(
${
LINPHONE_EXEC
}
${
SOURCES
}
${
HEADERS
}
${
RESOURCES
}
)
add_dependencies
(
${
LINPHONE_EXEC
}
update_translations
)
add_dependencies
(
${
LINPHONE_EXEC
}
update_translations
)
add_dependencies
(
update_translations check_qml
)
add_dependencies
(
update_translations check_qml
)
target_include_directories
(
${
LINPHONE_EXEC
}
PRIVATE
"
${
CMAKE_SOURCE_DIR
}
/../OUTPUT/desktop/include/"
)
target_link_libraries
(
${
LINPHONE_EXEC
}
${
LIBS
}
)
target_link_libraries
(
${
LINPHONE_EXEC
}
${
LIBS
}
)
tests/src/app/App.cpp
View file @
d4cd3d30
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
#include <QtDebug>
#include <QtDebug>
#include "../components/contacts/ContactsListProxyModel.hpp"
#include "../components/contacts/ContactsListProxyModel.hpp"
#include "../components/
linphone/LinphoneCore
.hpp"
#include "../components/
core/CoreManager
.hpp"
#include "../components/settings/AccountSettingsModel.hpp"
#include "../components/settings/AccountSettingsModel.hpp"
#include "../components/timeline/TimelineModel.hpp"
#include "../components/timeline/TimelineModel.hpp"
...
@@ -98,7 +98,7 @@ void App::addContextProperties () {
...
@@ -98,7 +98,7 @@ void App::addContextProperties () {
context
->
setContextProperty
(
"TimelineModel"
,
new
TimelineModel
());
context
->
setContextProperty
(
"TimelineModel"
,
new
TimelineModel
());
// Other.
// Other.
context
->
setContextProperty
(
"
LinphoneCore"
,
LinphoneCore
::
getInstance
());
context
->
setContextProperty
(
"
CoreManager"
,
CoreManager
::
getInstance
());
m_notifier
=
new
Notifier
();
m_notifier
=
new
Notifier
();
context
->
setContextProperty
(
"Notifier"
,
m_notifier
);
context
->
setContextProperty
(
"Notifier"
,
m_notifier
);
...
...
tests/src/components/core/CoreManager.cpp
0 → 100644
View file @
d4cd3d30
#include "CoreManager.hpp"
// ===================================================================
CoreManager
*
CoreManager
::
m_instance
=
nullptr
;
CoreManager
::
CoreManager
(
QObject
*
parent
)
:
m_core
(
linphone
::
Factory
::
get
()
->
createCore
(
nullptr
,
""
,
""
,
nullptr
)
)
{}
tests/src/components/
linphone/LinphoneCore
.hpp
→
tests/src/components/
core/CoreManager
.hpp
View file @
d4cd3d30
#ifndef
LINPHONE_CORE
_H_
#ifndef
CORE_MANAGER
_H_
#define
LINPHONE_CORE
_H_
#define
CORE_MANAGER
_H_
#include <QObject>
#include <QObject>
#include <linphone++/linphone.hh>
// ===================================================================
// ===================================================================
class
LinphoneCore
:
public
QObject
{
class
CoreManager
:
public
QObject
{
Q_OBJECT
;
Q_OBJECT
;
public:
public:
static
void
init
()
{
static
void
init
()
{
if
(
!
m_instance
)
{
if
(
!
m_instance
)
{
m_instance
=
new
LinphoneCore
();
m_instance
=
new
CoreManager
();
}
}
}
}
static
LinphoneCore
*
getInstance
()
{
static
CoreManager
*
getInstance
()
{
return
m_instance
;
return
m_instance
;
}
}
private:
private:
LinphoneCore
(
QObject
*
parent
=
Q_NULLPTR
)
{}
;
CoreManager
(
QObject
*
parent
=
Q_NULLPTR
)
;
static
LinphoneCore
*
m_instance
;
std
::
shared_ptr
<
linphone
::
Core
>
m_core
;
static
CoreManager
*
m_instance
;
};
};
#endif //
LINPHONE_CORE
_H_
#endif //
CORE_MANAGER
_H_
tests/src/components/linphone/LinphoneCore.cpp
deleted
100644 → 0
View file @
38e44163
#include "LinphoneCore.hpp"
// ===================================================================
LinphoneCore
*
LinphoneCore
::
m_instance
=
nullptr
;
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