updates
authorPekka Riikonen <priikone@silcnet.org>
Tue, 12 Feb 2002 13:11:20 +0000 (13:11 +0000)
committerPekka Riikonen <priikone@silcnet.org>
Tue, 12 Feb 2002 13:11:20 +0000 (13:11 +0000)
lib/doc/intro_reference.html
lib/doc/silc_example.h [new file with mode: 0644]

index 391cc1c4aaa900cd483cf46ffb333ce2310bc85b..bb78cd4727a737af26254acaeb3953d988c04fda 100644 (file)
@@ -120,4 +120,12 @@ the header file where the documentation was automatically generated.
 
 <br />&nbsp;<br />
 Note that some of these informations are optional and not all API items
-include all of these informations.
\ No newline at end of file
+include all of these informations.
+
+<br />&nbsp;<br />&nbsp;<br />
+<b>Reference Example</b>
+
+<br />&nbsp;<br />
+Please refer to this link for short example of the API item reference 
+layout: <a href="silc_example.html">SILC Example API</a>.
+
diff --git a/lib/doc/silc_example.h b/lib/doc/silc_example.h
new file mode 100644 (file)
index 0000000..38a1178
--- /dev/null
@@ -0,0 +1,68 @@
+/****h* silcexample/SilcExampleAPI
+ *
+ * DESCRIPTION
+ *
+ * This is example API providing the examples of how API items may appear
+ * in the Toolkit Reference Manual.  This example includes all aspects of
+ * a reference, however, note that all API items that appear in the manual
+ * may not include all of the information that are presented here.
+ *
+ ***/
+
+/****d* silcexample/SilcExampleAPI/SilcExampleType
+ *
+ * NAME
+ *
+ *    typedef enum { ... } SilcExampleTyle;
+ *
+ * DESCRIPTION
+ *
+ *    Example type definition with the actual source code.
+ *
+ * SOURCE
+ */
+/* Source code from the actual header file is appended */
+typedef enum {
+  SILC_EXAMPLE_1,
+  SILC_EXAMPLE_2,
+  SILC_EXAMPLE_3,
+} SilcExampleType;
+/***/
+
+/****s* silcexample/SilcExampleAPI/SilcExampleStruct
+ *
+ * NAME
+ *
+ *    typedef struct { ... } SilcExampleStruct;
+ *
+ * DESCRIPTION
+ *
+ *    Example structure definition.
+ *
+ ***/
+
+/****f* silcexample/SilcExampleAPI/silc_example_function
+ *
+ * SYNOPSIS
+ *
+ *    bool silc_example_function(SilcExampleType type);
+ *
+ * DESCRIPTION
+ *
+ *    Description of the silc_example_function.
+ *
+ * NOTES
+ *
+ *    There may be additional notes that programmers should be aware of
+ *    for this function.
+ *
+ * EXAMPLE
+ *
+ *    if (!silc_example_function(SILC_EXAMPLE_1))
+ *      SILC_LOG_ERROR(("Error occurred during example function"));
+ *
+ * SEE ALSO
+ *
+ *    SilcExampleType, SILC_LOG_ERROR, SilcExampleStruct
+ *
+ ***/