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
4f40f34a
Commit
4f40f34a
authored
Dec 04, 2017
by
Ronan
Browse files
feat(MainDb): add const qualifier on some parameters
parent
144790b4
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/db/main-db.cpp
View file @
4f40f34a
...
...
@@ -1269,8 +1269,8 @@ MainDb::MainDb (const shared_ptr<Core> &core) : AbstractDb(*new MainDbPrivate),
return
false
;
}
bool
MainDb
::
deleteEvent
(
const
shared_ptr
<
EventLog
>
&
eventLog
)
{
EventLogPrivate
*
dEventLog
=
eventLog
->
getPrivate
();
bool
MainDb
::
deleteEvent
(
const
shared_ptr
<
const
EventLog
>
&
eventLog
)
{
const
EventLogPrivate
*
dEventLog
=
eventLog
->
getPrivate
();
if
(
!
dEventLog
->
dbKey
.
isValid
())
{
lWarning
()
<<
"Unable to delete invalid event."
;
return
false
;
...
...
@@ -1294,7 +1294,7 @@ MainDb::MainDb (const shared_ptr<Core> &core) : AbstractDb(*new MainDbPrivate),
dEventLog
->
dbKey
=
MainDbEventKey
();
if
(
eventLog
->
getType
()
==
EventLog
::
Type
::
ConferenceChatMessage
)
static_pointer_cast
<
ConferenceChatMessageEvent
>
(
static_pointer_cast
<
const
ConferenceChatMessageEvent
>
(
eventLog
)
->
getChatMessage
()
->
getPrivate
()
->
dbKey
=
MainDbChatMessageKey
();
...
...
@@ -2144,7 +2144,7 @@ MainDb::MainDb (const shared_ptr<Core> &core) : AbstractDb(*new MainDbPrivate),
return
false
;
}
bool
MainDb
::
deleteEvent
(
const
shared_ptr
<
EventLog
>
&
)
{
bool
MainDb
::
deleteEvent
(
const
shared_ptr
<
const
EventLog
>
&
)
{
return
false
;
}
...
...
src/db/main-db.h
View file @
4f40f34a
...
...
@@ -59,7 +59,7 @@ public:
bool
addEvent
(
const
std
::
shared_ptr
<
EventLog
>
&
eventLog
);
bool
updateEvent
(
const
std
::
shared_ptr
<
EventLog
>
&
eventLog
);
static
bool
deleteEvent
(
const
std
::
shared_ptr
<
EventLog
>
&
eventLog
);
static
bool
deleteEvent
(
const
std
::
shared_ptr
<
const
EventLog
>
&
eventLog
);
int
getEventsCount
(
FilterMask
mask
=
NoFilter
)
const
;
static
std
::
shared_ptr
<
EventLog
>
getEventFromKey
(
const
MainDbKey
&
dbKey
);
...
...
src/event-log/event-log.cpp
View file @
4f40f34a
...
...
@@ -44,7 +44,7 @@ time_t EventLog::getCreationTime () const {
return
d
->
creationTime
;
}
void
EventLog
::
deleteFromDatabase
(
const
shared_ptr
<
EventLog
>
&
eventLog
)
{
void
EventLog
::
deleteFromDatabase
(
const
shared_ptr
<
const
EventLog
>
&
eventLog
)
{
MainDb
::
deleteEvent
(
eventLog
);
}
...
...
src/event-log/event-log.h
View file @
4f40f34a
...
...
@@ -46,7 +46,7 @@ public:
Type
getType
()
const
;
time_t
getCreationTime
()
const
;
static
void
deleteFromDatabase
(
const
std
::
shared_ptr
<
EventLog
>
&
eventLog
);
static
void
deleteFromDatabase
(
const
std
::
shared_ptr
<
const
EventLog
>
&
eventLog
);
protected:
EventLog
(
EventLogPrivate
&
p
,
Type
type
,
time_t
creationTime
);
...
...
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