pidgin/pidgin

f29fa0dda4bf
Parents 85ddac53ef14
Children 089c8a3a9ff4
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
export:
type: docker/export
--- 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 @@
-<?xml version="1.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">
- <bookinfo>
- <title>Facebook Protocol Reference Manual</title>
- <abstract>
- <title>Facebook Plugin &version;</title>
- <para>
- The Facebook Messenger protocol plugin for libpurple.
- </para>
- </abstract>
- </bookinfo>
-
- <reference label="II">
- <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" />
- </reference>
-</book>
--- /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 @@
+[library]
+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"
+logo_url = ""
+license = "GPL-2.0-or-later"
+description = "Purple Facebook Protocol Plugin"
+dependencies = [ "GLib-2.0", "GObject-2.0", "GModule-2.0", "Purple-3.0" ]
+devhelp = true
+search_index = true
+
+ [dependencies."GLib-2.0"]
+ name = "GLib"
+ description = "General-purpose, portable utility library."
+ docs_url = "https://docs.gtk.org/glib/"
+
+ [dependencies."GObject-2.0"]
+ name = "GObject"
+ description = "The base type system library"
+ docs_url = "https://docs.gtk.org/gobject/"
+
+ [dependencies."GModule-2.0"]
+ name = "GModule"
+ description = "Portable API for dynamically loading modules"
+ docs_url = "https://docs.gtk.org/gmodule/"
+
+ [dependencies."Purple-3.0"]
+ name = "Purple"
+ description = "Purple Universal Chat Library"
+ docs_url = "https://docs.imfreedom.org/purple3/"
+
+[theme]
+name = "basic"
+show_index_summary = true
+show_class_hierarchy = true
+
+[source-location]
+base_url = "https://keep.imfreedom.org/pidgin/pidgin/file/default/"
+
+[extra]
+# The same order will be used when generating the index
+content_files = [
+]
+content_images = [
+]
+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 @@
-DOC_MODULE = 'facebook'
-
-# Header files or dirs to ignore when scanning. Use base file/dir names
-ignore_hfiles = [
-]
+facebook_doc_content_files = []
-# Extra options to supply to gtkdoc-scan.
-scan_args = [
- '--deprecated-guards=PURPLE_DISABLE_DEPRECATED',
- '--rebuild-types',
- '--rebuild-sections',
- '--ignore-headers=' + ' '.join(ignore_hfiles),
-]
+if get_option('doc')
+ facebook_toml = configure_file(
+ input : 'facebook.toml.in',
+ output : 'facebook.toml',
+ configuration : version_conf,
+ install : true,
+ install_dir : docs_dir / 'facebook',
+ )
-# Extra options to supply to fixxref
-fixxref_args = [
- '--extra-dir=../../libpurple',
-]
-
-# Extra SGML files that are included by $(DOC_MAIN_XML_FILE).
-content_files = [
- libpurple_version_xml,
-]
+ facebook_doc = custom_target('facebook-doc',
+ input : [ facebook_toml, facebook_gir[0] ],
+ output : 'facebook',
+ command : [
+ gidocgen,
+ 'generate',
+ '--quiet',
+ '--fatal-warnings',
+ '--config=@INPUT0@',
+ '--output-dir=@OUTPUT@',
+ '--no-namespace-dir',
+ '--content-dir=@0@'.format(meson.current_source_dir()),
+ '@INPUT1@'
+ ],
+ depend_files : [ facebook_doc_content_files ],
+ build_by_default : true,
+ install : true,
+ install_dir : docs_dir,
+ )
+endif
-facebook_doc = gnome.gtkdoc(DOC_MODULE,
- main_xml : DOC_MODULE + '-docs.xml',
- src_dir : facebook_inc,
- dependencies : facebook_dep,
- install : true,
- scan_args : scan_args,
- 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
+baseURLs = [
+ [ '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:api
- * @section_id: facebook-api
- * @short_description: <filename>api.h</filename>
- * @title: Facebook API
- *
- * The API for interacting with the Facebook Messenger protocol.
- */
-
#include <glib.h>
#include <purple.h>
@@ -529,11 +520,6 @@
gchar *csum;
};
-/**
- * fb_api_get_type:
- *
- * 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:data
- * @section_id: facebook-data
- * @short_description: <filename>data.h</filename>
- * @title: Connection Data
- *
- * The Connection Data.
- */
-
#include <glib.h>
#include <purple.h>
@@ -56,18 +47,8 @@
*/
#define FB_DATA_ICON_SIZE_MAX 0xa00000 /* 10MiB */
-/**
- * fb_data_get_type:
- *
- * 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:facebook
- * @section_id: facebook-plugin
- * @short_description: <filename>facebook.h</filename>
- * @title: Facebook Plugin
- *
- * The Facebook Messenger #PurpleProtocol.
- */
-
#include <glib.h>
#include <gmodule.h>
@@ -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:http
- * @section_id: facebook-http
- * @short_description: <filename>http.h</filename>
- * @title: HTTP Utilities
- *
- * The HTTP utilities.
- */
-
#include <glib.h>
#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
- * @section_id: facebook-id
- * @short_description: <filename>id.h</filename>
- * @title: Facebook Identifier
- *
- * The Facebook identifier utilities.
- */
-
#include <glib.h>
#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:json
- * @section_id: facebook-json
- * @short_description: <filename>json.h</filename>
- * @title: JSON Utilities
- *
- * The JSON utilities.
- */
-
#include <glib.h>
#include <json-glib/json-glib.h>
@@ -83,11 +74,6 @@
FB_JSON_TYPE_STR = G_TYPE_STRING
} FbJsonType;
-/**
- * fb_json_values_get_type:
- *
- * Returns: The #GType for an #FbJsonValues.
- */
G_DECLARE_FINAL_TYPE(FbJsonValues, fb_json_values, FB, JSON_VALUES,
GObject)
--- 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',
+ symbol_prefix : 'fb',
+ identifier_prefix : 'Fb',
+ nsversion : '@0@.@1@'.format(purple_major_version,
+ purple_minor_version),
+ dependencies: [gplugin_dep, libpurple_dep],
+ install : false,
+ extra_args : ['-DPURPLE_COMPILATION', '--quiet'])
+ endif
+
endif
--- 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:mqtt
- * @section_id: facebook-mqtt
- * @short_description: <filename>mqtt.h</filename>
- * @title: MQTT Connection
- *
- * The MQTT connection.
- */
-
#include <glib.h>
#include <string.h>
@@ -199,18 +190,8 @@
FB_MQTT_MESSAGE_TYPE_DISCONNECT = 14
} FbMqttMessageType;
-/**
- * fb_mqtt_get_type:
- *
- * 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,
GObject)
--- 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:thrift
- * @section_id: facebook-thrift
- * @short_description: <filename>thrift.h</filename>
- * @title: Thrift Reader/Writer
- *
- * The Thrift reader/writer.
- */
-
#include <glib.h>
#include <glib-object.h>
@@ -76,11 +67,6 @@
FB_THRIFT_TYPE_UNKNOWN
} FbThriftType;
-/**
- * fb_thrift_get_type:
- *
- * 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:util
- * @section_id: facebook-util
- * @short_description: <filename>util.h</filename>
- * @title: General Utilities
- *
- * The general utilities.
- */
-
#include <glib.h>
#include <purple.h>