Serial Framework C++ Edition
Classes | Typedefs | Enumerations | Functions | Variables
wclCommon Namespace Reference

Classes

class  CwclBluetoothCategoryMessage
 The Bluetooth Category Message base class. More...
 
class  CwclConnectionCategoryMessage
 The Connection Category Message base class. More...
 
class  CwclCustomMemoryStream
 The base class for memory streams. More...
 
class  CwclFileStream
 The class represents a file stream. More...
 
class  CwclHandleStream
 The base class for handle based streams. More...
 
class  CwclHardwareChangeMessage
 The Hardware Changed message is broadcasted to all subscribers when changes in the hardware configuration have been detected. The message ID is wclCommon::WCL_MSG_ID_SYS_HARDWARE_CHANGED. More...
 
class  CwclIrDACategoryMessage
 The IrDA Category Message base class. More...
 
class  CwclKinectCategoryMessage
 The Kinect Category Message base class. More...
 
class  CwclMemoryStream
 The memory stream. More...
 
class  CwclMessage
 The message object. More...
 
class  CwclMessageBroadcaster
 The message broadcaster manages broadcast messages between subscribers (message receivers subscribed for broadcast messages). Also the message broadcaster monitors changes in the hardware configuration and notifies subscribers about the changes. More...
 
class  CwclMessageReceiver
 The message receiver object. More...
 
class  CwclOsVersion
 The class provides information about OS version. More...
 
class  CwclPowerEventsMonitor
 The class allows an application to receive power state changes notifications. More...
 
class  CwclPowerStateChangeMessage
 The Power State Changed message is broadcasted to all subscribers when changes in the power state have been detected. The message ID is WCL_MSG_ID_SYS_POWER_STATE_CHANGED. More...
 
class  CwclSerialCategoryMessage
 The Serial Category Message base class. More...
 
class  CwclStream
 The base class for WCL streams. More...
 
class  CwclStreamAdapter
 The class implements the IStream interface on a CwclStream object. More...
 
class  CwclSystemCategoryMessage
 The system categoiry message base class. More...
 
class  CwclThread
 The class allows to use WCL components in threads, console and service applications. More...
 
class  CwclThreadSignalMessage
 The WCL Thread Signal message. More...
 
class  CwclThreadSynchronizeMessage
 The WCL Thread Synchronize message. More...
 
class  CwclUsbCategoryMessage
 The USB Category Message base class. More...
 
class  CwclUserDefinedCategoryMessage
 The base class for user-defined messages. More...
 
class  CwclWiFiCategoryMessage
 The WiFi Category Message base class. More...
 
class  CwclWiiCategoryMessage
 The Wii Remote Category Message base class. More...
 
class  wclECritical
 Critical exception. More...
 
class  wclEFileOpenFailed
 Failed to open file. More...
 
class  wclEInvalidArgument
 One or more arguments passed into constructor are invalid. More...
 
class  wclEOutOfMemory
 Not enough system memory. More...
 
class  wclException
 The base WCL exceptions class. More...
 

Typedefs

typedef std::wstring tstring
 Defines the string type as UNICODE string. More...
 

Enumerations

enum  wclMessageSynchronizationKind { skMessages, skThread, skApc }
 Message synchronization methods used to inter-threading synchronization and notification. More...
 
enum  wclWinVer {
  verUnknown = 1, verWinXP = 2, verWinVista = 3, verWin7 = 4,
  verWin8 = 5, verWin81 = 6, verWin10 = 7, verWin11 = 8
}
 Windows versions. More...
 
enum  wclSeekOrigin { soBeginning, soCurrent, soEnd }
 Stream origins. More...
 
enum  wclStreamOwnership { soReference, soOwned }
 Teh enumeration indicates whether a stream object should be freed by the object that uses it. More...
 
enum  wclPowerState { psResumeAutomatic, psResume, psSuspend, psUnknown }
 The enumeration defines the system power states. More...
 

Functions

HANDLE wclCreateMutex (const TCHAR *Name, const bool Unique, const bool Own=false)
 Creates a new mutex with given name. More...
 
