2010-11-06 13:17:13 +03:00
|
|
|
/*
|
|
|
|
* Copyright 2001-2010, Haiku, Inc. All rights reserved.
|
|
|
|
* Distributed under the terms of the MIT License.
|
|
|
|
*
|
|
|
|
* Authors:
|
|
|
|
* Ithamar R. Adema
|
|
|
|
* Michael Pfeiffer
|
|
|
|
*/
|
|
|
|
#ifndef PRINTER_DRIVER_ADD_ON_H
|
|
|
|
#define PRINTER_DRIVER_ADD_ON_H
|
|
|
|
|
|
|
|
|
|
|
|
#include <Directory.h>
|
|
|
|
#include <image.h>
|
|
|
|
#include <Message.h>
|
|
|
|
#include <Path.h>
|
|
|
|
#include <SupportDefs.h>
|
|
|
|
|
|
|
|
|
|
|
|
class PrinterDriverAddOn
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
PrinterDriverAddOn(const char* driver);
|
|
|
|
~PrinterDriverAddOn();
|
|
|
|
|
|
|
|
status_t AddPrinter(const char* spoolFolderName);
|
|
|
|
status_t ConfigPage(BDirectory* spoolFolder,
|
|
|
|
BMessage* settings);
|
|
|
|
status_t ConfigJob(BDirectory* spoolFolder,
|
|
|
|
BMessage* settings);
|
|
|
|
status_t DefaultSettings(BDirectory* spoolFolder,
|
|
|
|
BMessage* settings);
|
2010-11-07 20:13:55 +03:00
|
|
|
status_t TakeJob(const char* spoolFile,
|
2010-11-06 13:17:13 +03:00
|
|
|
BDirectory* spoolFolder);
|
|
|
|
|
|
|
|
static status_t FindPathToDriver(const char* driver, BPath* path);
|
|
|
|
|
|
|
|
private:
|
|
|
|
bool IsLoaded() const;
|
|
|
|
status_t CopyValidSettings(BMessage* settings,
|
|
|
|
BMessage* newSettings);
|
|
|
|
|
|
|
|
image_id fAddOnID;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|