Ejemplo n.º 1
0
    def __init__(self, session_intf, qtype, qgroup, qid):
        self.__session_interf = session_intf

        #  Retrieve the request slot
        qslot = self.__session_interf.UserInputQueueFetch(
            qtype.value, qgroup.value, qid)

        #  Sanity check - ensure we got what we requested
        if qtype != ClientAttentionType(qslot[0])       \
            or qgroup != ClientAttentionGroup(qslot[1]) \
            or qid != qslot[2]:
            raise RuntimeError('Mismatch in the UserInput queue slot')

        # Parse and save the request information
        self.__qtype = qslot[0]
        self.__qgroup = qslot[1]
        self.__qid = qslot[2]
        self.__varname = qslot[3]
        self.__label = qslot[4]
        self.__mask = qslot[5]
Ejemplo n.º 2
0
 def GetTypeGroup(self):
     return (ClientAttentionType(self.__qtype),
             ClientAttentionGroup(self.__qgroup))
Ejemplo n.º 3
0
 def __repr__(self):
     return '<UserInputSlot queue_type=%s, queue_group=%s, queue_id=%s, varname="%s", label="%s", masked_input=%s>' % (
         str(ClientAttentionType(self.__qtype)),
         str(ClientAttentionGroup(self.__qgroup)), str(self.__qid),
         self.__varname, self.__label, self.__mask and 'True' or 'False')
Ejemplo n.º 4
0
 def UserInputQueueGetTypeGroup(self):
     ret = []
     for (qt, qg) in self.__session_intf.UserInputQueueGetTypeGroup():
         ret.append((ClientAttentionType(qt), ClientAttentionGroup(qg)))
     return ret