bool wclGetErrorInfo (const int Error, tstring &Framework, tstring &Category, tstring &Constant, tstring &Description)
 Reads the error information. More...
 
bool wclGetErrorInfo (const tstring &FileName, const int Error, tstring &Framework, tstring &Category, tstring &Constant, tstring &Description)
 Reads the error information. More...
 
tstring wclUTF8Decode (const PCHAR lpszUTF8)
 Converts UTF8 string to WCL string. More...
 
void wclUTF8Encode (const tstring &str, const PCHAR lpszUTF8, const DWORD dwUTF8Len)
 Converts WCL (UNICODE) string to UTF8 encoded string. More...
 
std::string wclUnicodeToAnsi (const std::wstring &s)
 Converts UNICODE string to ANSI string. More...
 
std::wstring wclAnsiToUnicode (const std::string &s)
 Converts ANSI string to UNICODE string. More...
 

Variables

const int WCL_E_SUCCESS = 0x00000000
 Operation completed with success. More...
 
const int WCL_E_BASE = 0x00010000
 The base error code for the WCL system/common errors. More...
 
const int WCL_E_INVALID_ARGUMENT = WCL_E_BASE + 0x0000
 One or more arguments passed into the method or function are invalid. More...
 
const int WCL_E_OUT_OF_MEMORY = WCL_E_BASE + 0x0001
 Out of system memory. More...
 
const int WCL_E_MR_BASE = WCL_E_BASE + 0x1000
 The base error code for the message receiver. More...
 
const int WCL_E_MR_CLOSED = WCL_E_MR_BASE + 0x0000
 A message receiver has already been closed or not opened. More...
 
const int WCL_E_MR_OPENED = WCL_E_MR_BASE + 0x0001
 A message receiver has already been opened. More...
 
const int WCL_E_MR_NOT_OPENED = WCL_E_MR_BASE + 0x0002
 A message receiver was not opened yet. More...
 
const int WCL_E_MR_UNABLE_SYNCHRONIZE = WCL_E_MR_BASE + 0x0003
 A message receiver can not synchronize threads and notify a "main" thread about new received message. More...
 
const int WCL_E_MR_UNABLE_REGISTER_SYNC_OBJ = WCL_E_MR_BASE + 0x0004
 A message receiver can not register for threads synchronization. More...
 
const int WCL_E_MR_UNABLE_CREATE_SYNC_OBJ = WCL_E_MR_BASE + 0x0005
 A message receiver can not create a thread synchronization object. More...
 
const int WCL_E_MR_SYNC_OBJ_NOT_CREATED = WCL_E_MR_BASE + 0x0006
 A thread synchronization object has not been created. More...
 
const int WCL_E_MB_BASE = WCL_E_BASE + 0x2000
 The base error code for the message broadcaster. More...
 
const int WCL_E_MB_RECEIVER_ALREADY_SUBSCRIBED = WCL_E_MB_BASE + 0x0000
 A message receiver has already been subscribed. More...
 
const int WCL_E_MB_RECEIVER_NOT_SUBSCRIBED = WCL_E_MB_BASE + 0x0001
 A message receiver has not been subscribed. More...
 
const int WCL_E_MB_CAN_NOT_INIT_HW_THREAD = WCL_E_MB_BASE + 0x0002
 The message broadcaster can not initialize the hardware monitoring thread. More...
 
const int WCL_E_MB_CAN_NOT_START_HW_THREAD = WCL_E_MB_BASE + 0x0003
 The message broadcaster can not start the hardware monitoring thread. More...
 
const int WCL_E_MB_UNABLE_CREATE_HW_OBJ = WCL_E_MB_BASE + 0x0004
 The message broadcaster can not create the hardware monitoring object. More...
 
const int WCL_E_MB_UNABLE_REGISTER_HW_NOTIFY = WCL_E_MB_BASE + 0x0005
 The message broadcaster can not register for hardware changes notifications. More...
 
const int WCL_E_MB_UNABLE_CREATE_MUTEX = WCL_E_MB_BASE + 0x0006
 The message broadcaster can not create a mutex synchronization object. More...
 
