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
e5c3a5a9
Commit
e5c3a5a9
authored
Oct 09, 2017
by
Ronan
Browse files
feat(EventsDb): add new table => message_participant
parent
f8abe9ad
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
5 deletions
+21
-5
include/linphone/utils/general.h
include/linphone/utils/general.h
+1
-1
src/content/content-type.h
src/content/content-type.h
+1
-1
src/db/events-db.cpp
src/db/events-db.cpp
+19
-3
No files found.
include/linphone/utils/general.h
View file @
e5c3a5a9
...
...
@@ -127,7 +127,7 @@ constexpr T *getPublicHelper (Object *object, const ObjectPrivate *) {
friend class CLASS;
#define L_DISABLE_COPY(CLASS) \
CLASS(const CLASS &) = delete; \
CLASS
(const CLASS &) = delete; \
CLASS &operator= (const CLASS &) = delete;
#define L_D() decltype(std::declval<decltype(*this)>().getPrivate()) const d = getPrivate();
...
...
src/content/content-type.h
View file @
e5c3a5a9
...
...
@@ -30,7 +30,7 @@ class ContentTypePrivate;
class
LINPHONE_PUBLIC
ContentType
:
public
ClonableObject
{
public:
ContentType
(
const
std
::
string
&
contentType
=
""
);
explicit
ContentType
(
const
std
::
string
&
contentType
=
""
);
ContentType
(
const
std
::
string
&
type
,
const
std
::
string
&
subType
);
ContentType
(
const
std
::
string
&
type
,
const
std
::
string
&
subType
,
const
std
::
string
&
parameter
);
ContentType
(
const
ContentType
&
src
);
...
...
src/db/events-db.cpp
View file @
e5c3a5a9
...
...
@@ -305,9 +305,10 @@ EventsDb::EventsDb () : AbstractDb(*new EventsDbPrivate) {}
{
content
}
);
const
bool
noAppData
=
false
;
const
string
appData
=
getValueFromLegacyMessage
<
string
>
(
message
,
10
,
const_cast
<
bool
&>
(
noAppData
));
(
void
)
appData
;
bool
noAppData
=
false
;
const
string
appData
=
getValueFromLegacyMessage
<
string
>
(
message
,
10
,
noAppData
);
if
(
!
noAppData
)
return
;
}
tr
.
commit
();
...
...
@@ -385,6 +386,21 @@ EventsDb::EventsDb () : AbstractDb(*new EventsDbPrivate) {}
" ON DELETE CASCADE"
")"
;
*
session
<<
"CREATE TABLE IF NOT EXISTS message_participant ("
" message_event_id INT UNSIGNED NOT NULL,"
" sip_address_id INT UNSIGNED NOT NULL,"
" state TINYINT UNSIGNED NOT NULL,"
" PRIMARY KEY (message_event_id, sip_address_id),"
" FOREIGN KEY (message_event_id)"
" REFERENCES message_event(id)"
" ON DELETE CASCADE,"
" FOREIGN KEY (sip_address_id)"
" REFERENCES sip_address(id)"
" ON DELETE CASCADE,"
")"
;
*
session
<<
"CREATE TABLE IF NOT EXISTS message_content ("
" id"
+
primaryKeyAutoIncrementStr
()
+
","
...
...
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