grim/purple-objects-docbook

c87df7294011
Parents 7a3f0e0dbb05
Children 8aabfec5672d
a bunch more graphs for the blist chapter
--- a/graphs/blistnodes.hierarchy Sat Jun 01 03:36:19 2013 -0500
+++ b/graphs/blistnodes.hierarchy Sat Jun 01 04:43:05 2013 -0500
@@ -8,6 +8,7 @@
<object name="PurpleBuddy" type="abstract"/>
<object name="PurpleChat" type="abstract"/>
<object name="PurpleContact" type="concrete"/>
+ <object name="PurpleCountingNode" type="abstract"/>
<object name="PurpleGroup" type="concrete"/>
<object name="PurpleXMPPBuddy" type="concrete"/>
<object name="PurpleXMPPChat" type="concrete"/>
@@ -20,8 +21,10 @@
<relation start="PurpleBListNode" end="PurpleObject" type="is-a"/>
<relation start="PurpleBuddy" end="PurpleBListNode" type="is-a"/>
<relation start="PurpleChat" end="PurpleBListNode" type="is-a"/>
- <relation start="PurpleContact" end="PurpleBListNode" type="is-a"/>
- <relation start="PurpleGroup" end="PurpleBListNode" type="is-a"/>
+ <relation start="PurpleCountingNode" end="PurpleBListNode" type="is-a"/>
+
+ <relation start="PurpleContact" end="PurpleCountingNode" type="is-a"/>
+ <relation start="PurpleGroup" end="PurpleCountingNode" type="is-a"/>
<relation start="PurpleContact" end="PurpleBuddy" type="has-a"/>
<relation start="PurpleGroup" end="PurpleContact" type="has-a"/>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/graphs/buddy.class Sat Jun 01 04:43:05 2013 -0500
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<class name="PurpleBuddy" type="abstract">
+ <properties>
+ <property name="account" type="PurpleAccount *" scope="private"/>
+ <property name="name" type="gchar *" scope="private"/>
+ <property name="local_alias" type="gchar *" scope="private"/>
+ <property name="server_alias" type="gchar *" scope="private"/>
+ <property name="icon" type="PurpleIcon *" scope="private"/>
+ <property name="presence" type="PurplePresence *" scope="private"/>
+ </properties>
+ <methods>
+ <method name="purple_buddy_get_account" type="PurpleAccount *" scope="public">
+ <argument name="buddy" type="const PurpleBuddy *"/>
+ </method>
+ <method name="purple_buddy_set_icon" type="void" scope="public">
+ <argument name="buddy" type="PurpleBuddy *"/>
+ <argument name="icon" type="PurpleIcon *"/>
+ </method>
+ <method name="purple_buddy_get_icon" type="PurpleIcon *" scope="public">
+ <argument name="buddy" type="const PurpleBuddy *"/>
+ </method>
+ <method name="purple_buddy_get_presence" type="PurplePresence *" scope="public">
+ <argument name="buddy" type="const PurpleBuddy *"/>
+ </method>
+ </methods>
+</class>
+<!--
+ vi: syntax=xml
+-->
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/graphs/chat.class Sat Jun 01 04:43:05 2013 -0500
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<class name="PurpleChat" type="abstract">
+ <properties>
+ <property name="account" type="PurpleAccount *" scope="private"/>
+ <property name="local_alias" type="gchar *" scope="private"/>
+ </properties>
+ <methods>
+ <method name="purple_chat_get_account" type="PurpleAccount *" scope="public">
+ <argument name="chat" type="const PurpleChat *"/>
+ </method>
+ <method name="purple_chat_set_local_alias" type="void" scope="public">
+ <argument name="chat" type="PurpleChat *"/>
+ <argument name="alias" type="const gchar *"/>
+ </method>
+ <method name="purple_chat_get_icon" type="const gchar *" scope="public">
+ <argument name="chat" type="const PurpleChat *"/>
+ </method>
+ </methods>
+</class>
+<!--
+ vi: syntax=xml
+-->
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/graphs/contact.class Sat Jun 01 04:43:05 2013 -0500
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<class name="PurpleContact" type="concrete">
+ <properties>
+ <property name="priority" type="PurpleBuddy *" scope="private"/>
+ <property name="local_alias" type="gchar *" scope="private"/>
+ </properties>
+ <methods>
+ <method name="purple_contact_get_priority" type="PurpleBuddy *" scope="public">
+ <argument name="contact" type="const PurpleContact *"/>
+ </method>
+ <method name="purple_contact_set_local_alias" type="void" scope="public">
+ <argument name="contact" type="PurpleContact *"/>
+ <argument name="alias" type="const gchar *"/>
+ </method>
+ <method name="purple_contact_get_local_alias" type="const gchar *" scope="public">
+ <argument name="contact" type="const PurpleContact *"/>
+ </method>
+ </methods>
+</class>
+<!--
+ vi: syntax=xml
+-->
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/graphs/counting-node.class Sat Jun 01 04:43:05 2013 -0500
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<class name="PurpleCountingNode" type="abstract">
+ <properties>
+ <property name="total_size" type="guint" scope="private"/>
+ <property name="current_size" type="guint" scope="private"/>
+ <property name="online_count" type="guint" scope="private"/>
+ </properties>
+ <methods>
+ <method name="purple_counting_node_get_total_size" type="guint" scope="public">
+ <argument name="node" type="const PurpleCountingNode *"/>
+ </method>
+ <method name="purple_counting_node_get_current_size" type="guint" scope="public">
+ <argument name="node" type="const PurpleCountingNode *"/>
+ </method>
+ <method name="purple_counting_node_get_online_size" type="guint" scope="public">
+ <argument name="node" type="const PurpleCountingNode *"/>
+ </method>
+ </methods>
+</class>
+<!--
+ vi: syntax=xml
+-->
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/graphs/group.class Sat Jun 01 04:43:05 2013 -0500
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<class name="PurpleGroup" type="concrete">
+ <properties>
+ <property name="name" type="gchar *" scope="private"/>
+ </properties>
+ <methods>
+ <method name="purple_group_set_name" type="void" scope="public">
+ <argument name="group" type="const PurpleGroup *"/>
+ <argument name="name" type="const gchar *"/>
+ </method>
+ <method name="purple_group_get_name" type="const gchar *" scope="public">
+ <argument name="group" type="const PurpleGroup *"/>
+ </method>
+ </methods>
+</class>
+<!--
+ vi: syntax=xml
+-->
--- a/xml/buddylist.xml Sat Jun 01 03:36:19 2013 -0500
+++ b/xml/buddylist.xml Sat Jun 01 04:43:05 2013 -0500
@@ -4,25 +4,143 @@
<chapter id="buddylist">
<title>Buddy List</title>
- <para>
- </para>
+ <simplesect id="intro">
+ <para>
+ Since the buddy list is already follows inheritance, there are not
+ many recomendations. The main differences will be that protocol
+ data will be replaced by subclasses for each protocol.
+ </para>
+ </simplesect>
+
+ <simplesect id="hiearchy">
+ <para>
+ The only change in the object hierarchy is that PurpleBuddy,
+ PurpleChat, PurpleContact, and PurpleGroup are now all abstract
+ classes.
+ </para>
+
+ <figure id="blist-hierarchy">
+ <title>Buddy List Object Hierarchy</title>
+
+ <graphic fileref="graphs/blistnodes.png"/>
+ </figure>
+ </simplesect>
+
+ <simplesect id="blistnode">
+ <para>
+ PurpleBlistNode has the most changes of any of the classes. The
+ prev, next, parent, and child properties should be replaced by
+ GNode. GNode is a built-in data structure GLib and provides
+ many methods of traversal.
+ </para>
- <figure id="blist-hierarchy">
- <title>Buddy List Object Hierarchy</title>
+ <para>
+ Next the ui_settings property should be replaced by calling
+ g_object_set_data_full.
+ </para>
+
+ <para>
+ As of right now, settings will remain. We can't expect plugin
+ authors to create their own persistent storage for data they want
+ to associate with a buddy.
+ </para>
+
+ <figure id="blistnode-class">
+ <title>BlistNode Class</title>
+
+ <graphic fileref="graphs/blistnode.png"/>
+ </figure>
+ </simplesect>
- <graphic fileref="graphs/blistnodes.png"/>
- </figure>
+ <simplesect id="blistnodeflags">
+ <title>PurpleBlistNodeFlags</title>
+
+ <para>
+ There are no changes to the PurpleBlistNodeFlags at this time.
+ However, it may make more sense to move this to a property on the
+ PurpleBlistNode class iteself.
+ </para>
+
+ <figure id="blistnodeflags-enum">
+ <title>BlistNodeFlags Enumeration</title>
+
+ <graphic fileref="graphs/blistnodeflags.png"/>
+ </figure>
+ </simplesect>
+
+ <simplesect id="buddy">
+ <title>PurpleBuddy</title>
- <figure id="blistnode-class">
- <title>BlistNode Class</title>
+ <para>
+ Like other object in the buddy list hierarchy, there aren't many
+ changes for buddies. proto_data, and media_caps are
+ removed. With an account specific subclass, proto_data becomes
+ obsolete and media_caps are moved to an interface that the protocol
+ specific subclass will implement if it supports any media.
+ </para>
+
+ <para>
+ The only other change is to rename alias to local_alias to avoid
+ ambiguity.
+ </para>
+
+ <figure id="buddy-class">
+ <title>PurpleBuddy Class</title>
- <graphic fileref="graphs/blistnode.png"/>
- </figure>
+ <graphic fileref="graphs/buddy.png"/>
+ </figure>
+ </simplesect>
+
+ <simplesect id="chat">
+ <title>PurpleChat</title>
+
+ <para>
+ </para>
+
+ <figure id="chat-class">
+ <title>PurpleChat class</title>
+
+ <graphic fileref="graphs/chat.png"/>
+ </figure>
+ </simplesect>
+
+ <simplesect id="countingnode">
+ <title>PurpleCountingNode</title>
- <figure id="blistnodeflags-enum">
- <title>BlistNodeFlags Enumeration</title>
+ <para>
+ </para>
+
+ <figure id="counting-node-class">
+ <title>PurpleCountingNode Class</title>
+
+ <graphic fileref="graphs/counting-node.png"/>
+ </figure>
+ </simplesect>
+
+ <simplesect id="contact">
+ <title>PurpleContact</title>
+
+ <para>
+ </para>
- <graphic fileref="graphs/blistnodeflags.png"/>
- </figure>
+ <figure id="contact-class">
+ <title>PurpleContact Class</title>
+
+ <graphic fileref="graphs/contact.png"/>
+ </figure>
+ </simplesect>
+
+ <simplesect id="group">
+ <title>PurpleGroup</title>
+
+ <para>
+ </para>
+
+ <figure id="group-class">
+ <title>PurpleGroup Class</title>
+
+ <graphic fileref="graphs/group.png"/>
+ </figure>
+ </simplesect>
</chapter>