1 # This file was automatically generated by SWIG (http://www.swig.org).
4 # Don't modify this file, modify the SWIG interface instead.
7 Parsing and writing Samba configuration files.
12 new_instancemethod
= new
.instancemethod
14 _swig_property
= property
16 pass # Python < 2.2 doesn't have 'property'.
17 def _swig_setattr_nondynamic(self
,class_type
,name
,value
,static
=1):
18 if (name
== "thisown"): return self
.this
.own(value
)
20 if type(value
).__name
__ == 'PySwigObject':
21 self
.__dict
__[name
] = value
23 method
= class_type
.__swig
_setmethods
__.get(name
,None)
24 if method
: return method(self
,value
)
25 if (not static
) or hasattr(self
,name
):
26 self
.__dict
__[name
] = value
28 raise AttributeError("You cannot add attributes to %s" % self
)
30 def _swig_setattr(self
,class_type
,name
,value
):
31 return _swig_setattr_nondynamic(self
,class_type
,name
,value
,0)
33 def _swig_getattr(self
,class_type
,name
):
34 if (name
== "thisown"): return self
.this
.own()
35 method
= class_type
.__swig
_getmethods
__.get(name
,None)
36 if method
: return method(self
)
37 raise AttributeError,name
40 try: strthis
= "proxy of " + self
.this
.__repr
__()
42 return "<%s.%s; %s >" % (self
.__class
__.__module
__, self
.__class
__.__name
__, strthis
,)
46 _object
= types
.ObjectType
48 except AttributeError:
54 def _swig_setattr_nondynamic_method(set):
55 def set_attr(self
,name
,value
):
56 if (name
== "thisown"): return self
.this
.own(value
)
57 if hasattr(self
,name
) or (name
== "this"):
60 raise AttributeError("You cannot add attributes to %s" % self
)
64 class LoadParm(object):
65 thisown
= _swig_property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
67 def __init__(self
, *args
, **kwargs
):
68 _param
.LoadParm_swiginit(self
,_param
.new_LoadParm(*args
, **kwargs
))
69 def load(*args
, **kwargs
):
71 S.load(filename) -> None
74 return _param
.LoadParm_load(*args
, **kwargs
)
76 def load_default(*args
, **kwargs
):
78 S.load_default() -> None
79 Load default smb.conf file.
81 return _param
.LoadParm_load_default(*args
, **kwargs
)
83 def configfile(*args
, **kwargs
):
85 S.configfile() -> string
86 Return name of last config file that was loaded.
88 return _param
.LoadParm_configfile(*args
, **kwargs
)
90 def is_mydomain(*args
, **kwargs
):
92 S.is_mydomain(domain_name) -> bool
93 Check whether the specified name matches our domain name.
95 return _param
.LoadParm_is_mydomain(*args
, **kwargs
)
97 def is_myname(*args
, **kwargs
):
99 S.is_myname(netbios_name) -> bool
100 Check whether the specified name matches one of our netbios names.
102 return _param
.LoadParm_is_myname(*args
, **kwargs
)
104 def set(*args
, **kwargs
):
106 S.set(name, value) -> bool
109 return _param
.LoadParm_set(*args
, **kwargs
)
111 __swig_destroy__
= _param
.delete_LoadParm
112 LoadParm
.default_service
= new_instancemethod(_param
.LoadParm_default_service
,None,LoadParm
)
113 LoadParm
.load
= new_instancemethod(_param
.LoadParm_load
,None,LoadParm
)
114 LoadParm
.load_default
= new_instancemethod(_param
.LoadParm_load_default
,None,LoadParm
)
115 LoadParm
.__len
__ = new_instancemethod(_param
.LoadParm___len__
,None,LoadParm
)
116 LoadParm
.__getitem
__ = new_instancemethod(_param
.LoadParm___getitem__
,None,LoadParm
)
117 LoadParm
.configfile
= new_instancemethod(_param
.LoadParm_configfile
,None,LoadParm
)
118 LoadParm
.is_mydomain
= new_instancemethod(_param
.LoadParm_is_mydomain
,None,LoadParm
)
119 LoadParm
.is_myname
= new_instancemethod(_param
.LoadParm_is_myname
,None,LoadParm
)
120 LoadParm
.use
= new_instancemethod(_param
.LoadParm_use
,None,LoadParm
)
121 LoadParm
.set = new_instancemethod(_param
.LoadParm_set
,None,LoadParm
)
122 LoadParm
.get
= new_instancemethod(_param
.LoadParm_get
,None,LoadParm
)
123 LoadParm_swigregister
= _param
.LoadParm_swigregister
124 LoadParm_swigregister(LoadParm
)
126 class loadparm_service(object):
127 thisown
= _swig_property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
128 def __init__(self
, *args
, **kwargs
): raise AttributeError, "No constructor defined"
129 __repr__
= _swig_repr
130 loadparm_service
.volume_label
= new_instancemethod(_param
.loadparm_service_volume_label
,None,loadparm_service
)
131 loadparm_service
.printername
= new_instancemethod(_param
.loadparm_service_printername
,None,loadparm_service
)
132 loadparm_service
.maxprintjobs
= new_instancemethod(_param
.loadparm_service_maxprintjobs
,None,loadparm_service
)
133 loadparm_service_swigregister
= _param
.loadparm_service_swigregister
134 loadparm_service_swigregister(loadparm_service
)
136 class ParamFile(object):
137 thisown
= _swig_property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
138 __repr__
= _swig_repr
139 def __init__(self
, *args
, **kwargs
):
140 _param
.ParamFile_swiginit(self
,_param
.new_ParamFile(*args
, **kwargs
))
141 def add_section(*args
, **kwargs
):
143 S.add_section(name) -> section
146 return _param
.ParamFile_add_section(*args
, **kwargs
)
148 def first_section(*args
, **kwargs
):
150 S.first_section() -> section
153 return _param
.ParamFile_first_section(*args
, **kwargs
)
155 def next_section(*args
, **kwargs
):
157 S.next_section(prev) -> section
160 return _param
.ParamFile_next_section(*args
, **kwargs
)
162 def read(*args
, **kwargs
):
164 S.read(filename) -> bool
167 return _param
.ParamFile_read(*args
, **kwargs
)
169 def __getitem__(self
, name
):
170 ret
= self
.get_section(name
)
172 raise KeyError("No such section %s" % name
)
175 class SectionIterator
:
176 def __init__(self
, param
):
185 self
.key
= self
.param
.first_section()
190 self
.key
= self
.param
.next_section(self
.key
)
196 return self
.SectionIterator(self
)
198 __swig_destroy__
= _param
.delete_ParamFile
199 ParamFile
.get_section
= new_instancemethod(_param
.ParamFile_get_section
,None,ParamFile
)
200 ParamFile
.add_section
= new_instancemethod(_param
.ParamFile_add_section
,None,ParamFile
)
201 ParamFile
.get
= new_instancemethod(_param
.ParamFile_get
,None,ParamFile
)
202 ParamFile
.get_string
= new_instancemethod(_param
.ParamFile_get_string
,None,ParamFile
)
203 ParamFile
.set_string
= new_instancemethod(_param
.ParamFile_set_string
,None,ParamFile
)
204 ParamFile
.set = new_instancemethod(_param
.ParamFile_set
,None,ParamFile
)
205 ParamFile
.first_section
= new_instancemethod(_param
.ParamFile_first_section
,None,ParamFile
)
206 ParamFile
.next_section
= new_instancemethod(_param
.ParamFile_next_section
,None,ParamFile
)
207 ParamFile
.read
= new_instancemethod(_param
.ParamFile_read
,None,ParamFile
)
208 ParamFile
.write
= new_instancemethod(_param
.ParamFile_write
,None,ParamFile
)
209 ParamFile_swigregister
= _param
.ParamFile_swigregister
210 ParamFile_swigregister(ParamFile
)
212 class param_opt(object):
213 thisown
= _swig_property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
214 def __init__(self
, *args
, **kwargs
): raise AttributeError, "No constructor defined"
215 __repr__
= _swig_repr
216 key
= _swig_property(_param
.param_opt_key_get
)
217 value
= _swig_property(_param
.param_opt_value_get
)
218 __swig_destroy__
= _param
.delete_param_opt
219 param_opt
.__str
__ = new_instancemethod(_param
.param_opt___str__
,None,param_opt
)
220 param_opt_swigregister
= _param
.param_opt_swigregister
221 param_opt_swigregister(param_opt
)
223 class param_section(object):
224 thisown
= _swig_property(lambda x
: x
.this
.own(), lambda x
, v
: x
.this
.own(v
), doc
='The membership flag')
225 __repr__
= _swig_repr
226 name
= _swig_property(_param
.param_section_name_get
)
227 def __getitem__(self
, name
):
230 raise KeyError("No such option %s" % name
)
234 def __init__(self
, section
):
235 self
.section
= section
243 self
.key
= self
.section
.first_parameter()
248 self
.key
= self
.section
.next_parameter(self
.key
)
254 return self
.ParamIterator(self
)
256 def __init__(self
, *args
, **kwargs
):
257 _param
.param_section_swiginit(self
,_param
.new_param_section(*args
, **kwargs
))
258 __swig_destroy__
= _param
.delete_param_section
259 param_section
.get
= new_instancemethod(_param
.param_section_get
,None,param_section
)
260 param_section
.first_parameter
= new_instancemethod(_param
.param_section_first_parameter
,None,param_section
)
261 param_section
.next_parameter
= new_instancemethod(_param
.param_section_next_parameter
,None,param_section
)
262 param_section_swigregister
= _param
.param_section_swigregister
263 param_section_swigregister(param_section
)