DispenseInterface and OpenDispense Implimentation created and tested. Not curruntly...
[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         Check if creating the user worked correctly.
33         """
34         def isLoggedIn(self):
35                 pass
36
37         """
38         Get the users username.
39         """
40         def getUsername(self, user):
41                 pass
42
43         """
44         Get the users current balance.
45         """
46         def getBalance(self, user):
47                 pass
48
49         """
50         Get the name and price of an item.
51         itemId is the number entered into the vending machine
52         """
53         @staticmethod
54         def getItemInfo(itemId):
55                 pass
56
57         """
58         Check if the user is disabled.
59         """
60         def isDisabled(self):
61                 pass
62
63         """
64         Dispense an item for the current user.
65         itemId is the number entered into the vending machine
66         """
67         def dispenseItem(self, itemId):
68                 pass
69
70

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