git.ucc.asn.au
/
uccvend-vendserver.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
OpenDispense - Fix to actually work
[uccvend-vendserver.git]
/
VendServer
/
DispenseInterface.py
diff --git
a/VendServer/DispenseInterface.py
b/VendServer/DispenseInterface.py
index
7af3653
..
94b2367
100644
(file)
--- a/
VendServer/DispenseInterface.py
+++ b/
VendServer/DispenseInterface.py
@@
-10,67
+10,82
@@
class DispenseInterface(object):
"""
Create a new dispense object.
"""
Create a new dispense object.
+ @param username The username to connect to dispense with
+ @param secret The secret to use for Auth
"""
"""
- def __init__(self, username=None,
loggedIn=False, disabled=Fals
e):
+ def __init__(self, username=None,
secret=Non
e):
pass
"""
Create a new dispense interface as the supplied user.
pass
"""
Create a new dispense interface as the supplied user.
+ @param username The userid of the person authing to dispense
+ @param pin Thier pin
"""
"""
- @staticmethod
- def authUsernamePin(username, pin):
+ def authUsernamePin(self, userId, pin):
pass
"""
Create a new dispense interface as the supplied user.
pass
"""
Create a new dispense interface as the supplied user.
+ @param cardId The card that someone is connecting to Dispense with
"""
"""
- @staticmethod
- def authMifare(cardId):
+ def authMifare(self, cardId):
pass
"""
Add a MIFARE card for this user
pass
"""
Add a MIFARE card for this user
+ @param cardId Card to add to a user account
+ @return 1 if added successfully, anything else otherwise
"""
def addCard(self, cardId):
pass
"""
Check if creating the user worked correctly.
"""
def addCard(self, cardId):
pass
"""
Check if creating the user worked correctly.
+ @return True if currently logged in as a user, false otherwise
"""
def isLoggedIn(self):
pass
"""
"""
def isLoggedIn(self):
pass
"""
- Get the users username.
+ Get the current users username.
+ @return The username of the current user. An empty string if not currently logged in.
"""
"""
- def getUsername(self
, user
):
+ def getUsername(self):
pass
"""
pass
"""
- Get the users current balance.
+ Get the current users balance.
+ @return the users balance. None if not logged in.
"""
"""
- def getBalance(self
, user
):
+ def getBalance(self):
pass
"""
Get the name and price of an item.
pass
"""
Get the name and price of an item.
- itemId is the number entered into the vending machine
+ @param itemId The number entered into the vending machine
+ @return (itemname, price)
"""
"""
- @staticmethod
def getItemInfo(itemId):
pass
"""
Check if the user is disabled.
def getItemInfo(itemId):
pass
"""
Check if the user is disabled.
+ @return True if the user is disabled
"""
def isDisabled(self):
pass
"""
Dispense an item for the current user.
"""
def isDisabled(self):
pass
"""
Dispense an item for the current user.
-
itemId is t
he number entered into the vending machine
+
@param itemId T
he number entered into the vending machine
"""
def dispenseItem(self, itemId):
pass
"""
def dispenseItem(self, itemId):
pass
+ """
+ Log the current user out
+ """
+ def logOut(self):
+ pass
+
UCC
git Repository :: git.ucc.asn.au