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
89ed9cae
Commit
89ed9cae
authored
Nov 30, 2017
by
Ghislain MARY
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename isReadOnly() to hasBeenLeft() in ChatRoom.
parent
57e9fbd1
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
16 additions
and
16 deletions
+16
-16
include/linphone/api/c-chat-room.h
include/linphone/api/c-chat-room.h
+3
-3
src/c-wrapper/api/c-chat-room.cpp
src/c-wrapper/api/c-chat-room.cpp
+2
-2
src/chat/chat-room/basic-chat-room.cpp
src/chat/chat-room/basic-chat-room.cpp
+1
-1
src/chat/chat-room/basic-chat-room.h
src/chat/chat-room/basic-chat-room.h
+1
-1
src/chat/chat-room/chat-room.h
src/chat/chat-room/chat-room.h
+1
-1
src/chat/chat-room/client-group-chat-room.cpp
src/chat/chat-room/client-group-chat-room.cpp
+3
-3
src/chat/chat-room/client-group-chat-room.h
src/chat/chat-room/client-group-chat-room.h
+2
-2
src/chat/chat-room/server-group-chat-room-stub.cpp
src/chat/chat-room/server-group-chat-room-stub.cpp
+1
-1
src/chat/chat-room/server-group-chat-room.h
src/chat/chat-room/server-group-chat-room.h
+1
-1
src/db/main-db.cpp
src/db/main-db.cpp
+1
-1
No files found.
include/linphone/api/c-chat-room.h
View file @
89ed9cae
...
...
@@ -274,11 +274,11 @@ LINPHONE_PUBLIC LinphoneChatRoomCbs * linphone_chat_room_get_callbacks (const Li
LINPHONE_PUBLIC
LinphoneChatRoomState
linphone_chat_room_get_state
(
const
LinphoneChatRoom
*
cr
);
/**
* Return whether or not the chat room
is read only
.
* Return whether or not the chat room
has been left
.
* @param[in] cr LinphoneChatRoom object
* @return whether or not the chat room
is read only
* @return whether or not the chat room
has been left
*/
LINPHONE_PUBLIC
bool_t
linphone_chat_room_
is_read_only
(
const
LinphoneChatRoom
*
cr
);
LINPHONE_PUBLIC
bool_t
linphone_chat_room_
has_been_left
(
const
LinphoneChatRoom
*
cr
);
/**
* Add a participant to a chat room. This may fail if this type of chat room does not handle participants.
...
...
src/c-wrapper/api/c-chat-room.cpp
View file @
89ed9cae
...
...
@@ -244,8 +244,8 @@ LinphoneChatRoomState linphone_chat_room_get_state (const LinphoneChatRoom *cr)
return
(
LinphoneChatRoomState
)
L_GET_CPP_PTR_FROM_C_OBJECT
(
cr
)
->
getState
();
}
bool_t
linphone_chat_room_
is_read_only
(
const
LinphoneChatRoom
*
cr
)
{
return
(
bool_t
)
L_GET_CPP_PTR_FROM_C_OBJECT
(
cr
)
->
isReadOnly
();
bool_t
linphone_chat_room_
has_been_left
(
const
LinphoneChatRoom
*
cr
)
{
return
(
bool_t
)
L_GET_CPP_PTR_FROM_C_OBJECT
(
cr
)
->
hasBeenLeft
();
}
void
linphone_chat_room_add_participant
(
LinphoneChatRoom
*
cr
,
const
LinphoneAddress
*
addr
)
{
...
...
src/chat/chat-room/basic-chat-room.cpp
View file @
89ed9cae
...
...
@@ -51,7 +51,7 @@ BasicChatRoom::CapabilitiesMask BasicChatRoom::getCapabilities () const {
return
static_cast
<
CapabilitiesMask
>
(
Capabilities
::
Basic
);
}
bool
BasicChatRoom
::
isReadOnly
()
const
{
bool
BasicChatRoom
::
hasBeenLeft
()
const
{
return
false
;
}
...
...
src/chat/chat-room/basic-chat-room.h
View file @
89ed9cae
...
...
@@ -33,7 +33,7 @@ class LINPHONE_PUBLIC BasicChatRoom : public ChatRoom {
public:
CapabilitiesMask
getCapabilities
()
const
override
;
bool
isReadOnly
()
const
override
;
bool
hasBeenLeft
()
const
override
;
const
IdentityAddress
&
getConferenceAddress
()
const
override
;
...
...
src/chat/chat-room/chat-room.h
View file @
89ed9cae
...
...
@@ -57,7 +57,7 @@ public:
time_t
getLastUpdateTime
()
const
;
virtual
CapabilitiesMask
getCapabilities
()
const
=
0
;
virtual
bool
isReadOnly
()
const
=
0
;
virtual
bool
hasBeenLeft
()
const
=
0
;
std
::
shared_ptr
<
ChatMessage
>
getLastMessageInHistory
()
const
;
...
...
src/chat/chat-room/client-group-chat-room.cpp
View file @
89ed9cae
...
...
@@ -104,7 +104,7 @@ ClientGroupChatRoom::ClientGroupChatRoom (
const
string
&
subject
,
list
<
shared_ptr
<
Participant
>>
&&
participants
,
unsigned
int
lastNotifyId
,
bool
isReadOnly
bool
hasBeenLeft
)
:
ChatRoom
(
*
new
ClientGroupChatRoomPrivate
,
core
,
ChatRoomId
(
peerAddress
,
me
->
getAddress
())),
RemoteConference
(
core
,
me
->
getAddress
(),
nullptr
)
{
L_D
();
...
...
@@ -115,7 +115,7 @@ RemoteConference(core, me->getAddress(), nullptr) {
dConference
->
subject
=
subject
;
dConference
->
participants
=
move
(
participants
);
d
->
state
=
isReadOnly
?
ChatRoom
::
State
::
Terminated
:
ChatRoom
::
State
::
Created
;
d
->
state
=
hasBeenLeft
?
ChatRoom
::
State
::
Terminated
:
ChatRoom
::
State
::
Created
;
getMe
()
->
getPrivate
()
->
setAdmin
(
me
->
isAdmin
());
...
...
@@ -131,7 +131,7 @@ ClientGroupChatRoom::CapabilitiesMask ClientGroupChatRoom::getCapabilities () co
return
static_cast
<
CapabilitiesMask
>
(
Capabilities
::
Conference
);
}
bool
ClientGroupChatRoom
::
isReadOnly
()
const
{
bool
ClientGroupChatRoom
::
hasBeenLeft
()
const
{
return
getState
()
!=
State
::
Created
;
}
...
...
src/chat/chat-room/client-group-chat-room.h
View file @
89ed9cae
...
...
@@ -46,13 +46,13 @@ public:
const
std
::
string
&
subject
,
std
::
list
<
std
::
shared_ptr
<
Participant
>>
&&
participants
,
unsigned
int
lastNotifyId
,
bool
isReadOnly
bool
hasBeenLeft
);
std
::
shared_ptr
<
Core
>
getCore
()
const
;
CapabilitiesMask
getCapabilities
()
const
override
;
bool
isReadOnly
()
const
override
;
bool
hasBeenLeft
()
const
override
;
const
IdentityAddress
&
getConferenceAddress
()
const
override
;
...
...
src/chat/chat-room/server-group-chat-room-stub.cpp
View file @
89ed9cae
...
...
@@ -85,7 +85,7 @@ int ServerGroupChatRoom::getCapabilities () const {
return
0
;
}
bool
ServerGroupChatRoom
::
isReadOnly
()
const
{
bool
ServerGroupChatRoom
::
hasBeenLeft
()
const
{
return
true
;
}
...
...
src/chat/chat-room/server-group-chat-room.h
View file @
89ed9cae
...
...
@@ -40,7 +40,7 @@ public:
ServerGroupChatRoom
(
const
std
::
shared_ptr
<
Core
>
&
core
,
SalCallOp
*
op
);
CapabilitiesMask
getCapabilities
()
const
override
;
bool
isReadOnly
()
const
override
;
bool
hasBeenLeft
()
const
override
;
const
IdentityAddress
&
getConferenceAddress
()
const
override
;
...
...
src/db/main-db.cpp
View file @
89ed9cae
...
...
@@ -247,7 +247,7 @@ MainDb::MainDb (const shared_ptr<Core> &core) : AbstractDb(*new MainDbPrivate),
const
tm
&
creationTime
=
Utils
::
getTimeTAsTm
(
chatRoom
->
getCreationTime
());
const
int
&
capabilities
=
static_cast
<
int
>
(
chatRoom
->
getCapabilities
());
const
string
&
subject
=
chatRoom
->
getSubject
();
const
int
&
flags
=
chatRoom
->
isReadOnly
();
const
int
&
flags
=
chatRoom
->
hasBeenLeft
();
*
session
<<
"INSERT INTO chat_room ("
" peer_sip_address_id, local_sip_address_id, creation_time, last_update_time, capabilities, subject, flags"
") VALUES (:peerSipAddressId, :localSipAddressId, :creationTime, :lastUpdateTime, :capabilities, :subject, :flags)"
,
...
...
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