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 19894 2004-10-19 15:58:12Z jsrain


Constructor & Destructor Documentation

ClassEntry::ClassEntry (  )  [inline]

Default constructor.

ClassEntry::~ClassEntry (  )  [inline]

Destructor.


Member Function Documentation

void ClassEntry::setSaved (  )  [inline]

void ClassEntry::clearSaved (  )  [inline]

bool ClassEntry::isSaved (  )  [inline]

ClassEntry::CREATE_SET ( Name  ,
char *   
)

ClassEntry::CREATE_SET ( Default  ,
bool   
)

ClassEntry::CREATE_SET ( Info  ,
char *   
)

ClassEntry::CREATE_SET ( Location  ,
char *   
)

ClassEntry::CREATE_SET ( Uri  ,
char *   
)

ClassEntry::CREATE_SET ( State  ,
char *   
)

ClassEntry::CREATE_SET ( StateMessage  ,
char *   
)

ClassEntry::CREATE_SET ( Accepting  ,
bool   
)

ClassEntry::CREATE_SET ( BannerStart  ,
char *   
)

ClassEntry::CREATE_SET ( BannerEnd  ,
char *   
)

ClassEntry::CREATE_SET ( ppd  ,
char *   
)

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::addPrinters ( const string  p  )  [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::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.

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]

void ClassEntry::dump (  )  const

Dump values, for debugging purposes.

YCPValue ClassEntry::Read (  )  const

Convert ClassEntry to YCPValue

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

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.

bool ClassEntry::newClass ( const YCPValue value  ) 

Add new class. Replace


Member Data Documentation

string ClassEntry::Name [private]

bool ClassEntry::Default [private]

string ClassEntry::Info [private]

string ClassEntry::Location [private]

string ClassEntry::Uri [private]

string ClassEntry::State [private]

string ClassEntry::StateMessage [private]

bool ClassEntry::Accepting [private]

string ClassEntry::BannerStart [private]

string ClassEntry::BannerEnd [private]

set<string> ClassEntry::AllowUsers [private]

set<string> ClassEntry::DenyUsers [private]

set<string> ClassEntry::Printers [private]

string ClassEntry::ppd [private]

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


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