navit  0.5.3-trunk
org.navitproject.navit.NavitTraff Class Reference
Inheritance diagram for org.navitproject.navit.NavitTraff:

Public Member Functions

native void onFeedReceived (long id, String feed)
 
void onReceive (Context context, Intent intent)
 

Package Functions

 NavitTraff (Context context, long cbid)
 

Private Attributes

final long mCbid
 

Static Private Attributes

static final String ACTION_TRAFF_FEED = "org.traffxml.traff.FEED"
 
static final String ACTION_TRAFF_POLL = "org.traffxml.traff.POLL"
 
static final String EXTRA_FEED = "feed"
 

Detailed Description

The TraFF receiver implementation.

This class registers the broadcast receiver for TraFF feeds, polls all registered sources once on creation, receives TraFF feeds and forwards them to the traffic module for processing.

Constructor & Destructor Documentation

◆ NavitTraff()

org.navitproject.navit.NavitTraff.NavitTraff ( Context  context,
long  cbid 
)
inlinepackage

Creates a new

instance.

Creating a new

instance registers a broadcast receiver for TraFF broadcasts and polls all registered sources once to ensure we have messages which were received by these sources before we started up.

Parameters
contextThe context
cbidThe callback identifier for the native method to call upon receiving a feed

Member Function Documentation

◆ onFeedReceived()

native void org.navitproject.navit.NavitTraff.onFeedReceived ( long  id,
String  feed 
)

Forwards a newly received TraFF feed to the traffic module for processing.

This is called when a TraFF feed is received.

Parameters
idThe identifier for the native callback implementation
feedThe TraFF feed

Referenced by org.navitproject.navit.NavitTraff.onReceive().

◆ onReceive()

void org.navitproject.navit.NavitTraff.onReceive ( Context  context,
Intent  intent 
)
inline

Field Documentation

◆ ACTION_TRAFF_FEED

final String org.navitproject.navit.NavitTraff.ACTION_TRAFF_FEED = "org.traffxml.traff.FEED"
staticprivate

◆ ACTION_TRAFF_POLL

final String org.navitproject.navit.NavitTraff.ACTION_TRAFF_POLL = "org.traffxml.traff.POLL"
staticprivate

◆ EXTRA_FEED

final String org.navitproject.navit.NavitTraff.EXTRA_FEED = "feed"
staticprivate

◆ mCbid

final long org.navitproject.navit.NavitTraff.mCbid
private

The documentation for this class was generated from the following file: