# This file was created automatically by SWIG.
# Don't modify this file, modify the SWIG interface instead.
# This file is compatible with both classic and new-style classes.

import _pcap

def _swig_setattr(self,class_type,name,value):
    if (name == "this"):
        if isinstance(value, class_type):
            self.__dict__[name] = value.this
            if hasattr(value,"thisown"): self.__dict__["thisown"] = value.thisown
            del value.thisown
            return
    method = class_type.__swig_setmethods__.get(name,None)
    if method: return method(self,value)
    self.__dict__[name] = value

def _swig_getattr(self,class_type,name):
    method = class_type.__swig_getmethods__.get(name,None)
    if method: return method(self)
    raise AttributeError,name

import types
try:
    _object = types.ObjectType
    _newclass = 1
except AttributeError:
    class _object : pass
    _newclass = 0
del types


class pcapObject(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, pcapObject, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, pcapObject, name)
    def __repr__(self):
        return "<C pcapObject instance at %s>" % (self.this,)
    __swig_setmethods__["pcap"] = _pcap.pcapObject_pcap_set
    __swig_getmethods__["pcap"] = _pcap.pcapObject_pcap_get
    if _newclass:pcap = property(_pcap.pcapObject_pcap_get, _pcap.pcapObject_pcap_set)
    __swig_setmethods__["pcap_dumper"] = _pcap.pcapObject_pcap_dumper_set
    __swig_getmethods__["pcap_dumper"] = _pcap.pcapObject_pcap_dumper_get
    if _newclass:pcap_dumper = property(_pcap.pcapObject_pcap_dumper_get, _pcap.pcapObject_pcap_dumper_set)
    __swig_setmethods__["callback"] = _pcap.pcapObject_callback_set
    __swig_getmethods__["callback"] = _pcap.pcapObject_callback_get
    if _newclass:callback = property(_pcap.pcapObject_callback_get, _pcap.pcapObject_callback_set)
    def __init__(self, *args):
        _swig_setattr(self, pcapObject, 'this', _pcap.new_pcapObject(*args))
        _swig_setattr(self, pcapObject, 'thisown', 1)
    def __del__(self, destroy=_pcap.delete_pcapObject):
        try:
            if self.thisown: destroy(self)
        except: pass
    def open_live(*args): return _pcap.pcapObject_open_live(*args)
    def open_offline(*args): return _pcap.pcapObject_open_offline(*args)
    def dump_open(*args): return _pcap.pcapObject_dump_open(*args)
    def setfilter(*args): return _pcap.pcapObject_setfilter(*args)
    def loop(*args): return _pcap.pcapObject_loop(*args)
    def dispatch(*args): return _pcap.pcapObject_dispatch(*args)
    def next(*args): return _pcap.pcapObject_next(*args)
    def datalink(*args): return _pcap.pcapObject_datalink(*args)
    def snapshot(*args): return _pcap.pcapObject_snapshot(*args)
    def is_swapped(*args): return _pcap.pcapObject_is_swapped(*args)
    def major_version(*args): return _pcap.pcapObject_major_version(*args)
    def minor_version(*args): return _pcap.pcapObject_minor_version(*args)
    def stats(*args): return _pcap.pcapObject_stats(*args)
    def fileno(*args): return _pcap.pcapObject_fileno(*args)

class pcapObjectPtr(pcapObject):
    def __init__(self, this):
        _swig_setattr(self, pcapObject, 'this', this)
        if not hasattr(self,"thisown"): _swig_setattr(self, pcapObject, 'thisown', 0)
        _swig_setattr(self, pcapObject,self.__class__,pcapObject)
_pcap.pcapObject_swigregister(pcapObjectPtr)


lookupdev = _pcap.lookupdev

lookupnet = _pcap.lookupnet

PythonCallBack = _pcap.PythonCallBack