const int WCL_E_MB_NOT_CREATED = WCL_E_MB_BASE + 0x0007
 The message broadcaster was not created. More...
 
const int WCL_E_MB_REF_COUNT_ERROR = WCL_E_MB_BASE + 0x0008
 There is the error with the references counter. More...
 
const int WCL_E_MB_RUNNING = WCL_E_MB_BASE + 0x0009
 The messaging subsystem is already running. More...
 
const int WCL_E_MB_INVALID_SYNC_METHOD = WCL_E_MB_BASE + 0x000A
 Invalid or unknown synchronization method. More...
 
const int WCL_E_MB_WAIT_TIMEOUT = WCL_E_MB_BASE + 0x000B
 A timeout appeared during wait operation. More...
 
const int WCL_E_MB_WAIT_FAILED = WCL_E_MB_BASE + 0x000C
 Wait operation failed. More...
 
const int WCL_E_WINRT_BASE = WCL_E_BASE + 0x3000
 The base WinRT subsystem error code. More...
 
const int WCL_E_WINRT_UNABLE_CREATE_MUTEX = WCL_E_WINRT_BASE + 0x0000
 Unable to create synchronization mutex for WinRT control. More...
 
const int WCL_E_WINRT_UNABLE_LOAD_CORE_DLL = WCL_E_WINRT_BASE + 0x0001
 unable to load WinRT core DLL. More...
 
const int WCL_E_WINRT_UNABLE_LOAD_STRING_DLL = WCL_E_WINRT_BASE + 0x0002
 unable to load WinRT string DLL. More...
 
const int WCL_E_WINRT_INIT_FAILED = WCL_E_WINRT_BASE + 0x0003
 WinRT initialization failed. More...
 
const int WCL_E_WINRT_UNABLE_CREATE_STRING = WCL_E_WINRT_BASE + 0x0004
 Unable to create string. More...
 
const int WCL_E_WINRT_UNABLE_ACTIVATE_INSTANCE = WCL_E_WINRT_BASE + 0x0005
 Unable to active instance of the required class. More...
 
const int WCL_E_WINRT_UNABLE_CREATE_INTERFACE = WCL_E_WINRT_BASE + 0x0006
 Unable to create interface of the required class. More...
 
const int WCL_E_WINRT_ASYNC_OPERATION_FAILED = WCL_E_WINRT_BASE + 0x0007
 Failed to read asynchronous operation status. More...
 
const int WCL_E_WINRT_ASYNC_OPERATION_CANCELLED = WCL_E_WINRT_BASE + 0x0008
 An asynchronous operation cancelled. More...
 
const int WCL_E_WINRT_ASYNC_OPERATION_ERROR = WCL_E_WINRT_BASE + 0x0009
 An asynchronous operation completed with error. More...
 
const int WCL_E_WINRT_DETACH_BUFFER_FAILED = WCL_E_WINRT_BASE + 0x000A
 Unable to detach raw buffer. More...
 
const int WCL_E_WINUSB_BASE = WCL_E_BASE + 0x4000
 The base error code for all WinUSB subsystem errors. More...
 
const int WCL_E_WINUSB_UNABLE_CREATE_MUTEX = WCL_E_WINUSB_BASE + 0x0000
 Unable create WinSUB subsystem synchronization mutex. More...
 
const int WCL_E_WINUSB_UNABLE_LOAD = WCL_E_WINUSB_BASE + 0x0001
 WinUSB subsystem is not available on your system. More...
 
const int WCL_E_WINUSB_NOT_LOADED = WCL_E_WINUSB_BASE + 0x0002
 WinUSB subsystem was not loaded. More...
 
const int WCL_E_WINUSB_UNEXPECTED = WCL_E_WINUSB_BASE + 0x0003
 Unknown or unexpected WinUSB error. More...
 
const int WCL_E_THREAD_BASE = WCL_E_BASE + 0x5000
 The base error code for all WCL thread errors. More...
 
const int WCL_E_THREAD_RUNNING = WCL_E_THREAD_BASE + 0x0000
 The thread is already running. More...
 
