haiku/headers/private/print/PrinterDriverAddOn.h
Michael Pfeiffer 61729fe266 * Added application print_server_add_on that is used
by the print_server to run a printer driver add-on.
  This makes the print_server
  1) resistant to add-on crashes
  2) and memory leaks in add-ons
  3) license of an add-on cannot influence the
     license of the print_server since it does not
     directly load the add-on anymore; might be
     an issue with GPL printer drivers like Gutenprint
 
  Transport add-ons directly loaded by the print_server
  should be moved outside the print_server too.
  Right now I am not aware that the transport add-ons
  in the repository have any of the issues.
  The Gutenprint driver has 2 + 3 that was the main
  motivation to implement that now. 

  Disabled for now until the launch issue is resolved.
  BRoster does not find the application by its
  signature until it is opened in Tracker once.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39346 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-07 17:13:55 +00:00

48 lines
1.0 KiB
C++

/*
* 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);
status_t TakeJob(const char* spoolFile,
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