Remove redundant code associated with Bernard Postgres Dispense prototype
[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         @param username The username to connect to dispense with
14         @param secret The secret to use for Auth
15         """
16         def __init__(self, username=None, secret=None):
17                 pass
18
19         """
20         Create a new dispense interface as the supplied user.
21         @param username The userid of the person authing to dispense
22         @param pin Thier pin
23         """
24         def authUsernamePin(self, userId, pin):
25                 pass
26
27         """
28         Create a new dispense interface as the supplied user.
29         @param cardId The card that someone is connecting to Dispense with
30         """
31         def authMifare(self, cardId):
32                 pass
33
34         """
35         Add a MIFARE card for this user
36         @param cardId Card to add to a user account
37         @return 1 if added successfully, anything else otherwise
38         """
39         def addCard(self, cardId):
40                 pass
41
42         """
43         Check if creating the user worked correctly.
44         @return True if currently logged in as a user, false otherwise
45         """
46         def isLoggedIn(self):
47                 pass
48
49         """
50         Get the current users username.
51         @return The username of the current user. An empty string if not currently logged in.
52         """
53         def getUsername(self):
54                 pass
55
56         """
57         Get the current users balance.
58         @return the users balance. None if not logged in.
59         """
60         def getBalance(self):
61                 pass
62
63         """
64         Get the name and price of an item.
65         @param itemId The number entered into the vending machine
66         @return (itemname, price)
67         """
68         def getItemInfo(itemId):
69                 pass
70
71         """
72         Check if the user is disabled.
73         @return True if the user is disabled
74         """
75         def isDisabled(self):
76                 pass
77
78         """
79         Dispense an item for the current user.
80         @param itemId The number entered into the vending machine
81         """
82         def dispenseItem(self, itemId):
83                 pass
84
85         """
86         Log the current user out
87         """
88         def logOut(self):
89                 pass
90
91

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