1 |
joko |
1.1 |
#Author: Harald Holzer
(harald.holzer@eunet.at) |
2 |
|
|
#5.4.2000: initial release
|
3 |
|
|
|
4 |
|
|
import hfaxlib
|
5 |
|
|
import string
|
6 |
|
|
|
7 |
|
|
class hylafaxutil:
|
8 |
|
|
_public_methods_ = ["connect","job_new","job_select","job_kill","job_delete","job_param_getall","job_param_get","job_param_set","getfolder","storefile","retrfile","deletefile","jobparam","submitjob","docmd","close","setdebuginfo"]
|
9 |
|
|
_reg_progid_ = "pythonutils.hylafaxutil"
|
10 |
|
|
_reg_clsid_ = "{243E9E30-0702-11D4-8088-005004EFAAEE}"
|
11 |
|
|
faxserv=hfaxlib.hfax()
|
12 |
|
|
|
13 |
|
|
def connect(self,host,user,pw):
|
14 |
|
|
return self.faxserv.connect(str(host),str(user),str(pw))
|
15 |
|
|
|
16 |
|
|
def job_new(self):
|
17 |
|
|
return self.faxserv.job_new()
|
18 |
|
|
def job_select(self,jobid):
|
19 |
|
|
self.faxserv.job_select(jobid)
|
20 |
|
|
def job_kill(self):
|
21 |
|
|
self.faxserv.job_kill()
|
22 |
|
|
def job_delete(self):
|
23 |
|
|
self.faxserv.job_delete()
|
24 |
|
|
def job_param_getall(self):
|
25 |
|
|
return self.faxserv.job_param_getall()
|
26 |
|
|
def job_param_get(self,pname):
|
27 |
|
|
return self.faxserv.job_param_get(str(pname))
|
28 |
|
|
def job_param_set(self,pname,pvalue):
|
29 |
|
|
self.faxserv.job_param_set(str(pname),str(pvalue))
|
30 |
|
|
|
31 |
|
|
def getfolder(self,folder):
|
32 |
|
|
folder=str(folder)
|
33 |
|
|
data=self.faxserv.getfolder(folder)
|
34 |
|
|
if not data: data="None"
|
35 |
|
|
return data
|
36 |
|
|
|
37 |
|
|
def storefile(self,filename):
|
38 |
|
|
return self.faxserv.storefile(str(filename))
|
39 |
|
|
|
40 |
|
|
def retrfile(self,filename,tmpfilename):
|
41 |
|
|
self.faxserv.retrfile(str(filename),str(tmpfilename))
|
42 |
|
|
|
43 |
|
|
def deletefile(self,filename):
|
44 |
|
|
self.faxserv.deletefile(str(filename))
|
45 |
|
|
|
46 |
|
|
def jobparam(self,param):
|
47 |
|
|
return self.faxserv.jobparam(str(param))
|
48 |
|
|
|
49 |
|
|
def submitjob(self):
|
50 |
|
|
return self.faxserv.submitjob()
|
51 |
|
|
|
52 |
|
|
def docmd(self,cmd):
|
53 |
|
|
return self.faxserv.docmd(str(cmd))
|
54 |
|
|
|
55 |
|
|
def close(self):
|
56 |
|
|
self.faxserv.close()
|
57 |
|
|
|
58 |
|
|
def setdebuginfo(self,dbglevel,logfile):
|
59 |
|
|
self.faxserv.setdebuginfo(dbglevel,str(logfile))
|
60 |
|
|
|
61 |
|
|
if __name__=="__main__":
|
62 |
|
|
print "Registering COM Server..."
|
63 |
|
|
import win32com.server.register
|
64 |
|
|
win32com.server.register.UseCommandLine(hylafaxutil)
|
65 |
|
|
|