#NEWLINE# def __init__( self , db , web , baseurl , desc ) : #NEWLINE# #INDENT# BaseServer . __init__ ( self ) #NEWLINE# self . db = db #NEWLINE# assert baseurl . endswith ( '/' ) #NEWLINE# self . baseurl = baseurl #NEWLINE# self . transport_privkey = PrivateKey ( desc [ 'transport_privkey' ] . decode ( 'hex' ) ) #NEWLINE# self . TT_privkey = desc [ 'TT_private_key' ] . decode ( 'hex' ) #NEWLINE# self . TT_pubkey = desc [ 'TT_public_key' ] . decode ( 'hex' ) #NEWLINE# self . retrieval_privkey = PrivateKey ( desc [ 'retrieval_privkey' ] . decode ( 'hex' ) ) #NEWLINE# web . get_root ( ) . putChild ( 'mailbox' , ServerResource ( self . handle_msgA ) ) #NEWLINE# r = resource . Resource ( ) #NEWLINE# self . listres = RetrievalListResource ( self . db , self . retrieval_privkey ) #NEWLINE# r . putChild ( 'list' , self . listres ) #NEWLINE# ts = internet . TimerService ( ( self . listres . CLOCK_WINDOW * 3 ) , self . prune_old_requests ) #NEWLINE# ts . setServiceParent ( self ) #NEWLINE# r . putChild ( 'fetch' , RetrievalFetchResource ( self . db ) ) #NEWLINE# r . putChild ( 'delete' , RetrievalDeleteResource ( self . db ) ) #NEWLINE# web . get_root ( ) . putChild ( 'retrieval' , r )