Back to index

system-config-printer  1.3.9+20120706
SearchCriterion.py
Go to the documentation of this file.
00001 ## Copyright (C) 2008 Rui Matos <tiagomatos@gmail.com>
00002 
00003 ## This program is free software; you can redistribute it and/or modify
00004 ## it under the terms of the GNU General Public License as published by
00005 ## the Free Software Foundation; either version 2 of the License, or
00006 ## (at your option) any later version.
00007 
00008 ## This program is distributed in the hope that it will be useful,
00009 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
00010 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00011 ## GNU General Public License for more details.
00012 
00013 ## You should have received a copy of the GNU General Public License
00014 ## along with this program; if not, write to the Free Software
00015 ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
00016 
00017 class SearchCriterion:
00018     SUBJECT_NAME     = 0
00019     SUBJECT_DESC     = 1
00020     SUBJECT_MANUF    = 2
00021     SUBJECT_MODEL    = 3
00022     SUBJECT_URI      = 4
00023     SUBJECT_MEDIA    = 5
00024     SUBJECT_STAT     = 6
00025     SUBJECT_COUNT    = 7
00026     SUBJECT_LOCATION = 8
00027 
00028     RULE_IS      = 0
00029     RULE_ISNOT   = 1
00030     RULE_CONT    = 2
00031     RULE_NOTCONT = 3
00032     RULE_COUNT   = 4
00033 
00034     def __init__ (self,
00035                   subject = SUBJECT_NAME,
00036                   rule    = RULE_CONT,
00037                   value   = ""):
00038         self.subject = subject
00039         self.rule = rule
00040         self.value = value