Convert the facebook documentation to gi-docgen
Testing Done:
Built the docs and verified that they looked okay.
Reviewed at https://reviews.imfreedom.org/r/1070/
--- a/convey.yaml Tue Oct 19 00:46:21 2021 -0500
+++ b/convey.yaml Tue Oct 19 00:47:42 2021 -0500
@@ -48,7 +48,7 @@
- build-docs/doc/reference/finch/html/:finch3-docs
- build-docs/doc/reference/libpurple/html/:purple3-docs
- build-docs/doc/reference/pidgin/html/:pidgin3-docs
- - build-docs/doc/reference/protocols/facebook/html/:facebook3-docs
+ - build-docs/doc/reference/protocols/facebook/facebook/:facebook3-docs --- a/doc/reference/protocols/facebook/facebook-docs.xml Tue Oct 19 00:46:21 2021 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
-<!ENTITY % local.common.attrib "xmlns:xi CDATA #FIXED 'http://www.w3.org/2003/XInclude'">
-<!ENTITY version SYSTEM "../../libpurple/version.xml">
-<book id="index" xmlns:xi="http://www.w3.org/2003/XInclude">
- <title>Facebook Protocol Reference Manual</title>
- <title>Facebook Plugin &version;</title>
- The Facebook Messenger protocol plugin for libpurple.
- <title>API Reference</title>
- <xi:include href="xml/api.xml" />
- <xi:include href="xml/data.xml" />
- <xi:include href="xml/facebook.xml" />
- <xi:include href="xml/http.xml" />
- <xi:include href="xml/id.xml" />
- <xi:include href="xml/json.xml" />
- <xi:include href="xml/mqtt.xml" />
- <xi:include href="xml/thrift.xml" />
- <xi:include href="xml/util.xml" />
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/doc/reference/protocols/facebook/facebook.toml.in Tue Oct 19 00:47:42 2021 -0500
@@ -0,0 +1,48 @@
+version = "@PURPLE_VERSION@" +browse_url = "https://keep.imfreedom.org/pidgin/pidgin/" +repository_url = "https://keep.imfreedom.org/pidgin/pidgin/" +website_url = "https://keep.imfreedom.org/pidgin/pidgin/" +authors = "Pidgin Developers" +license = "GPL-2.0-or-later" +description = "Purple Facebook Protocol Plugin" +dependencies = [ "GLib-2.0", "GObject-2.0", "GModule-2.0", "Purple-3.0" ] + [dependencies."GLib-2.0"] + description = "General-purpose, portable utility library." + docs_url = "https://docs.gtk.org/glib/" + [dependencies."GObject-2.0"] + description = "The base type system library" + docs_url = "https://docs.gtk.org/gobject/" + [dependencies."GModule-2.0"] + description = "Portable API for dynamically loading modules" + docs_url = "https://docs.gtk.org/gmodule/" + [dependencies."Purple-3.0"] + description = "Purple Universal Chat Library" + docs_url = "https://docs.imfreedom.org/purple3/" +show_index_summary = true +show_class_hierarchy = true +base_url = "https://keep.imfreedom.org/pidgin/pidgin/file/default/" +# The same order will be used when generating the index +urlmap_file = "urlmap.js" --- a/doc/reference/protocols/facebook/meson.build Tue Oct 19 00:46:21 2021 -0500
+++ b/doc/reference/protocols/facebook/meson.build Tue Oct 19 00:47:42 2021 -0500
@@ -1,33 +1,32 @@
-# Header files or dirs to ignore when scanning. Use base file/dir names
+facebook_doc_content_files = [] -# Extra options to supply to gtkdoc-scan.
- '--deprecated-guards=PURPLE_DISABLE_DEPRECATED',
- '--ignore-headers=' + ' '.join(ignore_hfiles),
+ facebook_toml = configure_file( + input : 'facebook.toml.in', + output : 'facebook.toml', + configuration : version_conf, + install_dir : docs_dir / 'facebook', -# Extra options to supply to fixxref
- '--extra-dir=../../libpurple',
-# Extra SGML files that are included by $(DOC_MAIN_XML_FILE).
+ facebook_doc = custom_target('facebook-doc', + input : [ facebook_toml, facebook_gir[0] ], + '--output-dir=@OUTPUT@', + '--content-dir=@0@'.format(meson.current_source_dir()), + depend_files : [ facebook_doc_content_files ], + build_by_default : true, + install_dir : docs_dir, -facebook_doc = gnome.gtkdoc(DOC_MODULE,
- main_xml : DOC_MODULE + '-docs.xml',
- src_dir : facebook_inc,
- dependencies : facebook_dep,
- fixxref_args : fixxref_args,
- gobject_typesfile : DOC_MODULE + '.types',
- content_files : content_files)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/doc/reference/protocols/facebook/urlmap.js Tue Oct 19 00:47:42 2021 -0500
@@ -0,0 +1,10 @@
+// SPDX-FileCopyrightText: 2021 GNOME Foundation +// SPDX-License-Identifier: LGPL-2.1-or-later +// A map between namespaces and base URLs for their online documentation + [ 'GLib', 'https://docs.gtk.org/glib/' ], + [ 'GObject', 'https://docs.gtk.org/gobject/' ], + [ 'GModule', 'https://docs.gtk.org/gmodule/' ], + [ 'Purple3', 'https://docs.imfreedom.org/purple3/' ], --- a/libpurple/protocols/facebook/api.h Tue Oct 19 00:46:21 2021 -0500
+++ b/libpurple/protocols/facebook/api.h Tue Oct 19 00:47:42 2021 -0500
@@ -22,15 +22,6 @@
#ifndef PURPLE_FACEBOOK_API_H
#define PURPLE_FACEBOOK_API_H
- * @section_id: facebook-api
- * @short_description: <filename>api.h</filename>
- * The API for interacting with the Facebook Messenger protocol.
@@ -529,11 +520,6 @@
- * Returns: The #GType for an #FbApi.
G_DECLARE_FINAL_TYPE(FbApi, fb_api, FB, API, GObject)
--- a/libpurple/protocols/facebook/data.h Tue Oct 19 00:46:21 2021 -0500
+++ b/libpurple/protocols/facebook/data.h Tue Oct 19 00:47:42 2021 -0500
@@ -22,15 +22,6 @@
#ifndef PURPLE_FACEBOOK_DATA_H
#define PURPLE_FACEBOOK_DATA_H
- * @section_id: facebook-data
- * @short_description: <filename>data.h</filename>
- * @title: Connection Data
@@ -56,18 +47,8 @@
#define FB_DATA_ICON_SIZE_MAX 0xa00000 /* 10MiB */
- * Returns: The #GType for an #FbData.
G_DECLARE_FINAL_TYPE(FbData, fb_data, FB, DATA, GObject)
- * fb_data_image_get_type:
- * Returns: The #GType for an #FbDataImage.
G_DECLARE_FINAL_TYPE(FbDataImage, fb_data_image, FB, DATA_IMAGE, GObject)
--- a/libpurple/protocols/facebook/facebook.h Tue Oct 19 00:46:21 2021 -0500
+++ b/libpurple/protocols/facebook/facebook.h Tue Oct 19 00:47:42 2021 -0500
@@ -22,15 +22,6 @@
#ifndef PURPLE_FACEBOOK_FACEBOOK_H
#define PURPLE_FACEBOOK_FACEBOOK_H
- * @section_id: facebook-plugin
- * @short_description: <filename>facebook.h</filename>
- * @title: Facebook Plugin
- * The Facebook Messenger #PurpleProtocol.
@@ -57,10 +48,4 @@
* The base class for all #FacebookProtocol's.
- * facebook_protocol_get_type:
- * Returns: The #GType for a #FacebookProtocol.
#endif /* PURPLE_FACEBOOK_FACEBOOK_H */
--- a/libpurple/protocols/facebook/http.h Tue Oct 19 00:46:21 2021 -0500
+++ b/libpurple/protocols/facebook/http.h Tue Oct 19 00:47:42 2021 -0500
@@ -22,15 +22,6 @@
#ifndef PURPLE_FACEBOOK_HTTP_H
#define PURPLE_FACEBOOK_HTTP_H
- * @section_id: facebook-http
- * @short_description: <filename>http.h</filename>
- * @title: HTTP Utilities
#include <libsoup/soup.h>
--- a/libpurple/protocols/facebook/id.h Tue Oct 19 00:46:21 2021 -0500
+++ b/libpurple/protocols/facebook/id.h Tue Oct 19 00:47:42 2021 -0500
@@ -22,15 +22,6 @@
#ifndef PURPLE_FACEBOOK_ID_H
#define PURPLE_FACEBOOK_ID_H
- * @section_id: facebook-id
- * @short_description: <filename>id.h</filename>
- * @title: Facebook Identifier
- * The Facebook identifier utilities.
#include <glib/gprintf.h>
--- a/libpurple/protocols/facebook/json.h Tue Oct 19 00:46:21 2021 -0500
+++ b/libpurple/protocols/facebook/json.h Tue Oct 19 00:47:42 2021 -0500
@@ -22,15 +22,6 @@
#ifndef PURPLE_FACEBOOK_JSON_H
#define PURPLE_FACEBOOK_JSON_H
- * @section_id: facebook-json
- * @short_description: <filename>json.h</filename>
- * @title: JSON Utilities
#include <json-glib/json-glib.h>
@@ -83,11 +74,6 @@
FB_JSON_TYPE_STR = G_TYPE_STRING
- * fb_json_values_get_type:
- * Returns: The #GType for an #FbJsonValues.
G_DECLARE_FINAL_TYPE(FbJsonValues, fb_json_values, FB, JSON_VALUES,
--- a/libpurple/protocols/facebook/meson.build Tue Oct 19 00:46:21 2021 -0500
+++ b/libpurple/protocols/facebook/meson.build Tue Oct 19 00:47:42 2021 -0500
@@ -37,4 +37,23 @@
dependencies : [json, libpurple_dep, glib])
devenv.append('PURPLE_PLUGIN_PATH', meson.current_build_dir())
+ if enable_introspection + introspection_sources = FACEBOOK_SOURCES + facebook_gir_includes = ['GObject-2.0', 'Gio-2.0', 'Gst-1.0'] + facebook_gir = gnome.generate_gir(facebook_prpl, + sources : introspection_sources, + includes : facebook_gir_includes, + namespace : 'Facebook', + identifier_prefix : 'Fb', + nsversion : '@0@.@1@'.format(purple_major_version, + dependencies: [gplugin_dep, libpurple_dep], + extra_args : ['-DPURPLE_COMPILATION', '--quiet']) --- a/libpurple/protocols/facebook/mqtt.h Tue Oct 19 00:46:21 2021 -0500
+++ b/libpurple/protocols/facebook/mqtt.h Tue Oct 19 00:47:42 2021 -0500
@@ -22,15 +22,6 @@
#ifndef PURPLE_FACEBOOK_MQTT_H
#define PURPLE_FACEBOOK_MQTT_H
- * @section_id: facebook-mqtt
- * @short_description: <filename>mqtt.h</filename>
- * @title: MQTT Connection
@@ -199,18 +190,8 @@
FB_MQTT_MESSAGE_TYPE_DISCONNECT = 14
- * Returns: The #GType for an #FbMqtt.
G_DECLARE_FINAL_TYPE(FbMqtt, fb_mqtt, FB, MQTT, GObject)
- * fb_mqtt_message_get_type:
- * Returns: The #GType for an #FbMqttMessage.
G_DECLARE_FINAL_TYPE(FbMqttMessage, fb_mqtt_message, FB, MQTT_MESSAGE,
--- a/libpurple/protocols/facebook/thrift.h Tue Oct 19 00:46:21 2021 -0500
+++ b/libpurple/protocols/facebook/thrift.h Tue Oct 19 00:47:42 2021 -0500
@@ -22,15 +22,6 @@
#ifndef PURPLE_FACEBOOK_THRIFT_H
#define PURPLE_FACEBOOK_THRIFT_H
- * @section_id: facebook-thrift
- * @short_description: <filename>thrift.h</filename>
- * @title: Thrift Reader/Writer
- * The Thrift reader/writer.
@@ -76,11 +67,6 @@
- * Returns: The #GType for an #FbThrift.
G_DECLARE_FINAL_TYPE(FbThrift, fb_thrift, FB, THRIFT, GObject)
--- a/libpurple/protocols/facebook/util.h Tue Oct 19 00:46:21 2021 -0500
+++ b/libpurple/protocols/facebook/util.h Tue Oct 19 00:47:42 2021 -0500
@@ -22,15 +22,6 @@
#ifndef PURPLE_FACEBOOK_UTIL_H
#define PURPLE_FACEBOOK_UTIL_H
- * @section_id: facebook-util
- * @short_description: <filename>util.h</filename>
- * @title: General Utilities
- * The general utilities.