Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
.gif)
.gif)
10/16/2008
An MSN Direct application developer must add custom classes for parsing up-to-date data about weather, emergency alerts, gas, group messages, local events, movies, stocks, traffic, or user locations. By default, classes for these service types are not included in the MSN Direct class library. You are expected to write custom message classes that provide custom methods to be called by your user-interface component to retrieve and display the up-to-date information to your users.
The sample application includes class definitions for each additional incoming message type. To make your implementation process easier, you can start with the header files from the sample application, which includes these class definitions, and modify them to meet your specific requirements.
To add custom classes by using the code in the sample application
In Platform Builder, on the View menu, choose File View.
In FileView, expand Projects, expand MSNDirect, right-click Include files, and then choose Add files.
Browse to %_WINCEROOT%\PUBLIC\SERVERS\SDK\SAMPLES\MSNDIRECT\INC.
Add the header files for the message classes that correspond to the additional MSN Direct service types that your application supports (See Robust Programming, later in this topic).
Link your application to DBRCore.lib.
(Optional) Implement custom functionality in the source code for the message classes that you want to modify.
Warning
The functions in the sample message classes handle data that arrives in a specific format in the payload of an incoming message. If you modify the way in which data is extracted from incoming messages, the message classes will not work as expected.
Robust Programming
The following chart lists and describes each header file in the sample application for classes that represent incoming messages. You can add these header files to your custom MSN Direct application.
| Description | Header file |
|---|---|
Message class for core emergency alerts |
CapEmergencyAlertsCoreMsg.h |
Message class for supplementary emergency alerts |
CapEmergencyAlertsSupplMsg.h |
Message class for gas prices |
GasPricesMsg.h |
Message class for gas stations |
GasStationsMsg.h |
Group message |
GroupMessageMsg.h |
Message class for local events |
LocalEventsMsg.h |
Message class for movie properties |
MoviePropertiesMsg.h |
Message class for movie theaters |
MovieTheaters.h |
Message class for movie times |
MovieTimesMsg.h |
Message class for news items |
NewsItemsMsg.h |
Message class for the user-specified stock symbols |
StockChosenMsg.h |
Message class for stock quotes |
StockQuotesMsg.h |
Message class for stock symbols |
StockSymbolsMsg.h |
Message class for traffic flow |
TrafficFlowMsg.h |
Message class for traffic incidents |
TrafficIncidentsMsg.h |
Received Locations message |
UserLocationsMsg.h |
Message class for nonlocal weather |
NonLocalWeatherMsg.h |
Message class for weather alerts or warnings |
WeatherAlertsMsg.h |
Message class for detailed weather information |
WeatherMsg.h |
See Also
Concepts
How to Integrate MSN Direct into a Device
MSN Direct Sample Application