Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

ClassEntry Class Reference

One entry in classes.conf file. More...

#include <ClassesConf.h>

List of all members.

Public Member Functions

 ClassEntry ()
 ~ClassEntry ()
void setSaved ()
void clearSaved ()
bool isSaved ()
 CREATE_SET (Name, char *)
 CREATE_SET (Default, bool)
 CREATE_SET (Info, char *)
 CREATE_SET (Location, char *)
 CREATE_SET (Uri, char *)
 CREATE_SET (State, char *)
 CREATE_SET (StateMessage, char *)
 CREATE_SET (Accepting, bool)
 CREATE_SET (BannerStart, char *)
 CREATE_SET (BannerEnd, char *)
 CREATE_SET (ppd, char *)
void addAllowUsers (const string u)
void addDenyUsers (const string u)
void addPrinters (const string p)
void addOption (const string name, const string value)
void delAllowUsers (const string u)
void delDenyUsers (const string u)
void delOption (const string s)
string getClass () const
const char * getClass_str () const
map< string, string > & getOptions ()
int getPrintersSize ()
void dump () const
YCPValue Read () const
bool changeClass (const YCPValue &value)
bool newClass (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
set< string > Printers
string ppd
map< string, string > options
bool saved


Detailed Description

One entry in classes.conf file.

This contains one entry from the classes.conf file

Author:
Petr Blahos <pblahos@suse.cz>
Version:
Id
ClassesConf.h,v 1.3 2004/01/16 17:55:03 jsrain Exp


Constructor & Destructor Documentation

ClassEntry::ClassEntry  )  [inline]
 

Default constructor.

ClassEntry::~ClassEntry  )  [inline]
 

Destructor.


Member Function Documentation

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

add* functions to add items to set/map

Parameters:
u username.

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

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

Add or change option

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

void ClassEntry::addPrinters const string  p  )  [inline]
 

bool ClassEntry::changeClass const YCPValue value  ) 
 

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

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

void ClassEntry::clearSaved  )  [inline]
 

ClassEntry::CREATE_SET ppd  ,
char * 
 

ClassEntry::CREATE_SET BannerEnd  ,
char * 
 

ClassEntry::CREATE_SET BannerStart  ,
char * 
 

ClassEntry::CREATE_SET Accepting  ,
bool 
 

ClassEntry::CREATE_SET StateMessage  ,
char * 
 

ClassEntry::CREATE_SET State  ,
char * 
 

ClassEntry::CREATE_SET Uri  ,
char * 
 

ClassEntry::CREATE_SET Location  ,
char * 
 

ClassEntry::CREATE_SET Info  ,
char * 
 

ClassEntry::CREATE_SET Default  ,
bool 
 

ClassEntry::CREATE_SET Name  ,
char * 
 

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

delete user from AllowUsers

Parameters:
u username.

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

delete user from DenyUsers

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

delete option

Parameters:
s Option name to delete.

void ClassEntry::dump  )  const
 

Dump values, for debugging purposes.

string ClassEntry::getClass  )  const [inline]
 

Get class name.

Returns:
Class name.

const char* ClassEntry::getClass_str  )  const [inline]
 

Get class name.

Returns:
Class name as string.

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

Get reference to the map of the options.

Returns:
Map of the options.

int ClassEntry::getPrintersSize  )  [inline]
 

bool ClassEntry::isSaved  )  [inline]
 

bool ClassEntry::newClass const YCPValue value  ) 
 

Add new class. Replace

YCPValue ClassEntry::Read  )  const
 

Convert ClassEntry to YCPValue

Returns:
Class settings as described in cups.txt (.cups.classes)

void ClassEntry::setSaved  )  [inline]
 


Member Data Documentation

bool ClassEntry::Accepting [private]
 

set<string> ClassEntry::AllowUsers [private]
 

string ClassEntry::BannerEnd [private]
 

string ClassEntry::BannerStart [private]
 

bool ClassEntry::Default [private]
 

set<string> ClassEntry::DenyUsers [private]
 

string ClassEntry::Info [private]
 

string ClassEntry::Location [private]
 

string ClassEntry::Name [private]
 

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

string ClassEntry::ppd [private]
 

set<string> ClassEntry::Printers [private]
 

bool ClassEntry::saved [private]
 

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

string ClassEntry::State [private]
 

string ClassEntry::StateMessage [private]
 

string ClassEntry::Uri [private]
 


The documentation for this class was generated from the following files:
Generated on Thu Nov 17 21:25:18 2005 for yast2-printer by doxygen 1.3.6