2 /// \file m_javaloader.h
3 /// Mode class for the JavaLoader mode
7 Copyright (C) 2005-2009, Net Direct Inc. (http://www.netdirect.ca/)
8 Copyright (C) 2008-2009, Nicolas VIVIEN
10 Some parts are inspired from m_desktop.h
12 This program is free software; you can redistribute it and/or modify
13 it under the terms of the GNU General Public License as published by
14 the Free Software Foundation; either version 2 of the License, or
15 (at your option) any later version.
17 This program is distributed in the hope that it will be useful,
18 but WITHOUT ANY WARRANTY; without even the implied warranty of
19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
21 See the GNU General Public License in the COPYING file at the
22 root directory of this project for more details.
25 #ifndef __BARRY_M_JAVALOADER_H__
26 #define __BARRY_M_JAVALOADER_H__
34 // forward declarations
44 /// The main interface class to the device databases.
46 /// To use this class, use the following steps:
48 /// - Create a Controller object (see Controller class for more details)
49 /// - Create this Mode::JavaLoader object, passing in the Controller
50 /// object during construction
51 /// - Call Open() to open database socket and finish constructing.
52 /// - Call LoadDatabase() to retrieve and store a database
54 class BXEXPORT JavaLoader
57 enum CommandType
{ Unknown
, DatabaseAccess
};
62 SocketHandle m_socket
;
64 CommandTable m_commandTable
;
66 uint16_t m_ModeSocket
; // socket recommended by device
67 // when mode was selected
72 JavaLoader(Controller
&con
);
75 //////////////////////////////////
76 // primary operations - required before anything else
78 void Open(const char *password
= 0);
79 void RetryPassword(const char *password
);
81 //////////////////////////////////
84 void SendStream(char *buffer
, int size
);
85 void StopStream(void);
88 }} // namespace Barry::Mode