FreeStick  0.3
Cross Platform Open Sorce Joystick Lib
FSUSBDevice.h
Go to the documentation of this file.
1 /**************************************************************************
2 Created by Alan Uthoff on 10/13/2013
3 Copyright (C) 2013
4 
5 This Code is free software; you can redistribute it and/or
6 modify it under the terms of the zlib/libpng License as published
7 by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9 This software is provided 'as-is', without any express or implied warranty.
10 
11 In no event will the authors be held liable for any damages arising from the use of this software.
12 
13 Permission is granted to anyone to use this software for any purpose,
14 including commercial applications, and to alter it and redistribute
15 it freely, subject to the following restrictions:
16 
17 1. The origin of this software must not be misrepresented;
18 you must not claim that you wrote the original software.
19 If you use this software in a product, an acknowledgment
20 in the product documentation would be appreciated but is not required.
21 
22 2. Altered source versions must be plainly marked as such,
23 and must not be misrepresented as being the original software.
24 
25 3. This notice may not be removed or altered from any source distribution.
26 **************************************************************************/
27 
28 #pragma once
29 #define DEPRECATED_SUPPORT
30 #ifdef DEPRECATED_SUPPORT
31 //Functions
32 //#define getVenderFriendlyName getVendorFriendlyName
33 //#define getVenderID getVendorID
34 //#define GetFrendlyVenderNameFromID GetFrendlyVendorNameFromID
35 #endif
36 
37 #include "../../baseClasses/FSBaseDevice.h"
38 #include <string>
39 #include <map>
40 namespace freestick
41 {
42 
43  class FSUSBDevice : public FSBaseDevice
44  {
45  private:
46 
47  protected:
48  FSUSBDevice();
50  std::string _vendorIDFriendlyName;
53  public:
55  vendorIDType vendorID,
56  productIDType productID);
57  virtual FSDeviceType getClassType() const {return FSUSBDeviceType;}
58  const std::string getVendorFriendlyName() const { return _vendorIDFriendlyName;}
59  const std::string getProductFrendlyName() const { return _productIDFriendlyName;}
61  productIDType getVendorID() const { return _vendorID;}
62  static std::string getFrendlyVendorNameFromID(vendorIDType vendorID);
63  static std::string getFrendlyProductNameFromID(vendorIDType vendorID, productIDType productID);
64 
65  };
66 }
const std::string getVendorFriendlyName() const
Definition: FSUSBDevice.h:58
productIDType _productID
Definition: FSUSBDevice.h:51
productIDType getVendorID() const
Definition: FSUSBDevice.h:61
static std::string getFrendlyProductNameFromID(vendorIDType vendorID, productIDType productID)
Definition: FSUSBDevice.cpp:49
uint32_t idNumber
Definition: FSTypes.h:33
const std::string getProductFrendlyName() const
Definition: FSUSBDevice.h:59
FSUSBDevice()
Definition: FSUSBDevice.cpp:31
vendorIDType getProductID() const
Definition: FSUSBDevice.h:60
static std::string getFrendlyVendorNameFromID(vendorIDType vendorID)
Definition: FSUSBDevice.cpp:71
Definition: IFSDevice.h:103
uint32_t productIDType
Definition: FSTypes.h:39
Definition: FSBaseDevice.h:32
Definition: FSUSBDevice.h:43
FSDeviceType
Definition: IFSDevice.h:100
virtual FSDeviceType getClassType() const
Definition: FSUSBDevice.h:57
uint32_t vendorIDType
Definition: FSTypes.h:38
vendorIDType _vendorID
Definition: FSUSBDevice.h:49
Definition: FSBaseDevice.h:35
std::string _productIDFriendlyName
Definition: FSUSBDevice.h:52
std::string _vendorIDFriendlyName
Definition: FSUSBDevice.h:50