1 """ReaderGroups manages smart card reader in groups.
2
3 __author__ = "gemalto http://www.gemalto.com"
4
5 Copyright 2001-2011 gemalto
6 Author: Jean-Daniel Aussel, mailto:jean-daniel.aussel@gemalto.com
7
8 This file is part of pyscard.
9
10 pyscard is free software; you can redistribute it and/or modify
11 it under the terms of the GNU Lesser General Public License as published by
12 the Free Software Foundation; either version 2.1 of the License, or
13 (at your option) any later version.
14
15 pyscard is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU Lesser General Public License for more details.
19
20 You should have received a copy of the GNU Lesser General Public License
21 along with pyscard; if not, write to the Free Software
22 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
23 """
24
25 from smartcard.Exceptions import SmartcardException
26 from smartcard.ulist import ulist
27
28
30 """Raised when trying to add an invalid reader group."""
31
34
35
37 """Raised when trying to delete SCard$DefaultReaders reader group."""
38
41
42
44 """Smartcard readers groups private class.
45
46 The readergroups singleton manages the creation of the unique
47 instance of this class.
48 """
49
51 """Retrieve and store list of reader groups"""
52 if None == initlist:
53 initlist = self.getreadergroups()
54 if None != initlist:
55 ulist.__init__(self, initlist)
56 self.unremovablegroups = []
57
59 """Called when a reader group is added."""
60 self.addreadergroup(item)
61
65
66
67
68
69
71 """Returns the list of smartcard reader groups."""
72 return []
73
78
83
85 """Add a reader to a reader group"""
86 pass
87
89 """Remove a reader from a reader group"""
90 pass
91
92
94 """ReadersGroups organizes smart card reader as groups."""
95
96 """The single instance of __readergroups"""
97 instance = None
98
99 """Constructor: create a single instance of __readergroups on first call"""
100
104
105 """All operators redirected to inner class."""
106
109
110
111 if __name__ == '__main__':
112 print readergroups()
113