Public Member Functions | Protected Attributes

wosh::bundles::WindowsMobileBundle Class Reference
[WOSH Bundles]

Communicator Service designed to run on Windows CE/Mobile 6.x, wrapper to TAPI layers: providides (SMS) messaging, line monitoring. More...

#include <H:/WOSH/win32_vc2010/src/bundles/WindowsMobile/WindowsMobileBundle.h>

List of all members.

Public Member Functions

 WindowsMobileBundle ()
 Default constructor.
virtual ~WindowsMobileBundle ()
 Deconstructor. If bundle is running, it will be stopped.
void busMessage (const Message &message, const Bus *source)
 Method raised by the Bus when it processes a new message. Implementations will probably analyze the message and perform actions.
Communicator Interface
bool isUserReachable (const std::string &wosh_username) const
bool isUserRegistered (const std::string &username) const
int64 getUserLastSeen (const std::string &) const
WRESULT sendMessageToUser (const std::string &wosh_username, const std::string &message)
WRESULT sendMessageTo (const std::string &user_phonenumber, const std::string &message)
WRESULT notify (const Notification *notification, const Message *notification_message=NULL)
WindowsMobile Events
void phone_CallState (WindowsMobileImpl *modem, VoiceCall *info)
void phone_SmsMessage (WindowsMobileImpl *modem, const struct sms_info &info)

Protected Member Functions

Internal methods
WRESULT declareCommunicator ()
WRESULT declareUser (bool online, const std::string &username)
WRESULT updateInfos ()
std::string getPhoneNumberFromUsername (const std::string &wosh_username) const
std::string getUsernameFromPhoneNumber (const std::string &phone_number) const
void fixPhoneNumber (std::string &phone) const

Protected Attributes

BusConnector BusDevices
 connector to Devices bus
BusConnector BusSecurity
 connector to Security bus (posting only)
WindowsMobileImplwinWorker
 real implementation

Detailed Description

Communicator Service designed to run on Windows CE/Mobile 6.x, wrapper to TAPI layers: providides (SMS) messaging, line monitoring.

This bundle is meant to run ON a Windows Mobile 6 device. http://nah6.com/~itsme/cvs-xdadevtools/itsutils/leds/

Requirements:

Installation on UNIX Steps:

RNDIS driver

Verify USB link: plug device and type 'lsusb' to ensure device has been found. Goto http://www.synce.org and follow instructions (reported here too)

Bundle has beed tested using usb-rndis-lite-0.11.tar.gz (provided in /extras) Make sure you have linux-headers installed (same release as current image). Unplug device.

  $ tar zxf usb-rndis-lite-0.11.tar.gz
  $ cd usb-rndis-lite-0.11/
  $ make
  $ sudo ./clean.sh
  $ sudo make install
  $ cd ..

Make sure module has been installed and loaded executing 'lsmod | grep rndis' Plug device, type dmesg (it should show you success/failure log)

Type 'ifconfig -a' to list ALL interfaces, default name is rndis0 but it may be different, check the HWaddress to recognize it and activace DHCP client:

  $ dhclient3 rndis0

Check again with ifconfig now it should be listed without '-a' and with a valid IP (usually 169.254.2.2). Confirm connection pinging device: ping 169.254.2.2

----------------------------------------------------------------------------------

in /etc/network/interfaces add:

  iface rndis0 inet dhcp
  auto rndis0
Version:
Id:
WindowsMobileBundle.h 3775 2011-01-01 16:38:17Z alex
Author:
Alessandro Polo

Definition at line 115 of file WindowsMobileBundle.h.


Constructor & Destructor Documentation

wosh::bundles::WindowsMobileBundle::WindowsMobileBundle (  )

Default constructor.

Definition at line 65 of file WindowsMobileBundle.cpp.

References wosh::LOG_DEBUG, and wosh::LOG_VERBOSE.

wosh::bundles::WindowsMobileBundle::~WindowsMobileBundle (  ) [virtual]

Deconstructor. If bundle is running, it will be stopped.

Definition at line 130 of file WindowsMobileBundle.cpp.

References wosh::LOG_INFO, wosh::LOG_VERBOSE, and wosh::LOG_WARNING.


Member Function Documentation

void wosh::bundles::WindowsMobileBundle::busMessage ( const Message message,
const Bus source 
) [virtual]

Method raised by the Bus when it processes a new message. Implementations will probably analyze the message and perform actions.

Parameters:
[in]messagethe incoming message
[in]sourcethe source Bus of the incoming message
Warning:
The current thread is own and managed by the caller Bus. Heavy, dangerous or time expensive operations should be executed asynchronously and not inline!

Reimplemented from wosh::BundleGeneric.

Definition at line 229 of file WindowsMobileBundle.cpp.

References wosh::MessageContent::asNotification(), BusCore, wosh::Message::getContent(), wosh::Message::getDestination(), wosh::Message::isEmpty(), wosh::MessageContent::isNotification(), wosh::BusConnector::postMessage(), wosh::Message::replyTo(), and WRET_OK.

bool wosh::bundles::WindowsMobileBundle::isUserReachable ( const std::string &  wosh_username ) const

Bug:
should at least validate number

Definition at line 410 of file WindowsMobileBundle.cpp.

void wosh::bundles::WindowsMobileBundle::phone_SmsMessage ( WindowsMobileImpl modem,
const struct sms_info &  info 
) [virtual]

Member Data Documentation

connector to Devices bus

Definition at line 192 of file WindowsMobileBundle.h.

connector to Security bus (posting only)

Definition at line 193 of file WindowsMobileBundle.h.

real implementation

Definition at line 194 of file WindowsMobileBundle.h.


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

Generated on Tue Feb 8 2011 09:33:37 for WOSH system 0.8.888 [wolf] by Alessandro Polo, using DoxyGen 1.7.2 hosted by WOSH Framework