Skip to content

Commit

Permalink
Updated doc
Browse files Browse the repository at this point in the history
  • Loading branch information
FedeDP committed Mar 10, 2018
1 parent 67397e1 commit f1488fd
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 30 deletions.
5 changes: 3 additions & 2 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@ Welcome to libmodule's documentation!
:maxdepth: 2
:caption: Contents:

src/concepts
src/data_structures
src/module_callbacks
src/callbacks
src/module
src/modules
src/module_context
src/context

Indices and tables
==================
Expand Down
2 changes: 1 addition & 1 deletion docs/src/module_callbacks.rst → docs/src/callbacks.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Module callbacks
================

Every module needs 5 callbacks that must defined by developer. |br|
Every module needs 5 callbacks that be must defined by developer. |br|
They are automatically declared by MODULE macro:

.. code::
Expand Down
31 changes: 31 additions & 0 deletions docs/src/concepts.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
.. |br| raw:: html

<br />

Libmodule Concepts
==================

Module concept
--------------

A module is key entity of libmodule: it is a single and indipendent logical unit that reacts to certain events by polling on a fd. |br|
It offers some callbacks that are used by libmodule to manage its life. |br|
It is initialized through MODULE macro:

.. code::
MODULE(test)
This macro creates a "test" module. |br|
MODULE macro also creates a constructor and destructor that are automatically called by libmodule at start and at end of program. |br|
Finally, this macro declares all of needed callbacks and returns an opaque handler for the module, that will be transparently passed with each call to libmodule API while using easy AP:ref:`module_easy`. |br|

Submodule concept
-----------------

PLACEHOLDER

Context concept
---------------

PLACEHOLDER
10 changes: 10 additions & 0 deletions docs/src/context.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.. |br| raw:: html

<br />

Libmodule Context-aware API
===========================

PLACEHOLDER


4 changes: 2 additions & 2 deletions docs/src/data_structures.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ Libmodule Data Structures
/* Message received in poll callback */
typedef struct {
int fd;
const char *message; // field unused for now
const char *sender; // field unused for now
const char *message; // field unused for now
const char *sender; // field unused for now
} message_t;
/* Callbacks typedefs */
Expand Down
15 changes: 0 additions & 15 deletions docs/src/module.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,6 @@
Module
======

Module concept
--------------

A module is key entity of libmodule: it is a single and indipendent logical unit that reacts to certain events by polling on a fd. |br|
It offers some callbacks that are used by libmodule to manage its life. |br|
It is initialized through MODULE macro:

.. code::
MODULE(test)
This macro creates a "test" module. |br|
MODULE macro also creates a constructor and destructor that are automatically called by libmodule at start and at end of program. |br|
Finally, this macro also declares all of needed callbacks and returns an opaque handler for the module, that will be transparently passed with each call to libmodule API while using easy API.

.. _module_easy:

Module easy API
Expand Down
10 changes: 0 additions & 10 deletions docs/src/module_context.rst

This file was deleted.

0 comments on commit f1488fd

Please sign in to comment.