* Renamed files, classes and constants from
PrintServerAddOn to PrintAddOnServer. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39358 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -5,8 +5,8 @@
|
|||||||
* Authors:
|
* Authors:
|
||||||
* Michael Pfeiffer
|
* Michael Pfeiffer
|
||||||
*/
|
*/
|
||||||
#ifndef PRINT_SERVER_ADD_ON_H
|
#ifndef PRINT_ADD_ON_SERVER_H
|
||||||
#define PRINT_SERVER_ADD_ON_H
|
#define PRINT_ADD_ON_SERVER_H
|
||||||
|
|
||||||
|
|
||||||
#include <Directory.h>
|
#include <Directory.h>
|
||||||
@@ -18,11 +18,11 @@
|
|||||||
#include <SupportDefs.h>
|
#include <SupportDefs.h>
|
||||||
|
|
||||||
|
|
||||||
class PrintServerAddOn
|
class PrintAddOnServer
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
PrintServerAddOn(const char* driver);
|
PrintAddOnServer(const char* driver);
|
||||||
virtual ~PrintServerAddOn();
|
virtual ~PrintAddOnServer();
|
||||||
|
|
||||||
status_t AddPrinter(const char* spoolFolderName);
|
status_t AddPrinter(const char* spoolFolderName);
|
||||||
status_t ConfigPage(BDirectory* spoolFolder,
|
status_t ConfigPage(BDirectory* spoolFolder,
|
||||||
+9
-9
@@ -5,12 +5,12 @@
|
|||||||
* Authors:
|
* Authors:
|
||||||
* Michael Pfeiffer
|
* Michael Pfeiffer
|
||||||
*/
|
*/
|
||||||
#ifndef PRINT_SERVER_ADD_ON_PROTOCOL_H
|
#ifndef PRINT_ADD_ON_SERVER_PROTOCOL_H
|
||||||
#define PRINT_SERVER_ADD_ON_PROTOCOL_H
|
#define PRINT_ADD_ON_SERVER_PROTOCOL_H
|
||||||
|
|
||||||
extern const char* kPrintServerAddOnApplicationSignature;
|
extern const char* kPrintAddOnServerApplicationSignature;
|
||||||
|
|
||||||
extern const char* kPrintServerAddOnStatusAttribute;
|
extern const char* kPrintAddOnServerStatusAttribute;
|
||||||
extern const char* kPrinterDriverAttribute;
|
extern const char* kPrinterDriverAttribute;
|
||||||
extern const char* kPrinterNameAttribute;
|
extern const char* kPrinterNameAttribute;
|
||||||
extern const char* kPrinterFolderAttribute;
|
extern const char* kPrinterFolderAttribute;
|
||||||
@@ -25,7 +25,7 @@ enum {
|
|||||||
// BString kPrinterDriverAttribute
|
// BString kPrinterDriverAttribute
|
||||||
// BString kPrinterNameAttribute
|
// BString kPrinterNameAttribute
|
||||||
// Reply:
|
// Reply:
|
||||||
// int32 kPrintServerAddOnStatusAttribute
|
// int32 kPrintAddOnServerStatusAttribute
|
||||||
|
|
||||||
kMessageConfigPage = 'PScp',
|
kMessageConfigPage = 'PScp',
|
||||||
// Request:
|
// Request:
|
||||||
@@ -33,7 +33,7 @@ enum {
|
|||||||
// BString kPrinterFolderAttribute
|
// BString kPrinterFolderAttribute
|
||||||
// BMessage kPrintSettingsAttribute
|
// BMessage kPrintSettingsAttribute
|
||||||
// Reply:
|
// Reply:
|
||||||
// int32 kPrintServerAddOnStatusAttribute
|
// int32 kPrintAddOnServerStatusAttribute
|
||||||
// BMessage kPrintSettingsAttribute (if status is B_OK)
|
// BMessage kPrintSettingsAttribute (if status is B_OK)
|
||||||
|
|
||||||
kMessageConfigJob = 'PScj',
|
kMessageConfigJob = 'PScj',
|
||||||
@@ -42,7 +42,7 @@ enum {
|
|||||||
// BString kPrinterFolderAttribute
|
// BString kPrinterFolderAttribute
|
||||||
// BMessage kPrintSettingsAttribute
|
// BMessage kPrintSettingsAttribute
|
||||||
// Reply:
|
// Reply:
|
||||||
// int32 kPrintServerAddOnStatusAttribute
|
// int32 kPrintAddOnServerStatusAttribute
|
||||||
// BMessage kPrintSettingsAttribute (if status is B_OK)
|
// BMessage kPrintSettingsAttribute (if status is B_OK)
|
||||||
|
|
||||||
kMessageDefaultSettings = 'PSds',
|
kMessageDefaultSettings = 'PSds',
|
||||||
@@ -50,7 +50,7 @@ enum {
|
|||||||
// BString kPrinterDriverAttribute
|
// BString kPrinterDriverAttribute
|
||||||
// BString kPrinterFolderAttribute
|
// BString kPrinterFolderAttribute
|
||||||
// Reply:
|
// Reply:
|
||||||
// int32 kPrintServerAddOnStatusAttribute
|
// int32 kPrintAddOnServerStatusAttribute
|
||||||
// BMessage kPrintSettingsAttribute (if status is B_OK)
|
// BMessage kPrintSettingsAttribute (if status is B_OK)
|
||||||
|
|
||||||
kMessageTakeJob = 'PStj',
|
kMessageTakeJob = 'PStj',
|
||||||
@@ -59,7 +59,7 @@ enum {
|
|||||||
// BString kPrintJobFileAttribute
|
// BString kPrintJobFileAttribute
|
||||||
// BString kPrinterFolderAttribute
|
// BString kPrinterFolderAttribute
|
||||||
// Reply:
|
// Reply:
|
||||||
// int32 kPrintServerAddOnStatusAttribute
|
// int32 kPrintAddOnServerStatusAttribute
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@@ -13,6 +13,6 @@ StaticLibrary libprintutils.a :
|
|||||||
PicturePrinter.cpp
|
PicturePrinter.cpp
|
||||||
PrinterDriverAddOn.cpp
|
PrinterDriverAddOn.cpp
|
||||||
PrintTransport.cpp
|
PrintTransport.cpp
|
||||||
PrintServerAddOn.cpp
|
PrintAddOnServer.cpp
|
||||||
PrintServerAddOnProtocol.cpp
|
PrintAddOnServerProtocol.cpp
|
||||||
;
|
;
|
||||||
|
|||||||
@@ -1,17 +1,17 @@
|
|||||||
#include "PrintServerAddOn.h"
|
#include "PrintAddOnServer.h"
|
||||||
|
|
||||||
#include <Entry.h>
|
#include <Entry.h>
|
||||||
#include <Roster.h>
|
#include <Roster.h>
|
||||||
|
|
||||||
#include "PrinterDriverAddOn.h"
|
#include "PrinterDriverAddOn.h"
|
||||||
#include "PrintServerAddOnProtocol.h"
|
#include "PrintAddOnServerProtocol.h"
|
||||||
|
|
||||||
static const bigtime_t kSeconds = 1000000L;
|
static const bigtime_t kSeconds = 1000000L;
|
||||||
static const bigtime_t kDeliveryTimeout = 30 * kSeconds;
|
static const bigtime_t kDeliveryTimeout = 30 * kSeconds;
|
||||||
static const bigtime_t kReplyTimeout = B_INFINITE_TIMEOUT;
|
static const bigtime_t kReplyTimeout = B_INFINITE_TIMEOUT;
|
||||||
|
|
||||||
|
|
||||||
PrintServerAddOn::PrintServerAddOn(const char* driver)
|
PrintAddOnServer::PrintAddOnServer(const char* driver)
|
||||||
:
|
:
|
||||||
fDriver(driver)
|
fDriver(driver)
|
||||||
{
|
{
|
||||||
@@ -19,7 +19,7 @@ PrintServerAddOn::PrintServerAddOn(const char* driver)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
PrintServerAddOn::~PrintServerAddOn()
|
PrintAddOnServer::~PrintAddOnServer()
|
||||||
{
|
{
|
||||||
if (fLaunchStatus == B_OK)
|
if (fLaunchStatus == B_OK)
|
||||||
Quit();
|
Quit();
|
||||||
@@ -27,7 +27,7 @@ PrintServerAddOn::~PrintServerAddOn()
|
|||||||
|
|
||||||
|
|
||||||
status_t
|
status_t
|
||||||
PrintServerAddOn::AddPrinter(const char* spoolFolderName)
|
PrintAddOnServer::AddPrinter(const char* spoolFolderName)
|
||||||
{
|
{
|
||||||
BMessage message(kMessageAddPrinter);
|
BMessage message(kMessageAddPrinter);
|
||||||
message.AddString(kPrinterDriverAttribute, Driver());
|
message.AddString(kPrinterDriverAttribute, Driver());
|
||||||
@@ -43,7 +43,7 @@ PrintServerAddOn::AddPrinter(const char* spoolFolderName)
|
|||||||
|
|
||||||
|
|
||||||
status_t
|
status_t
|
||||||
PrintServerAddOn::ConfigPage(BDirectory* spoolFolder,
|
PrintAddOnServer::ConfigPage(BDirectory* spoolFolder,
|
||||||
BMessage* settings)
|
BMessage* settings)
|
||||||
{
|
{
|
||||||
BMessage message(kMessageConfigPage);
|
BMessage message(kMessageConfigPage);
|
||||||
@@ -61,7 +61,7 @@ PrintServerAddOn::ConfigPage(BDirectory* spoolFolder,
|
|||||||
|
|
||||||
|
|
||||||
status_t
|
status_t
|
||||||
PrintServerAddOn::ConfigJob(BDirectory* spoolFolder,
|
PrintAddOnServer::ConfigJob(BDirectory* spoolFolder,
|
||||||
BMessage* settings)
|
BMessage* settings)
|
||||||
{
|
{
|
||||||
BMessage message(kMessageConfigJob);
|
BMessage message(kMessageConfigJob);
|
||||||
@@ -79,7 +79,7 @@ PrintServerAddOn::ConfigJob(BDirectory* spoolFolder,
|
|||||||
|
|
||||||
|
|
||||||
status_t
|
status_t
|
||||||
PrintServerAddOn::DefaultSettings(BDirectory* spoolFolder,
|
PrintAddOnServer::DefaultSettings(BDirectory* spoolFolder,
|
||||||
BMessage* settings)
|
BMessage* settings)
|
||||||
{
|
{
|
||||||
BMessage message(kMessageDefaultSettings);
|
BMessage message(kMessageDefaultSettings);
|
||||||
@@ -96,7 +96,7 @@ PrintServerAddOn::DefaultSettings(BDirectory* spoolFolder,
|
|||||||
|
|
||||||
|
|
||||||
status_t
|
status_t
|
||||||
PrintServerAddOn::TakeJob(const char* spoolFile,
|
PrintAddOnServer::TakeJob(const char* spoolFile,
|
||||||
BDirectory* spoolFolder)
|
BDirectory* spoolFolder)
|
||||||
{
|
{
|
||||||
BMessage message(kMessageTakeJob);
|
BMessage message(kMessageTakeJob);
|
||||||
@@ -114,44 +114,44 @@ PrintServerAddOn::TakeJob(const char* spoolFile,
|
|||||||
|
|
||||||
|
|
||||||
status_t
|
status_t
|
||||||
PrintServerAddOn::FindPathToDriver(const char* driver, BPath* path)
|
PrintAddOnServer::FindPathToDriver(const char* driver, BPath* path)
|
||||||
{
|
{
|
||||||
return PrinterDriverAddOn::FindPathToDriver(driver, path);
|
return PrinterDriverAddOn::FindPathToDriver(driver, path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const char*
|
const char*
|
||||||
PrintServerAddOn::Driver() const
|
PrintAddOnServer::Driver() const
|
||||||
{
|
{
|
||||||
return fDriver.String();
|
return fDriver.String();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
status_t
|
status_t
|
||||||
PrintServerAddOn::Launch(BMessenger& messenger)
|
PrintAddOnServer::Launch(BMessenger& messenger)
|
||||||
{
|
{
|
||||||
team_id team;
|
team_id team;
|
||||||
status_t result =
|
status_t result =
|
||||||
be_roster->Launch(kPrintServerAddOnApplicationSignature,
|
be_roster->Launch(kPrintAddOnServerApplicationSignature,
|
||||||
(BMessage*)NULL, &team);
|
(BMessage*)NULL, &team);
|
||||||
if (result != B_OK) {
|
if (result != B_OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
fMessenger = BMessenger(kPrintServerAddOnApplicationSignature, team);
|
fMessenger = BMessenger(kPrintAddOnServerApplicationSignature, team);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool
|
bool
|
||||||
PrintServerAddOn::IsLaunched()
|
PrintAddOnServer::IsLaunched()
|
||||||
{
|
{
|
||||||
return fLaunchStatus == B_OK;
|
return fLaunchStatus == B_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
PrintServerAddOn::Quit()
|
PrintAddOnServer::Quit()
|
||||||
{
|
{
|
||||||
if (fLaunchStatus == B_OK) {
|
if (fLaunchStatus == B_OK) {
|
||||||
fMessenger.SendMessage(B_QUIT_REQUESTED);
|
fMessenger.SendMessage(B_QUIT_REQUESTED);
|
||||||
@@ -161,7 +161,7 @@ PrintServerAddOn::Quit()
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
PrintServerAddOn::AddDirectory(BMessage& message, const char* name,
|
PrintAddOnServer::AddDirectory(BMessage& message, const char* name,
|
||||||
BDirectory* directory)
|
BDirectory* directory)
|
||||||
{
|
{
|
||||||
BEntry entry;
|
BEntry entry;
|
||||||
@@ -178,7 +178,7 @@ PrintServerAddOn::AddDirectory(BMessage& message, const char* name,
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
PrintServerAddOn::AddEntryRef(BMessage& message, const char* name,
|
PrintAddOnServer::AddEntryRef(BMessage& message, const char* name,
|
||||||
const entry_ref* entryRef)
|
const entry_ref* entryRef)
|
||||||
{
|
{
|
||||||
BPath path(entryRef);
|
BPath path(entryRef);
|
||||||
@@ -190,7 +190,7 @@ PrintServerAddOn::AddEntryRef(BMessage& message, const char* name,
|
|||||||
|
|
||||||
|
|
||||||
status_t
|
status_t
|
||||||
PrintServerAddOn::SendRequest(BMessage& request, BMessage& reply)
|
PrintAddOnServer::SendRequest(BMessage& request, BMessage& reply)
|
||||||
{
|
{
|
||||||
if (!IsLaunched())
|
if (!IsLaunched())
|
||||||
return fLaunchStatus;
|
return fLaunchStatus;
|
||||||
@@ -201,10 +201,10 @@ PrintServerAddOn::SendRequest(BMessage& request, BMessage& reply)
|
|||||||
|
|
||||||
|
|
||||||
status_t
|
status_t
|
||||||
PrintServerAddOn::GetResult(BMessage& reply)
|
PrintAddOnServer::GetResult(BMessage& reply)
|
||||||
{
|
{
|
||||||
int32 status;
|
int32 status;
|
||||||
status_t result = reply.FindInt32(kPrintServerAddOnStatusAttribute,
|
status_t result = reply.FindInt32(kPrintAddOnServerStatusAttribute,
|
||||||
&status);
|
&status);
|
||||||
if (result != B_OK)
|
if (result != B_OK)
|
||||||
return result;
|
return result;
|
||||||
@@ -213,7 +213,7 @@ PrintServerAddOn::GetResult(BMessage& reply)
|
|||||||
|
|
||||||
|
|
||||||
status_t
|
status_t
|
||||||
PrintServerAddOn::GetResultAndUpdateSettings(BMessage& reply, BMessage* settings)
|
PrintAddOnServer::GetResultAndUpdateSettings(BMessage& reply, BMessage* settings)
|
||||||
{
|
{
|
||||||
BMessage newSettings;
|
BMessage newSettings;
|
||||||
if (reply.FindMessage(kPrintSettingsAttribute, &newSettings) == B_OK)
|
if (reply.FindMessage(kPrintSettingsAttribute, &newSettings) == B_OK)
|
||||||
+3
-3
@@ -1,9 +1,9 @@
|
|||||||
#include "PrintServerAddOnProtocol.h"
|
#include "PrintAddOnServerProtocol.h"
|
||||||
|
|
||||||
const char* kPrintServerAddOnApplicationSignature =
|
const char* kPrintAddOnServerApplicationSignature =
|
||||||
"application/x-vnd.haiku-print-addon-server";
|
"application/x-vnd.haiku-print-addon-server";
|
||||||
|
|
||||||
const char* kPrintServerAddOnStatusAttribute = "status";
|
const char* kPrintAddOnServerStatusAttribute = "status";
|
||||||
const char* kPrinterDriverAttribute = "driver";
|
const char* kPrinterDriverAttribute = "driver";
|
||||||
const char* kPrinterNameAttribute = "name";
|
const char* kPrinterNameAttribute = "name";
|
||||||
const char* kPrinterFolderAttribute = "folder";
|
const char* kPrinterFolderAttribute = "folder";
|
||||||
@@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
#include "BeUtils.h"
|
#include "BeUtils.h"
|
||||||
#include "pr_server.h"
|
#include "pr_server.h"
|
||||||
#include "PrintServerAddOn.h"
|
#include "PrintAddOnServer.h"
|
||||||
#include "PrintServerApp.h"
|
#include "PrintServerApp.h"
|
||||||
|
|
||||||
// posix
|
// posix
|
||||||
@@ -180,7 +180,7 @@ status_t Printer::Remove()
|
|||||||
status_t
|
status_t
|
||||||
Printer::FindPathToDriver(const char* driverName, BPath* path)
|
Printer::FindPathToDriver(const char* driverName, BPath* path)
|
||||||
{
|
{
|
||||||
return PrintServerAddOn::FindPathToDriver(driverName, path);
|
return PrintAddOnServer::FindPathToDriver(driverName, path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -199,7 +199,7 @@ Printer::FindPathToDriver(const char* driverName, BPath* path)
|
|||||||
status_t Printer::ConfigurePrinter(const char* driverName,
|
status_t Printer::ConfigurePrinter(const char* driverName,
|
||||||
const char* printerName)
|
const char* printerName)
|
||||||
{
|
{
|
||||||
PrintServerAddOn addOn(driverName);
|
PrintAddOnServer addOn(driverName);
|
||||||
return addOn.AddPrinter(printerName);
|
return addOn.AddPrinter(printerName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -225,7 +225,7 @@ Printer::ConfigurePage(BMessage& settings)
|
|||||||
if (result != B_OK)
|
if (result != B_OK)
|
||||||
return result;
|
return result;
|
||||||
|
|
||||||
PrintServerAddOn addOn(driver.String());
|
PrintAddOnServer addOn(driver.String());
|
||||||
result = addOn.ConfigPage(SpoolDir(), &settings);
|
result = addOn.ConfigPage(SpoolDir(), &settings);
|
||||||
if (result == B_OK) {
|
if (result == B_OK) {
|
||||||
AddCurrentPrinter(settings);
|
AddCurrentPrinter(settings);
|
||||||
@@ -255,7 +255,7 @@ Printer::ConfigureJob(BMessage& settings)
|
|||||||
if (result != B_OK)
|
if (result != B_OK)
|
||||||
return result;
|
return result;
|
||||||
|
|
||||||
PrintServerAddOn addOn(driver.String());
|
PrintAddOnServer addOn(driver.String());
|
||||||
result = addOn.ConfigJob(SpoolDir(), &settings);
|
result = addOn.ConfigJob(SpoolDir(), &settings);
|
||||||
if (result == B_OK) {
|
if (result == B_OK) {
|
||||||
AddCurrentPrinter(settings);
|
AddCurrentPrinter(settings);
|
||||||
@@ -299,7 +299,7 @@ Printer::GetDefaultSettings(BMessage& settings)
|
|||||||
if (result != B_OK)
|
if (result != B_OK)
|
||||||
return result;
|
return result;
|
||||||
|
|
||||||
PrintServerAddOn addOn(driver.String());
|
PrintAddOnServer addOn(driver.String());
|
||||||
result = addOn.DefaultSettings(SpoolDir(), &settings);
|
result = addOn.DefaultSettings(SpoolDir(), &settings);
|
||||||
if (result == B_OK) {
|
if (result == B_OK) {
|
||||||
AddCurrentPrinter(settings);
|
AddCurrentPrinter(settings);
|
||||||
@@ -485,7 +485,7 @@ Printer::PrintSpooledJob(const char* spoolFile)
|
|||||||
if (result != B_OK)
|
if (result != B_OK)
|
||||||
return result;
|
return result;
|
||||||
|
|
||||||
PrintServerAddOn addOn(driver.String());
|
PrintAddOnServer addOn(driver.String());
|
||||||
return addOn.TakeJob(spoolFile, SpoolDir());
|
return addOn.TakeJob(spoolFile, SpoolDir());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ AddResources print_addon_server :
|
|||||||
;
|
;
|
||||||
|
|
||||||
Application print_addon_server :
|
Application print_addon_server :
|
||||||
PrintServerAddOnApplication.cpp
|
PrintAddOnServerApplication.cpp
|
||||||
;
|
;
|
||||||
|
|
||||||
LinkAgainst print_addon_server :
|
LinkAgainst print_addon_server :
|
||||||
|
|||||||
+19
-19
@@ -5,13 +5,13 @@
|
|||||||
* Authors:
|
* Authors:
|
||||||
* Michael Pfeiffer
|
* Michael Pfeiffer
|
||||||
*/
|
*/
|
||||||
#include "PrintServerAddOnApplication.h"
|
#include "PrintAddOnServerApplication.h"
|
||||||
|
|
||||||
#include <PrinterDriverAddOn.h>
|
#include <PrinterDriverAddOn.h>
|
||||||
|
|
||||||
#include <String.h>
|
#include <String.h>
|
||||||
|
|
||||||
PrintServerAddOnApplication::PrintServerAddOnApplication(const char* signature)
|
PrintAddOnServerApplication::PrintAddOnServerApplication(const char* signature)
|
||||||
:
|
:
|
||||||
BApplication(signature)
|
BApplication(signature)
|
||||||
{
|
{
|
||||||
@@ -20,7 +20,7 @@ PrintServerAddOnApplication::PrintServerAddOnApplication(const char* signature)
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
PrintServerAddOnApplication::MessageReceived(BMessage* message)
|
PrintAddOnServerApplication::MessageReceived(BMessage* message)
|
||||||
{
|
{
|
||||||
switch (message->what) {
|
switch (message->what) {
|
||||||
case kMessageAddPrinter:
|
case kMessageAddPrinter:
|
||||||
@@ -50,7 +50,7 @@ PrintServerAddOnApplication::MessageReceived(BMessage* message)
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
PrintServerAddOnApplication::AddPrinter(BMessage* message)
|
PrintAddOnServerApplication::AddPrinter(BMessage* message)
|
||||||
{
|
{
|
||||||
BString driver;
|
BString driver;
|
||||||
BString name;
|
BString name;
|
||||||
@@ -66,7 +66,7 @@ PrintServerAddOnApplication::AddPrinter(BMessage* message)
|
|||||||
|
|
||||||
|
|
||||||
status_t
|
status_t
|
||||||
PrintServerAddOnApplication::AddPrinter(const char* driver,
|
PrintAddOnServerApplication::AddPrinter(const char* driver,
|
||||||
const char* spoolFolderName)
|
const char* spoolFolderName)
|
||||||
{
|
{
|
||||||
PrinterDriverAddOn addOn(driver);
|
PrinterDriverAddOn addOn(driver);
|
||||||
@@ -75,7 +75,7 @@ PrintServerAddOnApplication::AddPrinter(const char* driver,
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
PrintServerAddOnApplication::ConfigPage(BMessage* message)
|
PrintAddOnServerApplication::ConfigPage(BMessage* message)
|
||||||
{
|
{
|
||||||
BString driver;
|
BString driver;
|
||||||
BString folder;
|
BString folder;
|
||||||
@@ -101,7 +101,7 @@ PrintServerAddOnApplication::ConfigPage(BMessage* message)
|
|||||||
|
|
||||||
|
|
||||||
status_t
|
status_t
|
||||||
PrintServerAddOnApplication::ConfigPage(const char* driver,
|
PrintAddOnServerApplication::ConfigPage(const char* driver,
|
||||||
BDirectory* spoolFolder, BMessage* settings)
|
BDirectory* spoolFolder, BMessage* settings)
|
||||||
{
|
{
|
||||||
PrinterDriverAddOn addOn(driver);
|
PrinterDriverAddOn addOn(driver);
|
||||||
@@ -110,7 +110,7 @@ PrintServerAddOnApplication::ConfigPage(const char* driver,
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
PrintServerAddOnApplication::ConfigJob(BMessage* message)
|
PrintAddOnServerApplication::ConfigJob(BMessage* message)
|
||||||
{
|
{
|
||||||
BString driver;
|
BString driver;
|
||||||
BString folder;
|
BString folder;
|
||||||
@@ -136,7 +136,7 @@ PrintServerAddOnApplication::ConfigJob(BMessage* message)
|
|||||||
|
|
||||||
|
|
||||||
status_t
|
status_t
|
||||||
PrintServerAddOnApplication::ConfigJob(const char* driver,
|
PrintAddOnServerApplication::ConfigJob(const char* driver,
|
||||||
BDirectory* spoolFolder,
|
BDirectory* spoolFolder,
|
||||||
BMessage* settings)
|
BMessage* settings)
|
||||||
{
|
{
|
||||||
@@ -146,7 +146,7 @@ PrintServerAddOnApplication::ConfigJob(const char* driver,
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
PrintServerAddOnApplication::DefaultSettings(BMessage* message)
|
PrintAddOnServerApplication::DefaultSettings(BMessage* message)
|
||||||
{
|
{
|
||||||
BString driver;
|
BString driver;
|
||||||
BString folder;
|
BString folder;
|
||||||
@@ -171,7 +171,7 @@ PrintServerAddOnApplication::DefaultSettings(BMessage* message)
|
|||||||
|
|
||||||
|
|
||||||
status_t
|
status_t
|
||||||
PrintServerAddOnApplication::DefaultSettings(const char* driver,
|
PrintAddOnServerApplication::DefaultSettings(const char* driver,
|
||||||
BDirectory* spoolFolder, BMessage* settings)
|
BDirectory* spoolFolder, BMessage* settings)
|
||||||
{
|
{
|
||||||
PrinterDriverAddOn addOn(driver);
|
PrinterDriverAddOn addOn(driver);
|
||||||
@@ -180,7 +180,7 @@ PrintServerAddOnApplication::DefaultSettings(const char* driver,
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
PrintServerAddOnApplication::TakeJob(BMessage* message)
|
PrintAddOnServerApplication::TakeJob(BMessage* message)
|
||||||
{
|
{
|
||||||
BString driver;
|
BString driver;
|
||||||
BString folder;
|
BString folder;
|
||||||
@@ -200,7 +200,7 @@ PrintServerAddOnApplication::TakeJob(BMessage* message)
|
|||||||
|
|
||||||
|
|
||||||
status_t
|
status_t
|
||||||
PrintServerAddOnApplication::TakeJob(const char* driver, const char* spoolFile,
|
PrintAddOnServerApplication::TakeJob(const char* driver, const char* spoolFile,
|
||||||
BDirectory* spoolFolder)
|
BDirectory* spoolFolder)
|
||||||
{
|
{
|
||||||
PrinterDriverAddOn addOn(driver);
|
PrinterDriverAddOn addOn(driver);
|
||||||
@@ -209,18 +209,18 @@ PrintServerAddOnApplication::TakeJob(const char* driver, const char* spoolFile,
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
PrintServerAddOnApplication::SendReply(BMessage* message, status_t status)
|
PrintAddOnServerApplication::SendReply(BMessage* message, status_t status)
|
||||||
{
|
{
|
||||||
BMessage reply(B_REPLY);
|
BMessage reply(B_REPLY);
|
||||||
reply.AddInt32(kPrintServerAddOnStatusAttribute, status);
|
reply.AddInt32(kPrintAddOnServerStatusAttribute, status);
|
||||||
message->SendReply(&reply);
|
message->SendReply(&reply);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
PrintServerAddOnApplication::SendReply(BMessage* message, BMessage* reply)
|
PrintAddOnServerApplication::SendReply(BMessage* message, BMessage* reply)
|
||||||
{
|
{
|
||||||
reply->AddInt32(kPrintServerAddOnStatusAttribute, B_OK);
|
reply->AddInt32(kPrintAddOnServerStatusAttribute, B_OK);
|
||||||
message->SendReply(reply);
|
message->SendReply(reply);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -228,7 +228,7 @@ PrintServerAddOnApplication::SendReply(BMessage* message, BMessage* reply)
|
|||||||
int
|
int
|
||||||
main(int argc, char* argv[])
|
main(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
PrintServerAddOnApplication application(
|
PrintAddOnServerApplication application(
|
||||||
kPrintServerAddOnApplicationSignature);
|
kPrintAddOnServerApplicationSignature);
|
||||||
application.Run();
|
application.Run();
|
||||||
}
|
}
|
||||||
+5
-5
@@ -5,8 +5,8 @@
|
|||||||
* Authors:
|
* Authors:
|
||||||
* Michael Pfeiffer
|
* Michael Pfeiffer
|
||||||
*/
|
*/
|
||||||
#ifndef PRINT_SERVER_ADD_ON_H
|
#ifndef PRINT_ADD_ON_SERVER_H
|
||||||
#define PRINT_SERVER_ADD_ON_H
|
#define PRINT_ADD_ON_SERVER_H
|
||||||
|
|
||||||
#include <Application.h>
|
#include <Application.h>
|
||||||
#include <Directory.h>
|
#include <Directory.h>
|
||||||
@@ -14,13 +14,13 @@
|
|||||||
#include <Message.h>
|
#include <Message.h>
|
||||||
#include <SupportDefs.h>
|
#include <SupportDefs.h>
|
||||||
|
|
||||||
#include <PrintServerAddOnProtocol.h>
|
#include <PrintAddOnServerProtocol.h>
|
||||||
|
|
||||||
|
|
||||||
class PrintServerAddOnApplication : public BApplication
|
class PrintAddOnServerApplication : public BApplication
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
PrintServerAddOnApplication(const char* signature);
|
PrintAddOnServerApplication(const char* signature);
|
||||||
void MessageReceived(BMessage* message);
|
void MessageReceived(BMessage* message);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Reference in New Issue
Block a user