| 1 |
#ifndef LDAPCONNECTITER_H_ |
| 2 |
#define LDAPCONNECTITER_H_ |
| 3 |
|
| 4 |
#define PY_SSIZE_T_CLEAN |
| 5 |
|
| 6 |
#include <Python.h> |
| 7 |
|
| 8 |
#include "ldap-xplat.h" |
| 9 |
#include "ldapconnection.h" |
| 10 |
|
| 11 |
#ifndef WIN32 |
| 12 |
#include <poll.h> |
| 13 |
#endif |
| 14 |
|
| 15 |
typedef struct { |
| 16 |
PyObject_HEAD |
| 17 |
LDAPConnection *conn; |
| 18 |
ldap_conndata_t *info; |
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
char state; |
| 28 |
char tls; |
| 29 |
int message_id; |
| 30 |
XTHREAD init_thread; |
| 31 |
#ifdef WIN32 |
| 32 |
HANDLE tls_id; |
| 33 |
#else |
| 34 |
int tls_id; |
| 35 |
#endif |
| 36 |
void *init_thread_data; |
| 37 |
int timeout; |
| 38 |
} LDAPConnectIter; |
| 39 |
|
| 40 |
extern PyTypeObject LDAPConnectIterType; |
| 41 |
|
| 42 |
LDAPConnectIter *LDAPConnectIter_New(LDAPConnection *conn, ldap_conndata_t *info, SOCKET sock); |
| 43 |
PyObject *LDAPConnectIter_Next(LDAPConnectIter *self, int timeout); |
| 44 |
|
| 45 |
#endif |