xref: /haiku/src/add-ons/print/transports/lpr/Lpr.cpp (revision 21258e2674226d6aa732321b6f8494841895af5f)
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