Barry Namespace Reference

Project namespace, containing all related functions and classes. More...


Classes

class  Builder
 Base class for the builder functor hierarchy. More...
class  RecordBuilder
 Template class for easy creation of specific protocol packet builder objects. More...
class  RecordFetch
 Generic record fetch class, to help with using records without builder classes. More...
class  CodFileBuilder
 The CodFileBuilder class is used to assemble multiple .cod files into a single packed .cod file using the pkzip file format. More...
class  Controller
 The main interface class. More...
class  Data
class  Diff
class  DataQueue
 This class provides a thread aware fifo queue for Data objects, providing memory management for all Data object pointers it contains. More...
class  Error
 The base class for any future derived exceptions. More...
class  BadPassword
 A bad or unknown password when talking to the device. More...
class  BadData
 Thrown by record classes if their data is invalid and cannot be uploaded to the Blackberry. More...
class  BadSize
 Unexpected packet size, or not enough data. More...
class  ErrnoError
 System error that provides an errno error code. More...
class  BadPackedFormat
 Thrown by record classes that don't recognize a given packed format code. More...
class  BadPacket
 Thrown by the socket class if a packet command's response indicates an error. More...
class  IConvHandle
 Wrapper class for a two-way iconv_t handle pair. More...
class  IConverter
 Main charset conversion class, primarily focused on converting between the Blackberry charset and an application-specified one. More...
class  ContactLdif
 Class for generating LDIF output based on a Barry::Contact record object. More...
class  LogLock
 RAII locking class used to protect the logStream passed into Barry::Init() (common.h). More...
class  JLDirectory
class  JLDirectoryEntry
class  JLScreenInfo
class  JLEventlog
class  JLEventlogEntry
class  JLDeviceInfo
class  Modem
class  Packet
class  ZeroPacket
 Provides an API for building and analyzing socket-0 protocol packets. More...
class  DBPacket
 Provides an API for building and analyzing raw DB protocol packets. More...
class  JLPacket
 Provides an API for building and analyzing raw Javaloader protocol packets. More...
class  Parser
 Base class for the parser hierarchy. More...
class  NullParser
 If in debug mode, this class can be used as a null parser. More...
class  RecordParser
 Template class for easy creation of specific parser objects. More...
class  PppFilter
struct  ProbeResult
class  Probe
class  Calendar
class  CallLog
struct  ContactGroupLink
class  Contact
 Represents a single record in the Address Book Blackberry database. More...
class  Folder
class  Memo
class  Message
class  MessageBase
class  PINMessage
class  RecurBase
class  SavedMessage
class  ServiceBookData
class  ServiceBookConfig
class  ServiceBook
class  Sms
class  Task
class  Timezone
struct  FieldLink
struct  CommandTableCommand
class  CommandTable
struct  RecordStateTableState
class  RecordStateTable
struct  DatabaseItem
class  DatabaseDatabase
struct  UnknownData
struct  UnknownField
struct  EmailAddress
struct  PostalAddress
struct  Date
class  CategoryList
class  SocketRoutingQueue
class  DataHandle
 std::auto_ptr like class that handles pointers to Data, but instead of freeing them completely, the Data objects are turned to the SocketRoutingQueue from whence they came. More...
class  scoped_lock
struct  SHA_CTX
class  SocketZero
class  Socket
 Encapsulates a "logical socket" in the Blackberry USB protocol. More...
struct  TimeZone

Functions

BXEXPORT size_t GetTotalBitmapSize (const JLScreenInfo &info)
 Returns the total number of bytes needed to convert a screenshot of the given dimensions into a bitmap, using the ScreenshotToBitmap() function.
BXEXPORT void ScreenshotToBitmap (const JLScreenInfo &info, const Data &screenshot, Data &bitmap)
 Converts screenshot data obtained via JavaLoader::GetScreenshot() into uncompressed bitmap format, suitable for writing BMP files.
size_t SeekNextCod (std::istream &input)
 Seeks the input stream to the next packed sibling .cod file and returns the packed .cod file size.
void Init (bool data_dump_mode, std::ostream *logStream)
 Barry library initializer.
const TimeZone * GetTimeZoneTable ()
 Returns a pointer to an array of TimeZone structs.
const TimeZone * GetTimeZone (unsigned short Code)
 Searches the internal timezone code table for the given Code and returns a pointer to a TimeZone struct found.
unsigned short GetTimeZoneCode (signed short HourOffset, signed short MinOffset)
 Searches the internal timezone table for the first matching Code.
time_t DayToDate (unsigned short Day)
 This routine takes the day of the year and returns a time_t adjusted from the first of the year.
time_t Message2Time (uint16_t r_date, uint16_t r_time)
 Localize the funky math used to convert a Blackberry message timestamp into a time_t.
