$ git clone https://socialnetwork.ion.nu/socialnetwork.git
commit eae8cf974857f87ce782179d258c4b7978fd64fb
Author: Alicia <...>
Date:   Tue Jul 25 05:42:12 2017 +0000

    Started adding API documentation with gtk-doc.

diff --git a/Documentation/api/socialnetwork-docs.xml b/Documentation/api/socialnetwork-docs.xml
new file mode 100644
index 0000000..7c460ba
--- /dev/null
+++ b/Documentation/api/socialnetwork-docs.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
+               "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"
+[
+  <!ENTITY % local.common.attrib "xmlns:xi  CDATA  #FIXED 'http://www.w3.org/2003/XInclude'">
+]>
+<book id="index">
+  <bookinfo>
+    <title>SocialNetwork Reference Manual</title>
+    <releaseinfo>
+      for socialnetwork 0.x.
+      The latest version of this documentation can be found on-line at
+      <ulink role="online-location" url="https://socialnetwork.ion.nu/apidocs/">https://socialnetwork.ion.nu/apidocs/</ulink>.
+    </releaseinfo>
+  </bookinfo>
+
+  <chapter>
+    <title>libsocial</title>
+        <xi:include href="xml/buffer.xml"/>
+    <xi:include href="xml/peer.xml"/>
+    <xi:include href="xml/social.xml"/>
+    <xi:include href="xml/udpstream.xml"/>
+    <xi:include href="xml/update.xml"/>
+
+  </chapter>
+  <!-- enable this when you use gobject types
+  <chapter id="object-tree">
+    <title>Object Hierarchy</title>
+    <xi:include href="xml/tree_index.sgml"/>
+  </chapter>
+  -->
+  <index id="api-index-full">
+    <title>API Index</title>
+    <xi:include href="xml/api-index-full.xml"><xi:fallback /></xi:include>
+  </index>
+  <index id="deprecated-api-index" role="deprecated">
+    <title>Index of deprecated API</title>
+    <xi:include href="xml/api-index-deprecated.xml"><xi:fallback /></xi:include>
+  </index>
+  <!-- enable this when you use gobject introspection annotations
+  <xi:include href="xml/annotation-glossary.xml"><xi:fallback /></xi:include>
+  -->
+</book>
diff --git a/Makefile b/Makefile
index 62667e9..7ebe605 100644
--- a/Makefile
+++ b/Makefile
@@ -36,5 +36,11 @@ peertest: peertest.o peer.o udpstream.o
 udptest: udptest.o udpstream.o
  $(CC) $^ -o $@
 
+docs:
+ mkdir -p Documentation/api/html
+ gtkdoc-scan --module=socialnetwork --output-dir=Documentation/api --source-dir=. --rebuild-sections
+ cd Documentation/api && gtkdoc-mkdb --module=socialnetwork --output-format=XML --source-dir=../..
+ cd Documentation/api/html && gtkdoc-mkhtml socialnetwork ../socialnetwork-docs.xml
+
 clean:
  rm -f *.o *.so socialtest peertest udptest *.pc
diff --git a/peer.h b/peer.h
index a4aeb51..85811d9 100644
--- a/peer.h
+++ b/peer.h
@@ -14,6 +14,13 @@
     You should have received a copy of the GNU Affero General Public License
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
+/**
+* SECTION:peer
+* @title: Peer
+* @short_description: Handles peering and secure communication between peers
+*
+* Handles peering and secure communication between peers
+*/
 #ifndef PEER_H
 #define PEER_H
 #include <stdint.h>
diff --git a/social.h b/social.h
index d1c09da..1a181a3 100644
--- a/social.h
+++ b/social.h
@@ -14,6 +14,13 @@
     You should have received a copy of the GNU Affero General Public License
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
+/**
+* SECTION:social
+* @title: Social
+* @short_description: High-level social functions
+*
+* High-level social functions
+*/
 #ifndef SOCIAL_H
 #define SOCIAL_H
 #include <stdint.h>
@@ -59,16 +66,38 @@ extern struct user** social_users;
 extern unsigned int social_usercount;
 extern struct user* social_self; // Most things we need to keep track of for ourself are the same things we need to keep track of for others
 extern char* social_prefix;
+/**
+* social_init:
+* @keypath: Path to the private key file used as one's identity
+* @pathprefix: Prefix in which to store various data (updates, public keys)
+*
+* Initialize libsocial with an account/key
+*/
 extern void social_init(const char* keypath, const char* pathprefix);
 extern struct friendslist* social_user_getcircle(struct user* user, uint32_t circle);
 extern void social_user_addtocircle(struct user* user, uint32_t circle, const unsigned char id[ID_SIZE]);
 extern void social_user_removefromcircle(struct user* user, uint32_t circle, const unsigned char id[ID_SIZE]);
 extern void social_addfriend(const unsigned char id[ID_SIZE], uint32_t circle);
 extern void social_removefriend(const unsigned char id[ID_SIZE], uint32_t circle);
+/**
+* social_createpost:
+* @msg: Message to post
+* @privacy: Privacy setting for the update
+*
+* Creates a post update
+*/
 extern void social_createpost(const char* msg, struct privacy* privacy);
 extern void social_updatefield(const char* name, const char* value, struct privacy* privacy);
 extern struct user* social_finduser(const unsigned char id[ID_SIZE]);
 extern void social_shareupdate(struct update* update);
 extern char social_privacy_check(struct user* origin, struct privacy* privacy, struct user* user);
+/**
+* social_setcircle:
+* @circle: Circle ID
+* @name: New name for the circle
+* @privacy: Circle privacy, determines who can see friends in this circle
+*
+* Set properties for a given circle ID
+*/
 extern void social_setcircle(uint32_t circle, const char* name, struct privacy* privacy);
 #endif
diff --git a/udpstream.h b/udpstream.h
index b1c4802..eb7cec6 100644
--- a/udpstream.h
+++ b/udpstream.h
@@ -14,6 +14,13 @@
     You should have received a copy of the GNU Affero General Public License
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
+/**
+* SECTION:udpstream
+* @title: UDP stream
+* @short_description: Connection-oriented reliable UDP
+*
+* Connection-oriented reliable transfer protocol operating over UDP
+*/
 #ifndef UDPSTREAM_H
 #define UDPSTREAM_H
 #include <sys/socket.h>
diff --git a/update.h b/update.h
index d7a23c8..0504d39 100644
--- a/update.h
+++ b/update.h
@@ -14,6 +14,13 @@
     You should have received a copy of the GNU Affero General Public License
     along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
+/**
+* SECTION:update
+* @title: Update
+* @short_description: Managing social updates
+*
+* Manage updates (posts, friends, profile fields)
+*/
 #include "social.h"
 #include "buffer.h"