Lines Matching refs:self
24 static int wpaspy_open(struct wpaspy_obj *self, PyObject *args) in wpaspy_open() argument
30 self->ctrl = wpa_ctrl_open(path); in wpaspy_open()
31 if (self->ctrl == NULL) in wpaspy_open()
33 self->attached = 0; in wpaspy_open()
38 static void wpaspy_close(struct wpaspy_obj *self) in wpaspy_close() argument
40 if (self->ctrl) { in wpaspy_close()
41 if (self->attached) in wpaspy_close()
42 wpa_ctrl_detach(self->ctrl); in wpaspy_close()
43 wpa_ctrl_close(self->ctrl); in wpaspy_close()
44 self->ctrl = NULL; in wpaspy_close()
47 PyObject_Del(self); in wpaspy_close()
51 static PyObject * wpaspy_request(struct wpaspy_obj *self, PyObject *args) in wpaspy_request() argument
62 ret = wpa_ctrl_request(self->ctrl, cmd, strlen(cmd), buf, &buflen, in wpaspy_request()
78 static PyObject * wpaspy_attach(struct wpaspy_obj *self) in wpaspy_attach() argument
82 if (self->attached) in wpaspy_attach()
85 ret = wpa_ctrl_attach(self->ctrl); in wpaspy_attach()
94 static PyObject * wpaspy_detach(struct wpaspy_obj *self) in wpaspy_detach() argument
98 if (!self->attached) in wpaspy_detach()
101 ret = wpa_ctrl_detach(self->ctrl); in wpaspy_detach()
110 static PyObject * wpaspy_pending(struct wpaspy_obj *self) in wpaspy_pending() argument
112 switch (wpa_ctrl_pending(self->ctrl)) { in wpaspy_pending()
126 static PyObject * wpaspy_recv(struct wpaspy_obj *self) in wpaspy_recv() argument
134 ret = wpa_ctrl_recv(self->ctrl, buf, &buflen); in wpaspy_recv()