2 /// \file controllerpriv.h
3 /// Private data for the Controller class
7 Copyright (C) 2005-2013, Net Direct Inc. (http://www.netdirect.ca/)
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 2 of the License, or
12 (at your option) any later version.
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 See the GNU General Public License in the COPYING file at the
19 root directory of this project for more details.
22 #ifndef __BARRY_CONTROLLERPRIVATE_H__
23 #define __BARRY_CONTROLLERPRIVATE_H__
29 #include "m_ipmodem.h"
35 class PrivateControllerData
37 friend class Controller
;
39 // DO NOT add your Mode class to this list unless it *needs*
40 // low level access to things like Usb::Device. By adding
41 // your Mode class to this list, you are making it non-portable.
42 friend class Barry::Mode::IpModem
;
48 Usb::Interface
*m_iface
;
51 SocketRoutingQueue
*m_queue
; //< ptr to external object; no delete
54 PrivateControllerData(const ProbeResult
&device
, int default_timeout
)
56 , m_dev(device
.m_dev
, default_timeout
)
59 , m_zero(m_dev
, device
.m_ep
.write
, device
.m_ep
.read
, device
.m_zeroSocketSequence
)
64 PrivateControllerData(const ProbeResult
&device
,
65 SocketRoutingQueue
&queue
, int default_timeout
)
67 , m_dev(device
.m_dev
, default_timeout
)
70 , m_zero(queue
, device
.m_ep
.write
, device
.m_zeroSocketSequence
)
76 ~PrivateControllerData()
78 // detach the router from our device
80 m_queue
->ClearUsbDevice();
84 // cleanup the interface