| 41 | class BaseStorage : |
| 42 | """Base class for all storages.""" |
| 43 | def getMatchingPrinters(self, printerpattern) : |
| 44 | """Returns the list of all printer names which match a certain pattern.""" |
| 45 | pass |
| 46 | |
| 47 | def addPrinter(self, printername) : |
| 48 | """Adds a printer to the quota storage.""" |
| 49 | pass |
| 50 | |
| 51 | def getPrinterUsers(self, printername) : |
| 52 | """Returns the list of usernames which uses a given printer.""" |
| 53 | pass |
| 54 | |
| 55 | def getPrinterGroups(self, printername) : |
| 56 | """Returns the list of groups which uses a given printer.""" |
| 57 | pass |
| 58 | |
| 59 | def getPrinterPageCounter(self, printername) : |
| 60 | """Returns the last page counter value for a printer given its name.""" |
| 61 | pass |
| 62 | |
| 63 | def updatePrinterPageCounter(self, printername, username, pagecount) : |
| 64 | """Updates the last page counter information for a printer given its name, last username and pagecount.""" |
| 65 | pass |
| 66 | |
| 67 | def addUserPQuota(self, username, printername) : |
| 68 | """Adds a tuple (user, printer) to the Quota Storage, both are also added individually if needed.""" |
| 69 | pass |
| 70 | |
| 71 | def getUPIds(self, username, printername) : |
| 72 | """Returns a tuple (userid, printerid) given a username and a printername.""" |
| 73 | pass |
| 74 | |
| 75 | def getUserPQuota(self, username, printername) : |
| 76 | """Returns the Print Quota information for a given (username, printername).""" |
| 77 | pass |
| 78 | |
| 79 | def setUserPQuota(self, username, printername, softlimit, hardlimit) : |
| 80 | """Sets soft and hard limits for a user quota on a specific printer given (username, printername).""" |
| 81 | pass |
| 82 | |
| 83 | def setDateLimit(self, username, printername, datelimit) : |
| 84 | """Sets the limit date for a soft limit to become an hard one given (username, printername).""" |
| 85 | pass |
| 86 | |
| 87 | def updateUserPQuota(self, username, printername, pagecount) : |
| 88 | """Updates the used user Quota information given (username, printername) and a job size in pages.""" |
| 89 | pass |
| 90 | |
| 91 | def buyUserPQuota(self, username, printername, pagebought) : |
| 92 | """Buys pages for a given (username, printername).""" |
| 93 | pass |
| 94 | |