7af3653f2b1f90901062453070f6d1f810d44568
[uccvend-vendserver.git] / VendServer / DispenseInterface.py
1 """
2 Author: Mitchell Pomery (bobgeorge33)
3
4 Dispense is an abstract class that allows easy configuration between different systems. Anything that is 
5 intended to talk to OpenDispense or similar should comply with this class. Using this class in particular 
6 will cause you a lot of problems.
7 """
8
9 class DispenseInterface(object):
10
11         """
12         Create a new dispense object.
13         """
14         def __init__(self, username=None, loggedIn=False, disabled=False):
15                 pass
16
17         """
18         Create a new dispense interface as the supplied user.
19         """
20         @staticmethod
21         def authUsernamePin(username, pin):
22                 pass
23
24         """
25         Create a new dispense interface as the supplied user.
26         """
27         @staticmethod
28         def authMifare(cardId):
29                 pass
30
31         """
32         Add a MIFARE card for this user
33         """
34         def addCard(self, cardId):
35                 pass
36
37         """
38         Check if creating the user worked correctly.
39         """
40         def isLoggedIn(self):
41                 pass
42
43         """
44         Get the users username.
45         """
46         def getUsername(self, user):
47                 pass
48
49         """
50         Get the users current balance.
51         """
52         def getBalance(self, user):
53                 pass
54
55         """
56         Get the name and price of an item.
57         itemId is the number entered into the vending machine
58         """
59         @staticmethod
60         def getItemInfo(itemId):
61                 pass
62
63         """
64         Check if the user is disabled.
65         """
66         def isDisabled(self):
67                 pass
68
69         """
70         Dispense an item for the current user.
71         itemId is the number entered into the vending machine
72         """
73         def dispenseItem(self, itemId):
74                 pass
75
76

UCC git Repository :: git.ucc.asn.au