NeoMutt  2018-07-16 +2481-68dcde
Teaching an old dog new tricks
DOXYGEN
observer.h File Reference

Observer of notifications. More...

#include <stdbool.h>
#include <stdint.h>
#include "notify_type.h"
#include "queue.h"
+ Include dependency graph for observer.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  NotifyCallback
 Data passed to a notification function. More...
 
struct  Observer
 An observer of notifications. More...
 
struct  ObserverNode
 List of Observers. More...
 

Macros

#define OBSERVE_NO_FLAGS   0
 No flags are set. More...
 
#define OBSERVE_RECURSIVE   (1 << 0)
 Listen for events of children. More...
 

Typedefs

typedef int(* observer_t) (struct NotifyCallback *nc)
 typedef observer_t - Prototype for a notification callback function More...
 
typedef uint8_t ObserverFlags
 Flags, e.g. OBSERVE_RECURSIVE. More...
 

Functions

 STAILQ_HEAD (ObserverList, ObserverNode)
 

Detailed Description

Observer of notifications.

Authors
  • Richard Russon

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Definition in file observer.h.

Macro Definition Documentation

◆ OBSERVE_NO_FLAGS

#define OBSERVE_NO_FLAGS   0

No flags are set.

Definition at line 60 of file observer.h.

◆ OBSERVE_RECURSIVE

#define OBSERVE_RECURSIVE   (1 << 0)

Listen for events of children.

Definition at line 61 of file observer.h.

Typedef Documentation

◆ observer_t

typedef int(* observer_t) (struct NotifyCallback *nc)

typedef observer_t - Prototype for a notification callback function

Parameters
[in]flagsFlags, see MuttFormatFlags
Return values
0Success
-1Error

Definition at line 57 of file observer.h.

◆ ObserverFlags

typedef uint8_t ObserverFlags

Flags, e.g. OBSERVE_RECURSIVE.

Definition at line 59 of file observer.h.

Function Documentation

◆ STAILQ_HEAD()

STAILQ_HEAD ( ObserverList  ,
ObserverNode   
)