1
# Copyright 2005 Divmod, Inc. See LICENSE file for details
3
from zope.interface import Interface
5
class IQ2QTransport(Interface):
7
I am a byte-stream-oriented transport which has Q2Q identifiers associated
8
with the endpoints, and possibly some cryptographic verification of the
9
authenticity of those endpoints.
13
""" Returns a Q2QAddress object representing the user on this end of the
18
""" Returns a Q2QAddress object representing the user on the other end of the
22
class IQ2QUser(Interface):
24
A cred interface for Q2Q users.
26
def signCertificateRequest(certificateRequest, domainCert, suggestedSerial):
28
Return a signed certificate object if the subject fields in the
29
certificateRequest are valid.
32
class IFileTransfer(Interface):
34
def getUploadSink(self, path):
36
@param path: a PathFragment that the client wishes to upload to.
38
@return: a DataSink where we'll save the data to.
41
def getDownloadSource(self, path):
43
@param path: a PathFragment that the client wishes to download.
45
@return: a DataSource to download data from.
48
def listChildren(self, path):
50
@param path: a PathFragment that the client wishes to get a list of.
52
@return: a list of dictionaries mapping::
55
'type': vertex.filexfer.MIMEType,
56
'modified': datetime.datetime}
59
class ISessionTokenStorage(Interface):
60
def idFromCookie(self, cookie, domain):
61
"""Look up a user ID from the given cookie in the given domain.
64
class ICertificateStorage(Interface):
65
def getSelfSignedCertificate(self, domainName):
67
@return: a Deferred which will fire with the certificate for the given
71
def storeSelfSignedCertificate(self, domainName, mainCert):
73
@type mainCert: C{str}
74
@param mainCert: Serialized, self-signed certificate to associate
75
with the given domain.
77
@return: a Deferred which will fire when the certificate has been
81
def getPrivateCertificate(self, domainName):
83
@return: a PrivateCertificate instance, e.g. a certificate including a
84
private key, for 'domainName'.
87
def addPrivateCertificate(self, domainName, existingCertificate=None):
91
class IOfferUp(Interface):
93
Sharing control database storage.
96
class IPlugin(Interface):
100
class ITestPlugin(Interface):
102
Dummy plug-in interface for unit testing.
105
class ITestPlugin2(Interface):
107
Dummy plug-in interface for unit testing.