navit  0.5.3-trunk
traffic_null.c File Reference

A null traffic plugin. More...

#include <string.h>
#include <time.h>
#include "glib_slice.h"
#include "config.h"
#include "coord.h"
#include "item.h"
#include "xmlconfig.h"
#include "traffic.h"
#include "plugin.h"
#include "debug.h"

Data Structures

struct  traffic_priv
 Stores information about the plugin instance. More...
 

Functions

struct traffic_message ** traffic_null_get_messages (struct traffic_priv *this_)
 Returns an empty traffic report. More...
 
static struct traffic_privtraffic_null_new (struct navit *nav, struct traffic_methods *meth, struct attr **attrs, struct callback_list *cbl)
 Registers a new null traffic plugin. More...
 
void plugin_init (void)
 Initializes the traffic plugin. More...
 

Variables

static struct traffic_methods traffic_null_meth
 The methods implemented by this plugin. More...
 

Detailed Description

A null traffic plugin.

Navit, a modular navigation system. Copyright (C) 2005-2017 Navit Team

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation.

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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

This plugin was mainly designed to test the traffic framework. It acts like a traffic plugin but will never report any messages. This allows us to have the full traffic functionality without having an actual source for traffic messages; useful for injecting messages via DBus.

Function Documentation

◆ plugin_init()

void plugin_init ( void  )

Initializes the traffic plugin.

The plugin entry point.

This function is called once on startup.

References dbg, lvl_debug, and traffic_null_new().

◆ traffic_null_get_messages()

struct traffic_message ** traffic_null_get_messages ( struct traffic_priv this_)

Returns an empty traffic report.

Returns
Always NULL

◆ traffic_null_new()

static struct traffic_priv* traffic_null_new ( struct navit nav,
struct traffic_methods meth,
struct attr **  attrs,
struct callback_list cbl 
)
static

Registers a new null traffic plugin.

Parameters
navThe navit instance
methReceives the traffic methods
attrsThe attributes for the map
cbl
Returns
A pointer to a traffic_priv structure for the plugin instance

References dbg, lvl_debug, and traffic_null_meth.

Referenced by plugin_init().

Variable Documentation

◆ traffic_null_meth

struct traffic_methods traffic_null_meth
static
Initial value:
= {
NULL,
}
struct traffic_message ** traffic_null_get_messages(struct traffic_priv *this_)
Returns an empty traffic report.
Definition: traffic_null.c:59

The methods implemented by this plugin.

Referenced by traffic_null_new().