Advertisement
ranveer5289

Inetwork

Apr 2nd, 2012
369
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 2.63 KB | None | 0 0
  1. class INetwork(DispatchBaseClass):
  2.     """Network"""
  3.     CLSID = IID('{DCB00002-570F-4A9B-8D69-199FDBA5723B}')
  4.     coclass_clsid = None
  5.  
  6.     def GetCategory(self):
  7.         """Returns the category of this network."""
  8.         return self._oleobj_.InvokeTypes(12, LCID, 1, (3, 0), (),)
  9.  
  10.     def GetConnectivity(self):
  11.         """Returns the connectivity state of this network."""
  12.         return self._oleobj_.InvokeTypes(11, LCID, 1, (3, 0), (),)
  13.  
  14.     def GetDescription(self):
  15.         """Get the network description."""
  16.         # Result is a Unicode object
  17.         return self._oleobj_.InvokeTypes(3, LCID, 1, (8, 0), (),)
  18.  
  19.     def GetDomainType(self):
  20.         """Get the domain type."""
  21.         return self._oleobj_.InvokeTypes(6, LCID, 1, (3, 0), (),)
  22.  
  23.     def GetName(self):
  24.         """Get the name of this network."""
  25.         # Result is a Unicode object
  26.         return self._oleobj_.InvokeTypes(1, LCID, 1, (8, 0), (),)
  27.  
  28.     # Result is of type IEnumNetworkConnections
  29.     def GetNetworkConnections(self):
  30.         """Get the list of network connections for this network."""
  31.         ret = self._oleobj_.InvokeTypes(7, LCID, 1, (9, 0), (),)
  32.         if ret is not None:
  33.             ret = Dispatch(ret, u'GetNetworkConnections', '{DCB00006-570F-4A9B-8D69-199FDBA5723B}')
  34.         return ret
  35.  
  36.     def GetNetworkId(self):
  37.         """Get the network ID."""
  38.         return self._ApplyTypes_(5, 1, (36, 0), (), u'GetNetworkId', None,)
  39.  
  40.     def GetTimeCreatedAndConnected(self, pdwLowDateTimeCreated=pythoncom.Missing, pdwHighDateTimeCreated=pythoncom.Missing, pdwLowDateTimeConnected=pythoncom.Missing, pdwHighDateTimeConnected=pythoncom.Missing):
  41.         """Get the time and date this network was created."""
  42.         return self._ApplyTypes_(8, 1, (24, 0), ((16403, 2), (16403, 2), (16403, 2), (16403, 2)), u'GetTimeCreatedAndConnected', None,pdwLowDateTimeCreated
  43.             , pdwHighDateTimeCreated, pdwLowDateTimeConnected, pdwHighDateTimeConnected)
  44.  
  45.     def SetCategory(self, NewCategory=defaultNamedNotOptArg):
  46.         """Sets the category of this network. This change takes effect immediately."""
  47.         return self._oleobj_.InvokeTypes(13, LCID, 1, (24, 0), ((3, 1),),NewCategory
  48.             )
  49.  
  50.     def SetDescription(self, szDescription=defaultNamedNotOptArg):
  51.         """Set the network description. This change takes effect immediately."""
  52.         return self._oleobj_.InvokeTypes(4, LCID, 1, (24, 0), ((8, 1),),szDescription
  53.             )
  54.  
  55.     def SetName(self, szNetworkNewName=defaultNamedNotOptArg):
  56.         """Rename this network. This change takes effect immediately."""
  57.         return self._oleobj_.InvokeTypes(2, LCID, 1, (24, 0), ((8, 1),),szNetworkNewName
  58.             )
  59.  
  60.     _prop_map_get_ = {
  61.         "IsConnected": (10, 2, (11, 0), (), "IsConnected", None),
  62.         "IsConnectedToInternet": (9, 2, (11, 0), (), "IsConnectedToInternet", None),
  63.     }
  64.     _prop_map_put_ = {
  65.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement