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 (Shared, 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 Shared
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 34512 2006-11-21 08:32:44Z mzugec


Constructor & Destructor Documentation

PrinterEntry::PrinterEntry (  )  [inline]

Default constructor.

PrinterEntry::~PrinterEntry (  )  [inline]

Destructor.


Member Function Documentation

void PrinterEntry::setSaved (  )  [inline]

void PrinterEntry::clearSaved (  )  [inline]

bool PrinterEntry::isSaved (  )  [inline]

PrinterEntry::CREATE_SET ( Name  ,
string   
)

PrinterEntry::CREATE_SET ( Default  ,
bool   
)

PrinterEntry::CREATE_SET ( Shared  ,
bool   
)

PrinterEntry::CREATE_SET ( Info  ,
string   
)

PrinterEntry::CREATE_SET ( Location  ,
string   
)

PrinterEntry::CREATE_SET ( Uri  ,
string   
)

PrinterEntry::CREATE_SET ( State  ,
string   
)

PrinterEntry::CREATE_SET ( StateMessage  ,
string   
)

PrinterEntry::CREATE_SET ( Accepting  ,
bool   
)

PrinterEntry::CREATE_SET ( BannerStart  ,
string   
)

PrinterEntry::CREATE_SET ( BannerEnd  ,
string   
)

PrinterEntry::CREATE_SET ( ppd  ,
string   
)

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.

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.

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.

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

Get reference to the map of the options.

Returns:
Map of the options.

void PrinterEntry::dump (  )  const

Dump values, for debugging purposes.

YCPValue PrinterEntry::Read (  )  const

Convert PrinterEntry to YCPValue

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

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.

bool PrinterEntry::newPrinter ( const YCPValue value  ) 

Add new printer. Replace


Member Data Documentation

string PrinterEntry::Name [private]

bool PrinterEntry::Default [private]

string PrinterEntry::Info [private]

string PrinterEntry::Location [private]

string PrinterEntry::Uri [private]

string PrinterEntry::State [private]

string PrinterEntry::StateMessage [private]

bool PrinterEntry::Shared [private]

bool PrinterEntry::Accepting [private]

string PrinterEntry::BannerStart [private]

string PrinterEntry::BannerEnd [private]

set<string> PrinterEntry::AllowUsers [private]

set<string> PrinterEntry::DenyUsers [private]

string PrinterEntry::ppd [private]

map<string,string> PrinterEntry::options [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.


The documentation for this class was generated from the following files:
Generated on Tue Nov 28 18:12:01 2006 for yast2-printer by  doxygen 1.5.0