Using libprintutils.a init|exit_tranport symbols were not part of the add-on.
For now copied PrintTransportAddOn.cpp from kits/print into each tranport add-on folder and use that instead. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32489 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -3,11 +3,11 @@ SubDir HAIKU_TOP src add-ons print transports parallel_port ;
|
|||||||
SetSubDirSupportedPlatformsBeOSCompatible ;
|
SetSubDirSupportedPlatformsBeOSCompatible ;
|
||||||
|
|
||||||
UsePrivateHeaders print ;
|
UsePrivateHeaders print ;
|
||||||
SubDirHdrs [ FDirName $(HAIKU_TOP) src add-ons print transports shared ] ;
|
|
||||||
|
|
||||||
Addon Parallel\ Port :
|
Addon Parallel\ Port :
|
||||||
ParallelTransport.cpp
|
ParallelTransport.cpp
|
||||||
: be libprintutils.a $(TARGET_LIBSUPC++)
|
PrintTransportAddOn.cpp
|
||||||
|
: be $(TARGET_LIBSUPC++)
|
||||||
;
|
;
|
||||||
|
|
||||||
Package haiku-printingkit-cvs :
|
Package haiku-printingkit-cvs :
|
||||||
|
|||||||
@@ -0,0 +1,32 @@
|
|||||||
|
#include "PrintTransportAddOn.h"
|
||||||
|
|
||||||
|
// We don't support multiple instances of the same transport add-on
|
||||||
|
static BDataIO* gTransport = NULL;
|
||||||
|
|
||||||
|
extern "C" _EXPORT BDataIO *init_transport(BMessage *msg)
|
||||||
|
{
|
||||||
|
if (msg == NULL || gTransport != NULL)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
const char *spool_path = msg->FindString("printer_file");
|
||||||
|
|
||||||
|
if (spool_path && *spool_path != '\0') {
|
||||||
|
BDirectory printer(spool_path);
|
||||||
|
|
||||||
|
if (printer.InitCheck() == B_OK) {
|
||||||
|
gTransport = instantiate_transport(&printer, msg);
|
||||||
|
return gTransport;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
extern "C" _EXPORT void exit_transport()
|
||||||
|
{
|
||||||
|
if (gTransport) {
|
||||||
|
delete gTransport;
|
||||||
|
gTransport = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -3,11 +3,11 @@ SubDir HAIKU_TOP src add-ons print transports serial_port ;
|
|||||||
SetSubDirSupportedPlatformsBeOSCompatible ;
|
SetSubDirSupportedPlatformsBeOSCompatible ;
|
||||||
|
|
||||||
UsePrivateHeaders print ;
|
UsePrivateHeaders print ;
|
||||||
SubDirHdrs [ FDirName $(HAIKU_TOP) src add-ons print transports shared ] ;
|
|
||||||
|
|
||||||
Addon Serial\ Port :
|
Addon Serial\ Port :
|
||||||
SerialTransport.cpp
|
SerialTransport.cpp
|
||||||
: be libprintutils.a $(TARGET_LIBSUPC++)
|
PrintTransportAddOn.cpp
|
||||||
|
: be $(TARGET_LIBSUPC++)
|
||||||
;
|
;
|
||||||
|
|
||||||
Package haiku-printingkit-cvs :
|
Package haiku-printingkit-cvs :
|
||||||
|
|||||||
@@ -0,0 +1,32 @@
|
|||||||
|
#include "PrintTransportAddOn.h"
|
||||||
|
|
||||||
|
// We don't support multiple instances of the same transport add-on
|
||||||
|
static BDataIO* gTransport = NULL;
|
||||||
|
|
||||||
|
extern "C" _EXPORT BDataIO *init_transport(BMessage *msg)
|
||||||
|
{
|
||||||
|
if (msg == NULL || gTransport != NULL)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
const char *spool_path = msg->FindString("printer_file");
|
||||||
|
|
||||||
|
if (spool_path && *spool_path != '\0') {
|
||||||
|
BDirectory printer(spool_path);
|
||||||
|
|
||||||
|
if (printer.InitCheck() == B_OK) {
|
||||||
|
gTransport = instantiate_transport(&printer, msg);
|
||||||
|
return gTransport;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
extern "C" _EXPORT void exit_transport()
|
||||||
|
{
|
||||||
|
if (gTransport) {
|
||||||
|
delete gTransport;
|
||||||
|
gTransport = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -3,11 +3,11 @@ SubDir HAIKU_TOP src add-ons print transports usb_port ;
|
|||||||
SetSubDirSupportedPlatformsBeOSCompatible ;
|
SetSubDirSupportedPlatformsBeOSCompatible ;
|
||||||
|
|
||||||
UsePrivateHeaders print ;
|
UsePrivateHeaders print ;
|
||||||
SubDirHdrs [ FDirName $(HAIKU_TOP) src add-ons print transports shared ] ;
|
|
||||||
|
|
||||||
Addon USB\ Port :
|
Addon USB\ Port :
|
||||||
USBTransport.cpp
|
USBTransport.cpp
|
||||||
: be libprintutils.a $(TARGET_LIBSUPC++)
|
PrintTransportAddOn.cpp
|
||||||
|
: be $(TARGET_LIBSUPC++)
|
||||||
;
|
;
|
||||||
|
|
||||||
Package haiku-printingkit-cvs :
|
Package haiku-printingkit-cvs :
|
||||||
|
|||||||
@@ -0,0 +1,32 @@
|
|||||||
|
#include "PrintTransportAddOn.h"
|
||||||
|
|
||||||
|
// We don't support multiple instances of the same transport add-on
|
||||||
|
static BDataIO* gTransport = NULL;
|
||||||
|
|
||||||
|
extern "C" _EXPORT BDataIO *init_transport(BMessage *msg)
|
||||||
|
{
|
||||||
|
if (msg == NULL || gTransport != NULL)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
const char *spool_path = msg->FindString("printer_file");
|
||||||
|
|
||||||
|
if (spool_path && *spool_path != '\0') {
|
||||||
|
BDirectory printer(spool_path);
|
||||||
|
|
||||||
|
if (printer.InitCheck() == B_OK) {
|
||||||
|
gTransport = instantiate_transport(&printer, msg);
|
||||||
|
return gTransport;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
extern "C" _EXPORT void exit_transport()
|
||||||
|
{
|
||||||
|
if (gTransport) {
|
||||||
|
delete gTransport;
|
||||||
|
gTransport = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Reference in New Issue
Block a user