intermediate commit for backup reasons
added attributes and classes to winapi.py and made some modifications to outlook.py git-svn-id: svn://svn.cy55.de/Zope3/src/cybertools/trunk@2519 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
parent
c39280f58f
commit
c8a881041b
3 changed files with 29 additions and 6 deletions
|
@ -36,11 +36,8 @@ class Crawler(QueueableAgent):
|
|||
|
||||
implements(ICrawler)
|
||||
|
||||
params = {}
|
||||
|
||||
def __init__(self, master, params={}):
|
||||
super(Crawler, self).__init__(master)
|
||||
self.params = params
|
||||
|
||||
def process(self):
|
||||
return self.collect()
|
||||
|
|
|
@ -98,7 +98,7 @@ class OutlookCrawler(MailCrawler):
|
|||
folderItems = getattr(folder, 'Items')
|
||||
for item in range(len(folderItems)):
|
||||
mail = folderItems.Item(item+1)
|
||||
if mail.Class == api.win32com.client.constants.olMail:
|
||||
if mail.Class == api.client.constants.olMail:
|
||||
if self.keys is None:
|
||||
self.keys = []
|
||||
for key in mail._prop_map_get_:
|
||||
|
|
|
@ -24,12 +24,30 @@ $Id$
|
|||
|
||||
client = ctypes = win32api = win32process = win32con = None
|
||||
|
||||
class Mail(object):
|
||||
|
||||
#this is just a guess what a Outlook Mail Object Probably returns
|
||||
Class = None
|
||||
|
||||
def __init__(self):
|
||||
Class = self.__class__
|
||||
|
||||
def _prop_map_get_(self):
|
||||
#here it is necessary of what attributes (called keys in outlok.py)
|
||||
#an Outlook Mail typically has
|
||||
# should return a tuple ()
|
||||
pass
|
||||
|
||||
|
||||
class OutlookFolder(object):
|
||||
|
||||
Items = {'mail1': "eMail 1", 'mail2': "eMail2"}
|
||||
Items = {}
|
||||
# Folders defines in Outlook the sub folders under the "Main" Folder
|
||||
Folders = None
|
||||
|
||||
def __init__(self):
|
||||
Items[0] = Mail()
|
||||
Items[1] = Mail()
|
||||
pass
|
||||
|
||||
|
||||
|
@ -51,18 +69,26 @@ class OutlookApp(object):
|
|||
|
||||
def GetNamespace(self, message=""):
|
||||
print "Namespace " + message + " retrieved"
|
||||
return
|
||||
oNamespace = OutlookNamespace()
|
||||
return oNamespace
|
||||
|
||||
|
||||
class Message(object):
|
||||
|
||||
olFolderInbox = None
|
||||
# esp. for olMail, for further dummy implementations it is necessary
|
||||
# to find out, what class is expected. Meaning what type of object has
|
||||
# to be faked and what attributes it has. see outlook.py
|
||||
# loadMailsfromFolder
|
||||
olMail = Mail()
|
||||
|
||||
def __init__(self):
|
||||
pass
|
||||
|
||||
def EnsureDispatch(self, message=""):
|
||||
print message + " retrieved"
|
||||
oApp = OutlookApp()
|
||||
return oApp
|
||||
|
||||
|
||||
class client(object):
|
||||
|
|
Loading…
Add table
Reference in a new issue