[ekiga] Cleanup: replace status by note in all presence code
- From: Eugen Dedu <ededu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ekiga] Cleanup: replace status by note in all presence code
- Date: Mon, 15 Feb 2016 11:24:17 +0000 (UTC)
commit cff348f9bcff865fe23b82ce426511a59a530313
Author: Eugen Dedu <eugen dedu univ-fcomte fr>
Date: Mon Feb 15 12:16:00 2016 +0100
Cleanup: replace status by note in all presence code
Currently, ekiga uses presence for "presence" status, and "status" the
message, so there is a confusion.
This patch replaces "status" by "note" as following:
set_status -> set_note
get_status -> get_note
std::string status; => std::string note;
status_received -> note_received
schema keys:
short-status -> presence
long-status -> presence-note
Notes:
opal uses:
- state = available, unavailable, unchanged, ...
- activities = busy, away
- note = texte in English
SIP specification (rich presence https://tools.ietf.org/html/rfc4480) mentions:
- (basic) status = open or closed
- activities = busy, away
- note
XMPP specification (https://tools.ietf.org/html/rfc6121, sec. 4.7) mentions:
- type = available or unavailable
- show = away, chat, dnd, xa
- status = text in English (custom message in ekiga)
ekiga.convert.in | 10 ++--
.../gmconf-personal-details.cpp | 28 ++++----
.../gmconf-personal-details.h | 10 ++--
lib/engine/components/opal/opal-account.cpp | 64 ++++++++++----------
lib/engine/components/opal/opal-presentity.cpp | 8 +-
lib/engine/components/opal/opal-presentity.h | 6 +-
lib/engine/framework/personal-details.h | 6 +-
lib/engine/gui/gtk-frontend/roster-view-gtk.cpp | 10 ++--
lib/engine/gui/gtk-frontend/statusmenu.cpp | 24 ++++----
lib/engine/presence/presence-core.cpp | 12 ++--
lib/engine/presence/presence-core.h | 12 ++--
lib/engine/presence/presentity.h | 6 +-
org.gnome.ekiga.gschema.xml.in.in | 18 +++---
plugins/avahi/avahi-heap.cpp | 12 ++--
plugins/avahi/avahi-presentity.cpp | 12 ++--
plugins/avahi/avahi-presentity.h | 10 ++--
plugins/avahi/avahi-publisher.cpp | 8 +-
plugins/resource-list/rl-cluster.cpp | 10 ++--
plugins/resource-list/rl-cluster.h | 8 +-
plugins/resource-list/rl-entry-ref.cpp | 6 +-
plugins/resource-list/rl-entry.cpp | 14 ++--
plugins/resource-list/rl-heap.cpp | 6 +-
plugins/resource-list/rl-heap.h | 4 +-
plugins/resource-list/rl-list.cpp | 18 +++---
plugins/resource-list/rl-list.h | 6 +-
plugins/resource-list/rl-presentity.cpp | 10 ++--
plugins/resource-list/rl-presentity.h | 6 +-
27 files changed, 173 insertions(+), 171 deletions(-)
---
diff --git a/ekiga.convert.in b/ekiga.convert.in
index 2e8587c..493ebc0 100644
--- a/ekiga.convert.in
+++ b/ekiga.convert.in
@@ -9,11 +9,11 @@ format = /apps/@PACKAGE_NAME@/devices/video/format
enable-preview = /apps/@PACKAGE_NAME@/devices/video/enable_preview
[org gnome PACKAGE_NAME@.general.personal-data]
-short-status = /apps/@PACKAGE_NAME@/general/personal_data/short_status
-long-status = /apps/@PACKAGE_NAME@/general/personal_data/long_status
-away-custom-status = /apps/@PACKAGE_NAME@/general/personal_data/away_custom_status
-busy-custom-status = /apps/@PACKAGE_NAME@/general/personal_data/busy_custom_status
-available-custom-status = /apps/@PACKAGE_NAME@/general/personal_data/available_custom_status
+presence = /apps/@PACKAGE_NAME@/general/personal_data/short_status
+presence-note = /apps/@PACKAGE_NAME@/general/personal_data/long_status
+away-custom-notes = /apps/@PACKAGE_NAME@/general/personal_data/away_custom_status
+busy-custom-notes = /apps/@PACKAGE_NAME@/general/personal_data/busy_custom_status
+available-custom-notes = /apps/@PACKAGE_NAME@/general/personal_data/available_custom_status
[org gnome PACKAGE_NAME@.general.sound-events]
output-device = /apps/@PACKAGE_NAME@/general/sound_events/output_device
diff --git a/lib/engine/components/gmconf-personal-details/gmconf-personal-details.cpp
b/lib/engine/components/gmconf-personal-details/gmconf-personal-details.cpp
index 9029fbc..af66647 100644
--- a/lib/engine/components/gmconf-personal-details/gmconf-personal-details.cpp
+++ b/lib/engine/components/gmconf-personal-details/gmconf-personal-details.cpp
@@ -55,17 +55,17 @@ void
Gmconf::PersonalDetails::setup (std::string setting)
{
std::string value;
- if (setting.empty () || setting == "short-status") {
- value = personal_details->get_string ("short-status");
+ if (setting.empty () || setting == "presence") {
+ value = personal_details->get_string ("presence");
if (value != presence) {
presence = value;
updated ();
}
}
- if (setting.empty () || setting == "long-status") {
- value = personal_details->get_string ("long-status");
- if (value != status) {
- status = value;
+ if (setting.empty () || setting == "presence-note") {
+ value = personal_details->get_string ("presence-note");
+ if (value != note) {
+ note = value;
updated ();
}
}
@@ -84,9 +84,9 @@ Gmconf::PersonalDetails::get_presence () const
}
const std::string
-Gmconf::PersonalDetails::get_status () const
+Gmconf::PersonalDetails::get_note () const
{
- return status;
+ return note;
}
void
@@ -98,24 +98,24 @@ Gmconf::PersonalDetails::set_display_name (G_GNUC_UNUSED const std::string displ
void
Gmconf::PersonalDetails::set_presence (const std::string presence_)
{
- personal_details->set_string ("short-status", presence_);
+ personal_details->set_string ("presence", presence_);
}
void
-Gmconf::PersonalDetails::set_status (const std::string status_)
+Gmconf::PersonalDetails::set_note (const std::string note_)
{
- personal_details->set_string ("long-status", status_);
+ personal_details->set_string ("presence-note", note_);
}
void
Gmconf::PersonalDetails::set_presence_info (const std::string _presence,
- const std::string _status)
+ const std::string _note)
{
presence = _presence;
- status = _status;
+ note = _note;
set_presence (_presence);
- set_status (_status);
+ set_note (_note);
updated ();
}
diff --git a/lib/engine/components/gmconf-personal-details/gmconf-personal-details.h
b/lib/engine/components/gmconf-personal-details/gmconf-personal-details.h
index de788c6..8a1d009 100644
--- a/lib/engine/components/gmconf-personal-details/gmconf-personal-details.h
+++ b/lib/engine/components/gmconf-personal-details/gmconf-personal-details.h
@@ -65,23 +65,23 @@ namespace Gmconf
const std::string get_presence () const;
- const std::string get_status () const;
+ const std::string get_note () const;
void set_display_name (const std::string display_name);
void set_presence (const std::string presence);
- void set_status (const std::string status);
+ void set_note (const std::string note);
- void set_presence_info (const std::string presence,
- const std::string status);
+ void set_presence_info (const std::string presence,
+ const std::string note);
private:
void setup (std::string what = "");
std::string display_name;
std::string presence;
- std::string status;
+ std::string note;
Ekiga::Settings *personal_details;
};
};
diff --git a/lib/engine/components/opal/opal-account.cpp b/lib/engine/components/opal/opal-account.cpp
index bf0f1c7..fc9dfba 100644
--- a/lib/engine/components/opal/opal-account.cpp
+++ b/lib/engine/components/opal/opal-account.cpp
@@ -591,7 +591,7 @@ Opal::Account::disable ()
iter != Ekiga::HeapImpl<Opal::Presentity>::end ();
++iter) {
(*iter)->set_presence ("unknown");
- (*iter)->set_status ("");
+ (*iter)->set_note ("");
}
if (type != Account::H323 && sip_endpoint)
@@ -953,11 +953,11 @@ Opal::Account::publish (const Ekiga::PersonalDetails& details)
if (opal_presentity) {
OpalPresenceInfo opi = OpalPresenceInfo (OpalPresenceInfo::Available);
opi.m_activities = PString (details.get_presence ());
- opi.m_note = details.get_status ();
+ opi.m_note = details.get_note ();
opi.m_service = instance_id;
opal_presentity->SetLocalPresence (opi);
- PTRACE (4, "Ekiga\tSent its own presence (publish) for " << get_aor() << ": " << details.get_presence ()
<< ", note " << details.get_status ());
+ PTRACE (4, "Ekiga\tSent its own presence (publish) for " << get_aor() << ": " << details.get_presence ()
<< ", note " << details.get_note ());
}
}
@@ -1158,7 +1158,7 @@ Opal::Account::OnPresenceChange (OpalPresentity& /*presentity*/,
const std::auto_ptr<OpalPresenceInfo> info)
{
std::string new_presence;
- std::string new_status = "";
+ std::string new_note = "";
SIPURL sip_uri = SIPURL (info->m_entity);
sip_uri.Sanitise (SIPURL::ExternalURI);
@@ -1170,7 +1170,7 @@ Opal::Account::OnPresenceChange (OpalPresentity& /*presentity*/,
if (!uri.compare (0, 5, "pres:"))
uri.replace (0, 5, "sip:"); // replace "pres:" sith "sip:" FIXME
- new_status = (const char*) info->m_note;
+ new_note = (const char*) info->m_note;
switch (info->m_state) {
case OpalPresenceInfo::Unchanged:
@@ -1207,96 +1207,96 @@ Opal::Account::OnPresenceChange (OpalPresentity& /*presentity*/,
// to handle that.
else if (info->m_activities.Contains ("appointment")) {
new_presence = "away";
- new_status = _("Appointment");
+ new_note = _("Appointment");
}
else if (info->m_activities.Contains ("breakfast")) {
new_presence = "away";
- new_status = _("Breakfast");
+ new_note = _("Breakfast");
}
else if (info->m_activities.Contains ("dinner")) {
new_presence = "away";
- new_status = _("Dinner");
+ new_note = _("Dinner");
}
else if (info->m_activities.Contains ("vacation")
|| info->m_activities.Contains ("holiday")) {
new_presence = "away";
- new_status = _("Holiday");
+ new_note = _("Holiday");
}
else if (info->m_activities.Contains ("in-transit")) {
new_presence = "away";
- new_status = _("In transit");
+ new_note = _("In transit");
}
else if (info->m_activities.Contains ("looking-for-work")) {
new_presence = "away";
- new_status = _("Looking for work");
+ new_note = _("Looking for work");
}
else if (info->m_activities.Contains ("lunch")) {
new_presence = "away";
- new_status = _("Lunch");
+ new_note = _("Lunch");
}
else if (info->m_activities.Contains ("meal")) {
new_presence = "away";
- new_status = _("Meal");
+ new_note = _("Meal");
}
else if (info->m_activities.Contains ("meeting")) {
new_presence = "away";
- new_status = _("Meeting");
+ new_note = _("Meeting");
}
else if (info->m_activities.Contains ("on-the-phone")) {
new_presence = "inacall";
- new_status = _("On the phone");
+ new_note = _("On the phone");
}
else if (info->m_activities.Contains ("playing")) {
new_presence = "away";
- new_status = _("Playing");
+ new_note = _("Playing");
}
else if (info->m_activities.Contains ("shopping")) {
new_presence = "away";
- new_status = _("Shopping");
+ new_note = _("Shopping");
}
else if (info->m_activities.Contains ("sleeping")) {
new_presence = "away";
- new_status = _("Sleeping");
+ new_note = _("Sleeping");
}
else if (info->m_activities.Contains ("working")) {
new_presence = "busy";
- new_status = _("Working");
+ new_note = _("Working");
}
else if (info->m_activities.Contains ("other")) {
new_presence = "away";
- new_status = "";
+ new_note = "";
}
else if (info->m_activities.Contains ("performance")) {
new_presence = "away";
- new_status = _("Performance");
+ new_note = _("Performance");
}
else if (info->m_activities.Contains ("permanent-absence")) {
new_presence = "away";
- new_status = _("Permanent Absence");
+ new_note = _("Permanent Absence");
}
else if (info->m_activities.Contains ("presentation")) {
new_presence = "away";
- new_status = _("Presentation");
+ new_note = _("Presentation");
}
else if (info->m_activities.Contains ("spectator")) {
new_presence = "away";
- new_status = _("Spectator");
+ new_note = _("Spectator");
}
else if (info->m_activities.Contains ("steering")) {
new_presence = "away";
- new_status = _("Steering");
+ new_note = _("Steering");
}
else if (info->m_activities.Contains ("travel")) {
new_presence = "away";
- new_status = _("Business or personal trip");
+ new_note = _("Business or personal trip");
}
else if (info->m_activities.Contains ("tv")) {
new_presence = "away";
- new_status = _("Watching TV");
+ new_note = _("Watching TV");
}
else if (info->m_activities.Contains ("worship")) {
new_presence = "away";
- new_status = _("Worship");
+ new_note = _("Worship");
}
break;
case OpalPresenceInfo::NoPresence:
@@ -1317,14 +1317,14 @@ Opal::Account::OnPresenceChange (OpalPresentity& /*presentity*/,
break;
}
- Ekiga::Runtime::run_in_main (boost::bind (&Opal::Account::presence_status_in_main, this, uri,
new_presence, new_status));
+ Ekiga::Runtime::run_in_main (boost::bind (&Opal::Account::presence_status_in_main, this, uri,
new_presence, new_note));
}
void
Opal::Account::presence_status_in_main (std::string uri,
std::string uri_presence,
- std::string uri_status) const
+ std::string uri_note) const
{
for (Ekiga::HeapImpl<Opal::Presentity>::const_iterator iter = Ekiga::HeapImpl<Opal::Presentity>::begin ();
iter != Ekiga::HeapImpl<Opal::Presentity>::end ();
@@ -1333,11 +1333,11 @@ Opal::Account::presence_status_in_main (std::string uri,
if ((*iter)->has_uri (uri)) {
(*iter)->set_presence (uri_presence);
- (*iter)->set_status (uri_status);
+ (*iter)->set_note (uri_note);
}
}
presence_received (uri, uri_presence);
- status_received (uri, uri_status);
+ note_received (uri, uri_note);
}
diff --git a/lib/engine/components/opal/opal-presentity.cpp b/lib/engine/components/opal/opal-presentity.cpp
index 4700c36..d29efac 100644
--- a/lib/engine/components/opal/opal-presentity.cpp
+++ b/lib/engine/components/opal/opal-presentity.cpp
@@ -189,9 +189,9 @@ Opal::Presentity::get_presence () const
const std::string
-Opal::Presentity::get_status () const
+Opal::Presentity::get_note () const
{
- return status;
+ return note;
}
@@ -256,9 +256,9 @@ Opal::Presentity::set_presence (const std::string presence_)
void
-Opal::Presentity::set_status (const std::string status_)
+Opal::Presentity::set_note (const std::string note_)
{
- status = status_;
+ note = note_;
updated (this->shared_from_this ());
}
diff --git a/lib/engine/components/opal/opal-presentity.h b/lib/engine/components/opal/opal-presentity.h
index 2a80459..ea6241e 100644
--- a/lib/engine/components/opal/opal-presentity.h
+++ b/lib/engine/components/opal/opal-presentity.h
@@ -83,7 +83,7 @@ namespace Opal
const std::string get_presence () const;
- const std::string get_status () const;
+ const std::string get_note () const;
const std::list<std::string> get_groups () const;
@@ -97,7 +97,7 @@ namespace Opal
void set_presence (const std::string presence_);
- void set_status (const std::string status_);
+ void set_note (const std::string note_);
// method to rename a group for this presentity
void rename_group (const std::string old_name,
@@ -141,7 +141,7 @@ namespace Opal
xmlNodePtr node;
std::string presence;
- std::string status;
+ std::string note;
};
typedef boost::shared_ptr<Presentity> PresentityPtr;
diff --git a/lib/engine/framework/personal-details.h b/lib/engine/framework/personal-details.h
index ba60a10..54ddb4a 100644
--- a/lib/engine/framework/personal-details.h
+++ b/lib/engine/framework/personal-details.h
@@ -54,16 +54,16 @@ namespace Ekiga
virtual const std::string get_presence () const = 0;
- virtual const std::string get_status () const = 0;
+ virtual const std::string get_note () const = 0;
virtual void set_display_name (const std::string display_name) = 0;
virtual void set_presence (const std::string presence) = 0;
- virtual void set_status (const std::string status) = 0;
+ virtual void set_note (const std::string note) = 0;
virtual void set_presence_info (const std::string presence,
- const std::string status) = 0;
+ const std::string note) = 0;
boost::signals2::signal<void(void)> updated;
};
diff --git a/lib/engine/gui/gtk-frontend/roster-view-gtk.cpp b/lib/engine/gui/gtk-frontend/roster-view-gtk.cpp
index 731542e..bc262dd 100644
--- a/lib/engine/gui/gtk-frontend/roster-view-gtk.cpp
+++ b/lib/engine/gui/gtk-frontend/roster-view-gtk.cpp
@@ -112,7 +112,7 @@ G_DEFINE_TYPE (RosterViewGtk, roster_view_gtk, GTK_TYPE_FRAME);
*
* For the groups, we show the name.
*
- * For the presentities, we show the name, the status and the presence.
+ * For the presentities, we show the name, the presence and the note.
*
* This means we can share and put the name in a column.
*
@@ -124,7 +124,7 @@ enum {
COLUMN_ACCOUNT,
COLUMN_PRESENTITY,
COLUMN_NAME,
- COLUMN_STATUS,
+ COLUMN_NOTE,
COLUMN_PRESENCE_ICON,
COLUMN_AVATAR_PIXBUF,
COLUMN_ACCOUNT_STATUS_ICON,
@@ -1421,7 +1421,7 @@ roster_view_gtk_update_presentity (RosterViewGtk* self,
COLUMN_PRESENTITY, presentity.get (),
COLUMN_NAME, presentity->get_name ().c_str (),
COLUMN_AVATAR_PIXBUF, pixbuf,
- COLUMN_STATUS, presentity->get_status ().c_str (),
+ COLUMN_NOTE, presentity->get_note ().c_str (),
COLUMN_PRESENCE_ICON, icon.c_str (),
COLUMN_FOREGROUND_COLOR, &color, -1);
@@ -1590,7 +1590,7 @@ roster_view_gtk_init (RosterViewGtk* self)
G_TYPE_POINTER, // account
G_TYPE_POINTER, // presentity
G_TYPE_STRING, // name
- G_TYPE_STRING, // status
+ G_TYPE_STRING, // presence note
G_TYPE_STRING, // presence
GDK_TYPE_PIXBUF, // Avatar
GDK_TYPE_PIXBUF, // Account status icon
@@ -1676,7 +1676,7 @@ roster_view_gtk_init (RosterViewGtk* self)
g_object_set (renderer, "ellipsize", PANGO_ELLIPSIZE_END, "width-chars", 30, NULL);
gtk_tree_view_column_pack_start (col, renderer, TRUE);
gtk_tree_view_column_add_attribute (col, renderer, "primary-text", COLUMN_NAME);
- gtk_tree_view_column_add_attribute (col, renderer, "secondary-text", COLUMN_STATUS);
+ gtk_tree_view_column_add_attribute (col, renderer, "secondary-text", COLUMN_NOTE);
gtk_tree_view_column_add_attribute (col, renderer, "foreground-rgba", COLUMN_FOREGROUND_COLOR);
gtk_tree_view_column_set_cell_data_func (col, renderer,
show_cell_data_func, GINT_TO_POINTER (TYPE_PRESENTITY), NULL);
diff --git a/lib/engine/gui/gtk-frontend/statusmenu.cpp b/lib/engine/gui/gtk-frontend/statusmenu.cpp
index aa1d00b..e672044 100644
--- a/lib/engine/gui/gtk-frontend/statusmenu.cpp
+++ b/lib/engine/gui/gtk-frontend/statusmenu.cpp
@@ -100,9 +100,9 @@ const char* status_types_names[] =
const char* status_types_keys[] =
{
- "available-custom-status",
- "away-custom-status",
- "busy-custom-status"
+ "available-custom-notes",
+ "away-custom-notes",
+ "busy-custom-notes"
};
@@ -346,7 +346,7 @@ status_menu_custom_messages_changed (G_GNUC_UNUSED GSettings *settings,
static void
on_details_updated (StatusMenu *self)
{
- status_menu_set_option (self, self->priv->personal_details->get_presence (),
self->priv->personal_details->get_status ());
+ status_menu_set_option (self, self->priv->personal_details->get_presence (),
self->priv->personal_details->get_note ());
}
@@ -436,7 +436,7 @@ status_menu_populate (StatusMenu *self,
-1);
}
- status_menu_set_option (self, self->priv->personal_details->get_presence (),
self->priv->personal_details->get_status ());
+ status_menu_set_option (self, self->priv->personal_details->get_presence (),
self->priv->personal_details->get_note ());
}
@@ -515,7 +515,7 @@ status_menu_clear_status_message_dialog_run (StatusMenu *self)
std::string status;
// Current status
- status = self->priv->personal_data_settings->get_string ("long-status");
+ status = self->priv->personal_data_settings->get_string ("presence-notes");
// Build the dialog
dialog = gtk_dialog_new_with_buttons (_("Custom Message"),
@@ -667,8 +667,8 @@ status_menu_new_status_message_dialog_run (StatusMenu *self,
const char *message = NULL;
- presence = self->priv->personal_data_settings->get_string ("short-status");
- status = self->priv->personal_data_settings->get_string ("long-status");
+ presence = self->priv->personal_data_settings->get_string ("presence");
+ status = self->priv->personal_data_settings->get_string ("presence-notes");
dialog = gtk_dialog_new_with_buttons (_("Custom Message"),
self->priv->parent,
@@ -837,19 +837,19 @@ status_menu_new (Ekiga::ServiceCore & core)
(GtkTreeViewRowSeparatorFunc) status_menu_row_is_separator,
NULL, NULL);
gtk_container_set_border_width (GTK_CONTAINER (self), 0);
- status_menu_set_option (self, self->priv->personal_details->get_presence (),
self->priv->personal_details->get_status ());
+ status_menu_set_option (self, self->priv->personal_details->get_presence (),
self->priv->personal_details->get_note ());
g_signal_connect (self, "changed",
G_CALLBACK (status_menu_option_changed), self);
g_signal_connect (self->priv->personal_data_settings->get_g_settings (),
- "changed::available-custom-status",
+ "changed::available-custom-notes",
G_CALLBACK (status_menu_custom_messages_changed), self);
g_signal_connect (self->priv->personal_data_settings->get_g_settings (),
- "changed::away-custom-status",
+ "changed::away-custom-notes",
G_CALLBACK (status_menu_custom_messages_changed), self);
g_signal_connect (self->priv->personal_data_settings->get_g_settings (),
- "changed::busy-custom-status",
+ "changed::busy-custom-notes",
G_CALLBACK (status_menu_custom_messages_changed), self);
self->priv->connection =
diff --git a/lib/engine/presence/presence-core.cpp b/lib/engine/presence/presence-core.cpp
index b1ec20f..9a9d11b 100644
--- a/lib/engine/presence/presence-core.cpp
+++ b/lib/engine/presence/presence-core.cpp
@@ -78,7 +78,7 @@ Ekiga::PresenceCore::add_presence_fetcher (boost::shared_ptr<PresenceFetcher> fe
{
presence_fetchers.push_back (fetcher);
conns.add (fetcher->presence_received.connect (boost::bind (&Ekiga::PresenceCore::on_presence_received,
this, _1, _2)));
- conns.add (fetcher->status_received.connect (boost::bind (&Ekiga::PresenceCore::on_status_received, this,
_1, _2)));
+ conns.add (fetcher->note_received.connect (boost::bind (&Ekiga::PresenceCore::on_note_received, this, _1,
_2)));
for (std::map<std::string, uri_info>::const_iterator iter
= uri_infos.begin ();
iter != uri_infos.end ();
@@ -107,7 +107,7 @@ Ekiga::PresenceCore::fetch_presence (const std::string uri)
}
presence_received (uri, uri_infos[uri].presence);
- status_received (uri, uri_infos[uri].status);
+ note_received (uri, uri_infos[uri].note);
}
void Ekiga::PresenceCore::unfetch_presence (const std::string uri)
@@ -147,11 +147,11 @@ Ekiga::PresenceCore::on_presence_received (const std::string uri,
}
void
-Ekiga::PresenceCore::on_status_received (const std::string uri,
- const std::string status)
+Ekiga::PresenceCore::on_note_received (const std::string uri,
+ const std::string note)
{
- uri_infos[uri].status = status;
- status_received (uri, status);
+ uri_infos[uri].note = note;
+ note_received (uri, note);
}
void
diff --git a/lib/engine/presence/presence-core.h b/lib/engine/presence/presence-core.h
index 5d99836..bbdb2dc 100644
--- a/lib/engine/presence/presence-core.h
+++ b/lib/engine/presence/presence-core.h
@@ -81,7 +81,7 @@ namespace Ekiga
* The information is given as a pair of strings (uri, data).
*/
boost::signals2::signal<void(std::string, std::string)> presence_received;
- boost::signals2::signal<void(std::string, std::string)> status_received;
+ boost::signals2::signal<void(std::string, std::string)> note_received;
};
class PresencePublisher
@@ -208,7 +208,7 @@ namespace Ekiga
* about an uri ; the information is a pair of strings (uri, information).
*/
boost::signals2::signal<void(std::string, std::string)> presence_received;
- boost::signals2::signal<void(std::string, std::string)> status_received;
+ boost::signals2::signal<void(std::string, std::string)> note_received;
/** This chain allows the core to present forms to the user
*/
@@ -219,16 +219,16 @@ namespace Ekiga
std::list<boost::shared_ptr<PresenceFetcher> > presence_fetchers;
void on_presence_received (const std::string uri,
const std::string presence);
- void on_status_received (const std::string uri,
- const std::string status);
+ void on_note_received (const std::string uri,
+ const std::string note);
struct uri_info
{
- uri_info (): count(0), presence("unknown"), status("")
+ uri_info (): count(0), presence("unknown"), note("")
{ }
int count;
std::string presence;
- std::string status;
+ std::string note;
};
std::map<std::string, uri_info> uri_infos;
diff --git a/lib/engine/presence/presentity.h b/lib/engine/presence/presentity.h
index fa6bace..ea06a80 100644
--- a/lib/engine/presence/presentity.h
+++ b/lib/engine/presence/presentity.h
@@ -68,10 +68,10 @@ namespace Ekiga
*/
virtual const std::string get_presence () const = 0;
- /** Returns the status of the Presentity.
- * @return The Presentity's status.
+ /** Returns the note (message) of the Presentity.
+ * @return The Presentity's note.
*/
- virtual const std::string get_status () const = 0;
+ virtual const std::string get_note () const = 0;
/** Returns the set of groups the Presentity belongs to.
* @return The Presentity's list of groups.
diff --git a/org.gnome.ekiga.gschema.xml.in.in b/org.gnome.ekiga.gschema.xml.in.in
index de0824f..ddf7013 100644
--- a/org.gnome.ekiga.gschema.xml.in.in
+++ b/org.gnome.ekiga.gschema.xml.in.in
@@ -96,23 +96,23 @@
<child name="call-options" schema="org gnome PACKAGE_NAME@.general.call-options"/>
</schema>
<schema gettext-domain="@GETTEXT_PACKAGE@" id="org gnome PACKAGE_NAME@.general.personal-data"
path="/org/gnome/@PACKAGE_NAME@/general/personal-data/">
- <key name="short-status" type="s">
+ <key name="presence" type="s">
<default>'available'</default>
- <_summary>Contact short status</_summary>
- <_description>The short status information</_description>
+ <_summary>Contact presence status</_summary>
+ <_description>Contact presence status</_description>
</key>
- <key name="long-status" type="s">
+ <key name="presence-note" type="s">
<default>'I\'m available using Ekiga'</default>
- <_summary>Contact long status</_summary>
- <_description>The long status information</_description>
+ <_summary>Contact presence note</_summary>
+ <_description>Contact presence note</_description>
</key>
- <key name="away-custom-status" type="as">
+ <key name="away-custom-notes" type="as">
<default>[]</default>
</key>
- <key name="busy-custom-status" type="as">
+ <key name="busy-custom-notes" type="as">
<default>[]</default>
</key>
- <key name="available-custom-status" type="as">
+ <key name="available-custom-notes" type="as">
<default>[]</default>
</key>
</schema>
diff --git a/plugins/avahi/avahi-heap.cpp b/plugins/avahi/avahi-heap.cpp
index 36d4ebc..6e45104 100644
--- a/plugins/avahi/avahi-heap.cpp
+++ b/plugins/avahi/avahi-heap.cpp
@@ -316,7 +316,7 @@ Avahi::Heap::ResolverCallback (AvahiServiceResolver * /*resolver*/,
std::string name;
std::string software;
std::string presence;
- std::string status;
+ std::string note;
gchar *url = NULL;
AvahiStringList *txt_tmp = NULL;
@@ -354,8 +354,10 @@ Avahi::Heap::ResolverCallback (AvahiServiceResolver * /*resolver*/,
std::string value (cvalue);
if (key == "presence")
presence = value;
- else if (key == "status")
- status = value;
+ else if (key == "status") // interoperability with older versions
+ note = value;
+ else if (key == "note")
+ note = value;
else if (key == "software")
software = value;
}
@@ -370,7 +372,7 @@ Avahi::Heap::ResolverCallback (AvahiServiceResolver * /*resolver*/,
/* known contact has been updated */
presence_received (helper.found_presentity ()->get_uri (), presence);
- status_received (helper.found_presentity ()->get_uri (), status);
+ note_received (helper.found_presentity ()->get_uri (), note);
}
else {
@@ -385,7 +387,7 @@ Avahi::Heap::ResolverCallback (AvahiServiceResolver * /*resolver*/,
groups.push_back (_("Neighbours"));
url = g_strdup_printf ("%s:neighbour %s:%d", broken[1], host_name, port);
boost::shared_ptr<Avahi::Presentity> presentity = Avahi::Presentity::create (presence_core, name,
url, groups);
- status_received (url, status);
+ note_received (url, note);
presence_received (url, presence);
add_presentity (presentity);
g_free (url);
diff --git a/plugins/avahi/avahi-presentity.cpp b/plugins/avahi/avahi-presentity.cpp
index 4663711..fcd4122 100644
--- a/plugins/avahi/avahi-presentity.cpp
+++ b/plugins/avahi/avahi-presentity.cpp
@@ -57,7 +57,7 @@ Avahi::Presentity::Presentity (boost::shared_ptr<Ekiga::PresenceCore> presence_c
conn = presence_core->presence_received.connect (boost::bind (&Avahi::Presentity::on_presence_received,
this, _1, _2));
connections.add (conn);
- conn = presence_core->status_received.connect (boost::bind (&Avahi::Presentity::on_status_received, this,
_1, _2));
+ conn = presence_core->note_received.connect (boost::bind (&Avahi::Presentity::on_note_received, this, _1,
_2));
connections.add (conn);
presence_core->pull_actions (*this, _name, _uri);
@@ -81,9 +81,9 @@ Avahi::Presentity::get_presence () const
}
const std::string
-Avahi::Presentity::get_status () const
+Avahi::Presentity::get_note () const
{
- return status;
+ return note;
}
const std::list<std::string>
@@ -116,12 +116,12 @@ Avahi::Presentity::on_presence_received (std::string uri_,
}
void
-Avahi::Presentity::on_status_received (std::string uri_,
- std::string status_)
+Avahi::Presentity::on_note_received (std::string uri_,
+ std::string note_)
{
if (uri == uri_) {
- status = status_;
+ note = note_;
updated (this->shared_from_this ());
}
}
diff --git a/plugins/avahi/avahi-presentity.h b/plugins/avahi/avahi-presentity.h
index fa4a690..8a435e3 100644
--- a/plugins/avahi/avahi-presentity.h
+++ b/plugins/avahi/avahi-presentity.h
@@ -64,7 +64,7 @@ public:
const std::string get_presence () const;
- const std::string get_status () const;
+ const std::string get_note () const;
const std::list<std::string> get_groups () const;
@@ -79,13 +79,13 @@ public:
std::string uri;
std::string presence;
std::list<std::string> groups;
- std::string status;
+ std::string note;
void on_presence_received (std::string uri_,
- std::string presence_);
+ std::string presence_);
- void on_status_received (std::string uri_,
- std::string status_);
+ void on_note_received (std::string uri_,
+ std::string note_);
private:
Presentity (boost::shared_ptr<Ekiga::PresenceCore> presence_core,
diff --git a/plugins/avahi/avahi-publisher.cpp b/plugins/avahi/avahi-publisher.cpp
index 37d10c7..07e401b 100644
--- a/plugins/avahi/avahi-publisher.cpp
+++ b/plugins/avahi/avahi-publisher.cpp
@@ -110,8 +110,8 @@ Avahi::PresencePublisher::publish (G_GNUC_UNUSED const Ekiga::PersonalDetails& d
gchar *typ = NULL;
typ = g_strdup_printf ("_%s._%s",
- iter->voip_protocol.c_str (),
- iter->protocol.c_str ());
+ iter->voip_protocol.c_str (),
+ iter->protocol.c_str ());
/* FIXME: no collision checking here */
avahi_entry_group_update_service_txt_strlst (group, AVAHI_IF_UNSPEC,
@@ -282,8 +282,8 @@ Avahi::PresencePublisher::prepare_txt_record ()
"presence=%s",
details.get_presence ().c_str ());
result = avahi_string_list_add_printf (result,
- "status=%s",
- details.get_status ().c_str ());
+ "note=%s",
+ details.get_note ().c_str ());
result = avahi_string_list_add_printf (result,
"software=%s %s",
PACKAGE_NAME, PACKAGE_VERSION);
diff --git a/plugins/resource-list/rl-cluster.cpp b/plugins/resource-list/rl-cluster.cpp
index 4fcf2c8..1f9da1b 100644
--- a/plugins/resource-list/rl-cluster.cpp
+++ b/plugins/resource-list/rl-cluster.cpp
@@ -51,7 +51,7 @@ RL::Cluster::Cluster (Ekiga::ServiceCore& core_): core(core_), doc()
boost::shared_ptr<Ekiga::PresenceCore> presence_core = core.get<Ekiga::PresenceCore> ("presence-core");
presence_core->presence_received.connect (boost::bind (&RL::Cluster::on_presence_received, this, _1, _2));
- presence_core->status_received.connect (boost::bind (&RL::Cluster::on_status_received, this, _1, _2));
+ presence_core->note_received.connect (boost::bind (&RL::Cluster::on_note_received, this, _1, _2));
contacts_settings = boost::shared_ptr<Ekiga::Settings> (new Ekiga::Settings (CONTACTS_SCHEMA));
std::string raw = contacts_settings->get_string (RL_KEY);
@@ -193,7 +193,7 @@ RL::Cluster::on_new_heap_form_submitted (bool submitted,
void
RL::Cluster::on_presence_received (std::string uri,
- std::string presence)
+ std::string presence)
{
for (iterator iter = begin ();
iter != end ();
@@ -204,13 +204,13 @@ RL::Cluster::on_presence_received (std::string uri,
}
void
-RL::Cluster::on_status_received (std::string uri,
- std::string status)
+RL::Cluster::on_note_received (std::string uri,
+ std::string note)
{
for (iterator iter = begin ();
iter != end ();
++iter) {
- (*iter)->push_status (uri, status);
+ (*iter)->push_note (uri, note);
}
}
diff --git a/plugins/resource-list/rl-cluster.h b/plugins/resource-list/rl-cluster.h
index d895928..69df36c 100644
--- a/plugins/resource-list/rl-cluster.h
+++ b/plugins/resource-list/rl-cluster.h
@@ -85,13 +85,13 @@ namespace RL {
bool writable);
bool on_new_heap_form_submitted (bool submitted,
- Ekiga::Form& result,
+ Ekiga::Form& result,
std::string &error);
void on_presence_received (std::string uri,
- std::string presence);
- void on_status_received (std::string uri,
- std::string presence);
+ std::string presence);
+ void on_note_received (std::string uri,
+ std::string presence);
boost::shared_ptr<Ekiga::Settings> contacts_settings;
};
diff --git a/plugins/resource-list/rl-entry-ref.cpp b/plugins/resource-list/rl-entry-ref.cpp
index 99cf47d..e21247f 100644
--- a/plugins/resource-list/rl-entry-ref.cpp
+++ b/plugins/resource-list/rl-entry-ref.cpp
@@ -49,7 +49,7 @@ RL::EntryRef::EntryRef (Ekiga::ServiceCore& core_,
xmlNodePtr node_):
core(core_), path(path_), position(pos), doc(NULL), node(node_),
link_doc(NULL), link_node(NULL), name_node(NULL),
- presence("unknown"), status(_("Click to fetch"))
+ presence("unknown"), note(_("Click to fetch"))
{
groups.insert (group);
@@ -95,9 +95,9 @@ RL::EntryRef::set_presence (const std::string presence_)
}
void
-RL::EntryRef::set_status (const std::string status_)
+RL::EntryRef::set_note (const std::string note_)
{
- status = status_;
+ note = note_;
updated ();
}
diff --git a/plugins/resource-list/rl-entry.cpp b/plugins/resource-list/rl-entry.cpp
index 4e7cf3d..60b1484 100644
--- a/plugins/resource-list/rl-entry.cpp
+++ b/plugins/resource-list/rl-entry.cpp
@@ -59,7 +59,7 @@ RL::Entry::Entry (Ekiga::ServiceCore& core_,
boost::shared_ptr<xmlDoc> doc_,
xmlNodePtr node_):
core(core_), position(pos), doc(doc_), node(node_), name_node(NULL),
- presence("unknown"), status("")
+ presence("unknown"), note("")
{
groups.insert (group);
@@ -116,9 +116,9 @@ RL::Entry::set_presence (const std::string presence_)
}
void
-RL::Entry::set_status (const std::string status_)
+RL::Entry::set_note (const std::string note_)
{
- status = status_;
+ note = note_;
updated ();
}
@@ -172,7 +172,7 @@ RL::Entry::refresh ()
node = NULL;
name_node = NULL;
presence = "unknown";
- status = ("");
+ note = ("");
updated ();
boost::shared_ptr<XCAP::Core> xcap = core.get<XCAP::Core> ("xcap-core");
@@ -185,7 +185,7 @@ RL::Entry::on_xcap_answer (bool error,
{
if (error) {
- set_status (value);
+ set_note (value);
} else {
@@ -198,10 +198,10 @@ RL::Entry::on_xcap_answer (bool error,
|| node->name == NULL
|| !xmlStrEqual (BAD_CAST "entry", node->name)) {
- set_status (_("Invalid server data"));
+ set_note (_("Invalid server data"));
} else {
- set_status ("");
+ set_note ("");
parse ();
updated ();
}
diff --git a/plugins/resource-list/rl-heap.cpp b/plugins/resource-list/rl-heap.cpp
index b88011f..12fc023 100644
--- a/plugins/resource-list/rl-heap.cpp
+++ b/plugins/resource-list/rl-heap.cpp
@@ -391,8 +391,8 @@ RL::Heap::push_presence (const std::string uri_,
}
void
-RL::Heap::push_status (const std::string uri_,
- const std::string status)
+RL::Heap::push_note (const std::string uri_,
+ const std::string note)
{
for (std::map<PresentityPtr,std::list<boost::signals2::connection> >::const_iterator
iter = presentities.begin ();
@@ -400,7 +400,7 @@ RL::Heap::push_status (const std::string uri_,
++iter) {
if (iter->first->get_uri () == uri_)
- iter->first->set_status (status);
+ iter->first->set_note (note);
}
}
diff --git a/plugins/resource-list/rl-heap.h b/plugins/resource-list/rl-heap.h
index 95bf759..8f14246 100644
--- a/plugins/resource-list/rl-heap.h
+++ b/plugins/resource-list/rl-heap.h
@@ -86,8 +86,8 @@ namespace RL {
void push_presence (const std::string uri,
const std::string presence);
- void push_status (const std::string uri,
- const std::string status);
+ void push_note (const std::string uri,
+ const std::string note);
boost::signals2::signal<void(void)> trigger_saving;
diff --git a/plugins/resource-list/rl-list.cpp b/plugins/resource-list/rl-list.cpp
index 25eabe6..1591435 100644
--- a/plugins/resource-list/rl-list.cpp
+++ b/plugins/resource-list/rl-list.cpp
@@ -58,8 +58,8 @@ public: // no need to make anything private
void push_presence (const std::string uri_,
const std::string presence);
- void push_status (const std::string uri_,
- const std::string status);
+ void push_note (const std::string uri_,
+ const std::string note);
std::string compute_path () const;
@@ -146,10 +146,10 @@ RL::List::push_presence (const std::string uri_,
}
void
-RL::List::push_status (const std::string uri_,
- const std::string status)
+RL::List::push_note (const std::string uri_,
+ const std::string note)
{
- impl->push_status (uri_, status);
+ impl->push_note (uri_, note);
}
bool
@@ -372,20 +372,20 @@ RL::ListImpl::push_presence (const std::string uri_,
}
void
-RL::ListImpl::push_status (const std::string uri_,
- const std::string status)
+RL::ListImpl::push_note (const std::string uri_,
+ const std::string note)
{
for (std::list<boost::shared_ptr<List> >::const_iterator iter = lists.begin ();
iter != lists.end ();
++iter)
- (*iter)->push_status (uri_, status);
+ (*iter)->push_note (uri_, note);
for (std::list<std::pair<boost::shared_ptr<Entry>, std::list<boost::signals2::connection> >
::const_iterator iter = entries.begin ();
iter != entries.end ();
++iter) {
if (iter->first->get_uri () == uri_)
- iter->first->set_status (status);
+ iter->first->set_note (note);
}
}
diff --git a/plugins/resource-list/rl-list.h b/plugins/resource-list/rl-list.h
index 88efd6a..fe75b42 100644
--- a/plugins/resource-list/rl-list.h
+++ b/plugins/resource-list/rl-list.h
@@ -60,13 +60,13 @@ namespace RL
bool has_name (const std::string name) const;
- /* we need to push presence&status down */
+ /* we need to push presence¬e down */
void push_presence (const std::string uri_,
const std::string presence);
- void push_status (const std::string uri_,
- const std::string status);
+ void push_note (const std::string uri_,
+ const std::string note);
/* make the world know what we have */
bool visit_presentities (boost::function1<bool, Ekiga::Presentity&> visitor) const;
diff --git a/plugins/resource-list/rl-presentity.cpp b/plugins/resource-list/rl-presentity.cpp
index f94adff..a1df93b 100644
--- a/plugins/resource-list/rl-presentity.cpp
+++ b/plugins/resource-list/rl-presentity.cpp
@@ -60,7 +60,7 @@ RL::Presentity::Presentity (Ekiga::ServiceCore &services_,
xmlNodePtr node_,
bool writable_) :
services(services_), doc(doc_), node(node_), writable(writable_),
- name_node(NULL), presence("unknown"), status("")
+ name_node(NULL), presence("unknown"), note("")
{
boost::shared_ptr<Ekiga::PresenceCore> presence_core(services.get<Ekiga::PresenceCore> ("presence-core"));
xmlChar *xml_str = NULL;
@@ -154,9 +154,9 @@ RL::Presentity::get_presence () const
const std::string
-RL::Presentity::get_status () const
+RL::Presentity::get_note () const
{
- return status;
+ return note;
}
@@ -182,9 +182,9 @@ RL::Presentity::set_presence (const std::string _presence)
}
void
-RL::Presentity::set_status (const std::string _status)
+RL::Presentity::set_note (const std::string _note)
{
- status = _status;
+ note = _note;
updated ();
}
diff --git a/plugins/resource-list/rl-presentity.h b/plugins/resource-list/rl-presentity.h
index 9576b5d..8f2b5e8 100644
--- a/plugins/resource-list/rl-presentity.h
+++ b/plugins/resource-list/rl-presentity.h
@@ -64,7 +64,7 @@ namespace RL
const std::string get_presence () const;
- const std::string get_status () const;
+ const std::string get_note () const;
const std::set<std::string> get_groups () const;
@@ -74,7 +74,7 @@ namespace RL
void set_presence (const std::string _presence);
- void set_status (const std::string _status);
+ void set_note (const std::string _note);
bool populate_menu (Ekiga::MenuBuilder &);
@@ -108,7 +108,7 @@ namespace RL
std::string uri;
std::string presence;
- std::string status;
+ std::string note;
std::map<std::string, xmlNodePtr> group_nodes;
std::set<std::string> groups;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]