common.h

Go to the documentation of this file.
00001 ///
00002 /// \file       common.h
00003 ///             General header for the Barry library
00004 ///
00005 
00006 /*
00007     Copyright (C) 2005-2012, Net Direct Inc. (http://www.netdirect.ca/)
00008 
00009     This program is free software; you can redistribute it and/or modify
00010     it under the terms of the GNU General Public License as published by
00011     the Free Software Foundation; either version 2 of the License, or
00012     (at your option) any later version.
00013 
00014     This program is distributed in the hope that it will be useful,
00015     but WITHOUT ANY WARRANTY; without even the implied warranty of
00016     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00017 
00018     See the GNU General Public License in the COPYING file at the
00019     root directory of this project for more details.
00020 */
00021 
00022 #ifndef __BARRY_COMMON_H__
00023 #define __BARRY_COMMON_H__
00024 
00025 #include "dll.h"
00026 #include <iostream>
00027 
00028 #define VENDOR_RIM                      0x0fca
00029 #define PRODUCT_RIM_BLACKBERRY          0x0001
00030 #define PRODUCT_RIM_PEARL_DUAL          0x0004
00031 #define PRODUCT_RIM_PEARL_FLIP          0x8001          // 8200 series
00032 #define PRODUCT_RIM_PEARL_8120          0x8004
00033 #define PRODUCT_RIM_PEARL               0x0006
00034 #define PRODUCT_RIM_STORM               0x8007
00035 #define PRODUCT_RIM_PLAYBOOK_NETWORK    0x8011
00036 #define PRODUCT_RIM_PLAYBOOK_STORAGE    0x8020
00037 
00038 #define BLACKBERRY_INTERFACE            0
00039 #define BLACKBERRY_CONFIGURATION        1
00040 #define BLACKBERRY_MASS_STORAGE_CLASS   8
00041 #define BLACKBERRY_DB_CLASS             0xff
00042 
00043 #define IPRODUCT_RIM_HANDHELD           2
00044 #define IPRODUCT_RIM_MASS_STORAGE       4
00045 #define IPRODUCT_RIM_COMPOSITE          5
00046 
00047 // minimum number of password tries remaining at which Barry gives up
00048 // for safety
00049 #define BARRY_MIN_PASSWORD_TRIES        3
00050 #define BARRY_MIN_PASSWORD_TRIES_ASC    "3"
00051 
00052 #define BLACKBERRY_CHARSET "WINDOWS-1252"
00053 
00054 #define BARRY_FIFO_NAME "/tmp/barry_fifo_args"
00055 
00056 namespace Barry {
00057 
00058 /// See also the LogLock class.
00059 BXEXPORT void Init(bool data_dump_mode = false, std::ostream *logStream = &std::cout);
00060 BXEXPORT void Verbose(bool data_dump_mode = true);
00061 BXEXPORT bool IsVerbose();
00062 
00063 } // namespace Barry
00064 
00065 #endif
00066