Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
BC
public
liblinphone
Commits
a0b59e43
Commit
a0b59e43
authored
Oct 17, 2017
by
Ronan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(MainDbPrivate): add one insertConferenceEvent method
parent
d64b2adf
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
0 deletions
+12
-0
src/db/main-db-p.h
src/db/main-db-p.h
+6
-0
src/db/main-db.cpp
src/db/main-db.cpp
+6
-0
No files found.
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