r26619: Add Python bindings for libnet. No tests yet and no way to set the parameters...
[jelmer/samba4-debian.git] / source / libnet / net.py
1 # This file was automatically generated by SWIG (http://www.swig.org).
2 # Version 1.3.33
3 #
4 # Don't modify this file, modify the SWIG interface instead.
5
6 import _net
7 import new
8 new_instancemethod = new.instancemethod
9 try:
10     _swig_property = property
11 except NameError:
12     pass # Python < 2.2 doesn't have 'property'.
13 def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
14     if (name == "thisown"): return self.this.own(value)
15     if (name == "this"):
16         if type(value).__name__ == 'PySwigObject':
17             self.__dict__[name] = value
18             return
19     method = class_type.__swig_setmethods__.get(name,None)
20     if method: return method(self,value)
21     if (not static) or hasattr(self,name):
22         self.__dict__[name] = value
23     else:
24         raise AttributeError("You cannot add attributes to %s" % self)
25
26 def _swig_setattr(self,class_type,name,value):
27     return _swig_setattr_nondynamic(self,class_type,name,value,0)
28
29 def _swig_getattr(self,class_type,name):
30     if (name == "thisown"): return self.this.own()
31     method = class_type.__swig_getmethods__.get(name,None)
32     if method: return method(self)
33     raise AttributeError,name
34
35 def _swig_repr(self):
36     try: strthis = "proxy of " + self.this.__repr__()
37     except: strthis = ""
38     return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
39
40 import types
41 try:
42     _object = types.ObjectType
43     _newclass = 1
44 except AttributeError:
45     class _object : pass
46     _newclass = 0
47 del types
48
49
50 def _swig_setattr_nondynamic_method(set):
51     def set_attr(self,name,value):
52         if (name == "thisown"): return self.this.own(value)
53         if hasattr(self,name) or (name == "this"):
54             set(self,name,value)
55         else:
56             raise AttributeError("You cannot add attributes to %s" % self)
57     return set_attr
58
59
60 import events
61 libnet_context_init = _net.libnet_context_init
62 class libnet(object):
63     thisown = _swig_property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
64     __repr__ = _swig_repr
65     def __init__(self, *args, **kwargs): 
66         _net.libnet_swiginit(self,_net.new_libnet(*args, **kwargs))
67     __swig_destroy__ = _net.delete_libnet
68 libnet.samsync_ldb = new_instancemethod(_net.libnet_samsync_ldb,None,libnet)
69 libnet.DomainList = new_instancemethod(_net.libnet_DomainList,None,libnet)
70 libnet.DomainClose = new_instancemethod(_net.libnet_DomainClose,None,libnet)
71 libnet.DomainOpen = new_instancemethod(_net.libnet_DomainOpen,None,libnet)
72 libnet.LookupName = new_instancemethod(_net.libnet_LookupName,None,libnet)
73 libnet.LookupDCs = new_instancemethod(_net.libnet_LookupDCs,None,libnet)
74 libnet.LookupHost = new_instancemethod(_net.libnet_LookupHost,None,libnet)
75 libnet.Lookup = new_instancemethod(_net.libnet_Lookup,None,libnet)
76 libnet.ListShares = new_instancemethod(_net.libnet_ListShares,None,libnet)
77 libnet.AddShare = new_instancemethod(_net.libnet_AddShare,None,libnet)
78 libnet.DelShare = new_instancemethod(_net.libnet_DelShare,None,libnet)
79 libnet.GroupList = new_instancemethod(_net.libnet_GroupList,None,libnet)
80 libnet.GroupInfo = new_instancemethod(_net.libnet_GroupInfo,None,libnet)
81 libnet.UserList = new_instancemethod(_net.libnet_UserList,None,libnet)
82 libnet.UserInfo = new_instancemethod(_net.libnet_UserInfo,None,libnet)
83 libnet.ModifyUser = new_instancemethod(_net.libnet_ModifyUser,None,libnet)
84 libnet.DeleteUser = new_instancemethod(_net.libnet_DeleteUser,None,libnet)
85 libnet.CreateUser = new_instancemethod(_net.libnet_CreateUser,None,libnet)
86 libnet.SamDump_keytab = new_instancemethod(_net.libnet_SamDump_keytab,None,libnet)
87 libnet.SamDump = new_instancemethod(_net.libnet_SamDump,None,libnet)
88 libnet.SamSync_netlogon = new_instancemethod(_net.libnet_SamSync_netlogon,None,libnet)
89 libnet.UnbecomeDC = new_instancemethod(_net.libnet_UnbecomeDC,None,libnet)
90 libnet.BecomeDC = new_instancemethod(_net.libnet_BecomeDC,None,libnet)
91 libnet.JoinSite = new_instancemethod(_net.libnet_JoinSite,None,libnet)
92 libnet.JoinDomain = new_instancemethod(_net.libnet_JoinDomain,None,libnet)
93 libnet.Join = new_instancemethod(_net.libnet_Join,None,libnet)
94 libnet.RpcConnect = new_instancemethod(_net.libnet_RpcConnect,None,libnet)
95 libnet.RemoteTOD = new_instancemethod(_net.libnet_RemoteTOD,None,libnet)
96 libnet.ChangePassword = new_instancemethod(_net.libnet_ChangePassword,None,libnet)
97 libnet.SetPassword = new_instancemethod(_net.libnet_SetPassword,None,libnet)
98 libnet_swigregister = _net.libnet_swigregister
99 libnet_swigregister(libnet)
100
101
102