PrinterEntry Class Reference

One entry in printers.conf file. More...

#include <PrintersConf.h>

List of all members.

Public Member Functions

 PrinterEntry ()
 ~PrinterEntry ()
void setSaved ()
void clearSaved ()
bool isSaved ()
 CREATE_SET (Name, string)
 CREATE_SET (Default, bool)
 CREATE_SET (Info, string)
 CREATE_SET (Location, string)
 CREATE_SET (Uri, string)
 CREATE_SET (State, string)
 CREATE_SET (StateMessage, string)
 CREATE_SET (Accepting, bool)
 CREATE_SET (BannerStart, string)
 CREATE_SET (BannerEnd, string)
 CREATE_SET (ppd, string)
void addAllowUsers (const string u)
void addDenyUsers (const string u)
void addOption (const string name, const string value)
void delAllowUsers (const string u)
void delDenyUsers (const string u)
void delOption (const string s)
string getPrinter () const
const char * getPrinter_str () const
map< string, string > & getOptions ()
void dump () const
YCPValue Read () const
bool changePrinter (const YCPValue &value)
bool newPrinter (const YCPValue &value)

Private Attributes

string Name
bool Default
string Info
string Location
string Uri
string State
string StateMessage
bool Accepting
string BannerStart
string BannerEnd
set< string > AllowUsers
set< string > DenyUsers
string ppd
map< string, string > options
bool saved


Detailed Description

One entry in printers.conf file.

This contains one entry from the printers.conf file

Author:
Petr Blahos <pblahos@suse.cz>
Version:
Id
PrintersConf.h 19894 2004-10-19 15:58:12Z jsrain


Constructor & Destructor Documentation

PrinterEntry::PrinterEntry  )  [inline]
 

Default constructor.

PrinterEntry::~PrinterEntry  )  [inline]
 

Destructor.


Member Function Documentation

void PrinterEntry::addAllowUsers const string  u  )  [inline]
 

add* functions to add items to set/map

Parameters:
u username.

void PrinterEntry::addDenyUsers const string  u  )  [inline]
 

void PrinterEntry::addOption const string  name,
const string  value
[inline]
 

Add or change option

Parameters:
name Name of the option.
value Value of the option.

bool PrinterEntry::changePrinter const YCPValue value  ) 
 

Helper function for Write. Update printer definition in cups system. Updates printer entry (this). Saves only changed items.

Parameters:
value New value of PrinterEntry.
Returns:
Success state.

void PrinterEntry::clearSaved  )  [inline]
 

PrinterEntry::CREATE_SET ppd  ,
string 
 

PrinterEntry::CREATE_SET BannerEnd  ,
string 
 

PrinterEntry::CREATE_SET BannerStart  ,
string 
 

PrinterEntry::CREATE_SET Accepting  ,
bool 
 

PrinterEntry::CREATE_SET StateMessage  ,
string 
 

PrinterEntry::CREATE_SET State  ,
string 
 

PrinterEntry::CREATE_SET Uri  ,
string 
 

PrinterEntry::CREATE_SET Location  ,
string 
 

PrinterEntry::CREATE_SET Info  ,
string 
 

PrinterEntry::CREATE_SET Default  ,
bool 
 

PrinterEntry::CREATE_SET Name  ,
string 
 

void PrinterEntry::delAllowUsers const string  u  )  [inline]
 

delete user from AllowUsers

Parameters:
u username.

void PrinterEntry::delDenyUsers const string  u  )  [inline]
 

delete user from DenyUsers

void PrinterEntry::delOption const string  s  )  [inline]
 

delete option

Parameters:
s Option name to delete.

void PrinterEntry::dump  )  const
 

Dump values, for debugging purposes.

map<string,string>& PrinterEntry::getOptions  )  [inline]
 

Get reference to the map of the options.

Returns:
Map of the options.

string PrinterEntry::getPrinter  )  const [inline]
 

Get printer name.

Returns:
Printer name.

const char* PrinterEntry::getPrinter_str  )  const [inline]
 

Get printer name.

Returns:
Printer name as string.

bool PrinterEntry::isSaved  )  [inline]
 

bool PrinterEntry::newPrinter const YCPValue value  ) 
 

Add new printer. Replace

YCPValue PrinterEntry::Read  )  const
 

Convert PrinterEntry to YCPValue

Returns:
Printer settings as described in cups.txt (.cups.printers)

void PrinterEntry::setSaved  )  [inline]
 


Member Data Documentation

bool PrinterEntry::Accepting [private]
 

set<string> PrinterEntry::AllowUsers [private]
 

string PrinterEntry::BannerEnd [private]
 

string PrinterEntry::BannerStart [private]
 

bool PrinterEntry::Default [private]
 

set<string> PrinterEntry::DenyUsers [private]
 

string PrinterEntry::Info [private]
 

string PrinterEntry::Location [private]
 

string PrinterEntry::Name [private]
 

map<string,string> PrinterEntry::options [private]
 

string PrinterEntry::ppd [private]
 

bool PrinterEntry::saved [private]
 

This value indicates if printer was saved in PrintersConf::Write. PrintersConf::Write clears saved for all printers. PrintersConf::Write sets saved for each printers it saves. Printers that do not have saved bit set were not saved and must be deleted.

string PrinterEntry::State [private]
 

string PrinterEntry::StateMessage [private]
 

string PrinterEntry::Uri [private]
 


The documentation for this class was generated from the following files:
Generated on Thu Jul 6 00:28:52 2006 for yast2-printer by  doxygen 1.4.6