Method
PurpleConversationMembersadd_member
unstable since: 3.0
Declaration [src]
PurpleConversationMember*
purple_conversation_members_add_member (
PurpleConversationMembers* members,
PurpleContactInfo* info,
gboolean announce,
const char* message
)
Description [src]
Looks for an existing PurpleConversationMember
for info
in
members
and returns it if found. If not, a new PurpleConversationMember
is created.
This method is intended to be called by a protocol plugin to directly manage the membership state of the
conversation
.
This will also emit the PurpleConversationMembers::member-added
signal if
an existing member was not found.
The announce
and message
parameters will be used when emitting the
PurpleConversationMembers::member-added
signal. Announce and message are
meant for protocols to more properly define their behavior. For example, on
IRC you will typically be told when a user joins a chat but on Twitch this
isn’t announced.
Available since: 3.0
Parameters
info
-
Type:
PurpleContactInfo
The
PurpleContactInfo
of the person joining.The data is owned by the caller of the method. announce
-
Type:
gboolean
Whether this addition should be announced or not.
message
-
Type:
const char*
An optional message to be used with
announce
.The argument can be NULL
.The data is owned by the caller of the method. The value is a NUL terminated UTF-8 string.
Return value
Type: PurpleConversationMember
The PurpleConversationMember
that was created or found.
The returned data is owned by the instance. |