xref: /haiku/src/add-ons/print/transports/lpr/Lpr.cpp (revision 1e60bdeab63fa7a57bc9a55b032052e95a18bd2c)
1 // Sun, 18 Jun 2000
2 // Y.Takagi
3 
4 #include "LprTransport.h"
5 #include "DbgMsg.h"
6 
7 
8 static LprTransport *gTransport = NULL;
9 
10 
11 extern "C" void
12 exit_transport()
13 {
14 	DBGMSG(("> exit_transport\n"));
15 	delete gTransport;
16 	gTransport = NULL;
17 	DBGMSG(("< exit_transport\n"));
18 }
19 
20 
21 extern "C" BDataIO *
22 init_transport(BMessage *msg)
23 {
24 	DBGMSG(("> init_transport\n"));
25 
26 	gTransport = new LprTransport(msg);
27 
28 	if (gTransport->fail()) {
29 		exit_transport();
30 	}
31 
32 	if (msg)
33 		msg->what = 'okok';
34 
35 	DBGMSG(("< init_transport\n"));
36 	return gTransport;
37 }
38