const int WCL_E_THREAD_UNABLE_CREATE_THREAD_INIT_EVENT = WCL_E_THREAD_BASE + 0x0001
 Unable to create thread initialization event. More...
 
const int WCL_E_THREAD_UNABLE_CREATE_THREAD = WCL_E_THREAD_BASE + 0x0002
 Unable to create thread. More...
 
const int WCL_E_THREAD_NOT_RUNNING = WCL_E_THREAD_BASE + 0x0003
 The thread is not running. More...
 
const int WCL_E_THREAD_INVALID_SYNCHRONIZATION = WCL_E_THREAD_BASE + 0x0004
 The synchronization method is not supported by the wclThread class. More...
 
const int WCL_E_THREAD_MESSAGE_REGISTRATION_FAILED = WCL_E_THREAD_BASE + 0x0005
 Unable to register thread message. More...
 
const int WCL_E_THREAD_WINDOW_CREATION_FAILED = WCL_E_THREAD_BASE + 0x0006
 Unable to create thread window. More...
 
const int WCL_E_THREAD_INITIALIZATION_FAILED = WCL_E_THREAD_BASE + 0x0007
 Thread user initialization failed. More...
 
const int WCL_E_THREAD_UNABLE_CREATE_THREAD_TERM_EVENT = WCL_E_THREAD_BASE + 0x0008
 Unable to create thread termination event. More...
 
const int WCL_E_THREAD_UNABLE_CREATE_THREAD_SYNC_EVENT = WCL_E_THREAD_BASE + 0x0009
 Unable to create thread synchronization event. More...
 
const int WCL_E_PEM_BASE = WCL_E_BASE + 0x000
 The base error code for Power Events monitor error codes. More...
 
const int WCL_E_PEM_OPENED = WCL_E_PEM_BASE + 0x0000
 The power events monitor is already opened. More...
 
const int WCL_E_PEM_CLOSED = WCL_E_PEM_BASE + 0x0001
 The power events monitor is already closed. More...
 
const int WCL_E_PEM_FEATURE_NOT_SUPPORTED = WCL_E_PEM_BASE + 0x0002
 The power state monitoring feature is supported on Windows 8 and above. More...
 
const unsigned char WCL_MSG_CATEGORY_SYSTEM = 1
 System messages category. More...
 
const unsigned char WCL_MSG_CATEGORY_WIFI = 2
 WiFi Framework messages category. More...
 
const unsigned char WCL_MSG_CATEGORY_BLUETOOTH = 3
 Bluetooth Framework messages category. More...
 
const unsigned char WCL_MSG_CATEGORY_IRDA = 4
 IrDA Framework messages category. More...
 
const unsigned char WCL_MSG_CATEGORY_SERIAL = 5
 Serial Framework messages category. More...
 
const unsigned char WCL_MSG_CATEGORY_USB = 6
 USB Framework messages category. More...
 
const unsigned char WCL_MSG_CATEGORY_WII = 7
 Wii remote Framework messages category. More...
 
const unsigned char WCL_MSG_CATEGORY_KINECT = 8
 Kinect Framework messages category. More...
 
const unsigned char WCL_MSG_CATEGORY_CONNECTION = 9
 The connections and connection providers messages category. More...
 
const unsigned char WCL_MSG_CATEGORY_USER = 200
 User defined message categories should start from this Category ID. More...
 
const unsigned char WCL_MSG_ID_SYS_HARDWARE_CHANGED = 1
 The Hardware Change message ID. More...
 
const unsigned char WCL_MSG_ID_SYS_POWER_STATE_CHANGED = 2
 The Power State Changed message ID. More...
 
const unsigned char WCL_MSG_ID_SYS_THREAD_SIGNAL = 3
 The WCL Thread Signal message ID. More...
 
const unsigned char WCL_MSG_ID_SYS_THREAD_SYNCHRONIZE = 4
 The WCL Thread Synchronize message ID. More...
 
CwclOsVersion wclOsVersion
 Global instance of the OS version reader class. More...