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
a0b59e43
Commit
a0b59e43
authored
Oct 17, 2017
by
Ronan
Browse files
feat(MainDbPrivate): add one insertConferenceEvent method
parent
d64b2adf
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/db/main-db-p.h
View file @
a0b59e43
...
...
@@ -43,6 +43,10 @@ class MainDbPrivate : public AbstractDbPrivate {
public:
private:
// ---------------------------------------------------------------------------
// Low level API.
// ---------------------------------------------------------------------------
long
insertSipAddress
(
const
std
::
string
&
sipAddress
);
void
insertContent
(
long
messageEventId
,
const
Content
&
content
);
long
insertContentType
(
const
std
::
string
&
contentType
);
...
...
@@ -61,6 +65,8 @@ private:
void
insertMessageParticipant
(
long
messageEventId
,
long
sipAddressId
,
ChatMessage
::
State
state
);
void
insertConferenceEvent
(
long
eventId
,
long
chatRoomId
);
std
::
unordered_map
<
std
::
string
,
std
::
weak_ptr
<
ChatRoom
>>
chatRooms
;
L_DECLARE_PUBLIC
(
MainDb
);
...
...
src/db/main-db.cpp
View file @
a0b59e43
...
...
@@ -236,6 +236,12 @@ MainDb::MainDb () : AbstractDb(*new MainDbPrivate) {}
soci
::
use
(
messageEventId
),
soci
::
use
(
sipAddressId
),
soci
::
use
(
static_cast
<
int
>
(
state
));
}
void
MainDbPrivate
::
insertConferenceEvent
(
long
eventId
,
long
chatRoomId
)
{
soci
::
session
*
session
=
dbSession
.
getBackendSession
<
soci
::
session
>
();
*
session
<<
"INSERT INTO conference_event (event_id, chat_room_id) VALUES (:eventId, :chatRoomId)"
,
soci
::
use
(
eventId
),
soci
::
use
(
chatRoomId
);
}
// -----------------------------------------------------------------------------
#define LEGACY_MESSAGE_COL_LOCAL_ADDRESS 1
...
...
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