haiku/headers/private/print/PrintAddOnServer.h
Michael Pfeiffer 9b07d9f0fe * 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
2010-11-08 18:43:55 +00:00

63 lines
1.4 KiB
C++

/*
* Copyright 2010 Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
* Michael Pfeiffer
*/
#ifndef PRINT_ADD_ON_SERVER_H
#define PRINT_ADD_ON_SERVER_H
#include <Directory.h>
#include <Entry.h>
#include <Message.h>
#include <Messenger.h>
#include <Path.h>
#include <String.h>
#include <SupportDefs.h>
class PrintAddOnServer
{
public:
PrintAddOnServer(const char* driver);
virtual ~PrintAddOnServer();
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:
const char* Driver() const;
status_t Launch(BMessenger& messenger);
bool IsLaunched();
void Quit();
void AddDirectory(BMessage& message, const char* name,
BDirectory* directory);
void AddEntryRef(BMessage& message, const char* name,
const entry_ref* entryRef);
status_t SendRequest(BMessage& request, BMessage& reply);
status_t GetResult(BMessage& reply);
status_t GetResultAndUpdateSettings(BMessage& reply,
BMessage* settings);
BString fDriver;
status_t fLaunchStatus;
BMessenger fMessenger;
};
#endif