BXEXPORT struct timespec * ThreadTimeout (int timeout_ms, struct timespec *spec)
 Creates a pthread_cond_timedwait() compatible timespec struct, based on a given timeout in milliseconds.
const char * Version (int &major, int &minor)
 Fills major and minor with integer version numbers, and returns a string containing human readable version information in English.


Detailed Description

Project namespace, containing all related functions and classes.

This is the only namespace applications should be concerned with, for now.


Function Documentation

BXEXPORT time_t Barry::DayToDate ( unsigned short  Day  ) 

This routine takes the day of the year and returns a time_t adjusted from the first of the year.

FIXME This function assumes the year hasn't changed, but I don't have enough information to determine where the year is in this header info

Definition at line 186 of file time.cc.

Referenced by Message2Time().

Here is the caller graph for this function:

BXEXPORT const TimeZone * Barry::GetTimeZone ( unsigned short  Code  ) 

Searches the internal timezone code table for the given Code and returns a pointer to a TimeZone struct found.

If the code is not found, a pointer to a valid TimeZone struct is is still returned, but the struct's Code contains TIME_ZONE_CODE_ERR, and the name is "Unknown time zone." The unknown timezone is the same offset as GMT.

Definition at line 149 of file time.cc.

BXEXPORT unsigned short Barry::GetTimeZoneCode ( signed short  HourOffset,
signed short  MinOffset 
)

Searches the internal timezone table for the first matching Code.

If no matching Code is found, TIME_ZONE_CODE_ERR is returned.

This function does not adjust for daylight saving time.

Definition at line 168 of file time.cc.

BXEXPORT const TimeZone * Barry::GetTimeZoneTable (  ) 

Returns a pointer to an array of TimeZone structs.

The last struct contains 0 in all fields, and can be used as an "end of array" marker.

Definition at line 134 of file time.cc.

BXEXPORT size_t Barry::GetTotalBitmapSize ( const JLScreenInfo &  info  ) 

Returns the total number of bytes needed to convert a screenshot of the given dimensions into a bitmap, using the ScreenshotToBitmap() function.

Definition at line 37 of file bmp.cc.

Referenced by ScreenshotToBitmap().

Here is the caller graph for this function:

BXEXPORT void Barry::Init ( bool  data_dump_mode,
std::ostream *  logStream 
)

Barry library initializer.

See also the LogLock class.

Call this before anything else. This takes care of initializing the lower level libusb.

Parameters:
[in] data_dump_mode If set to true, the protocol conversation will be sent to stdout via the C++ std::cout stream.
[in] LogStream Pointer to std::ostream object to use for debug output and logging. Defaults to std::cout.

Definition at line 48 of file common.cc.

BXEXPORT time_t Barry::Message2Time ( uint16_t  r_date,
uint16_t  r_time 
)

Localize the funky math used to convert a Blackberry message timestamp into a time_t.

Both r_date and r_time are expected to be fed in from the Protocol::MessageRecord struct in raw form, without endian conversion. This function handles that.

Definition at line 217 of file time.cc.

References DayToDate().

Here is the call graph for this function:

BXEXPORT void Barry::ScreenshotToBitmap ( const JLScreenInfo &  info,
const Data &  screenshot,
Data &  bitmap 
)

Converts screenshot data obtained via JavaLoader::GetScreenshot() into uncompressed bitmap format, suitable for writing BMP files.

Arguments info and screenshot come from GetScreenshot() and the converted data is stored in bitmap.

Definition at line 57 of file bmp.cc.

References GetTotalBitmapSize().

Here is the call graph for this function:

size_t Barry::SeekNextCod ( std::istream &  input  ) 

Seeks the input stream to the next packed sibling .cod file and returns the packed .cod file size.

When all siblings have been read, zero is returned.

When input stream does not contain the signature for a packed .cod file, it's assumed the entire stream is the .cod file.

Parameters:
input stream to read from
Returns:
size of next packed .cod file, or 0 finished reading .cod files

Definition at line 44 of file cod.cc.

BXEXPORT struct timespec * Barry::ThreadTimeout ( int  timeout_ms,
struct timespec *  spec 
) [read]

Creates a pthread_cond_timedwait() compatible timespec struct, based on a given timeout in milliseconds.

Note that the resulting timespec is time-sensitive: the 'timer' starts as soon as this function returns, since timespec is a specific time in the future, and ThreadTimeout() calculates it based on the current time.

Returns the spec pointer, to make it easy to use with pthread_cond_timedwait()

Definition at line 242 of file time.cc.

Referenced by Barry::DataQueue::wait_pop().

Here is the caller graph for this function:

BXEXPORT const char * Barry::Version ( int &  major,
int &  minor 
)

Fills major and minor with integer version numbers, and returns a string containing human readable version information in English.

Definition at line 39 of file version.cc.


Generated on Tue Jun 30 16:08:51 2009 for Barry by  doxygen 1.5.8