00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042 #ifndef _PILS_H
00043 #define _PILS_H
00044
00045 #ifdef P_USE_PRAGMA
00046 #pragma interface
00047 #endif
00048
00049 #if P_LDAP
00050
00051 #include <ptlib/sockets.h>
00052 #include <ptclib/pldap.h>
00053
00054
00057 class PILSSession : public PLDAPSession
00058 {
00059 PCLASSINFO(PILSSession, PLDAPSession)
00060 public:
00063 PILSSession();
00064
00074 class MSIPAddress : public PIPSocket::Address
00075 {
00076 public:
00077 MSIPAddress(DWORD a = 0) : Address(a) { }
00078 MSIPAddress(const PIPSocket::Address & a) : Address(a) { }
00079 MSIPAddress(const PString & dotNotation) : Address(dotNotation) { }
00080 MSIPAddress(PINDEX len, const BYTE * bytes) : Address(len, bytes) { }
00081
00082 MSIPAddress & operator=(DWORD a) { Address::operator=(a); return *this; }
00083 MSIPAddress & operator=(const PIPSocket::Address & a) { Address::operator=(a); return *this; }
00084 MSIPAddress & operator=(const PString & dotNotation) { Address::operator=(dotNotation); return *this; }
00085
00086 friend istream & operator>>(istream & s, MSIPAddress & a);
00087 friend ostream & operator<<(ostream & s, MSIPAddress & a);
00088 };
00089
00090 PLDAP_STRUCT_BEGIN(RTPerson)
00091 PLDAP_ATTR_SIMP(RTPerson, PString, cn);
00092 PLDAP_ATTR_SIMP(RTPerson, PString, c);
00093 PLDAP_ATTR_SIMP(RTPerson, PString, o);
00094 PLDAP_ATTR_SIMP(RTPerson, PString, surname);
00095 PLDAP_ATTR_SIMP(RTPerson, PString, givenName);
00096 PLDAP_ATTR_SIMP(RTPerson, PString, rfc822Mailbox);
00097 PLDAP_ATTR_SIMP(RTPerson, PString, location);
00098 PLDAP_ATTR_SIMP(RTPerson, PString, comment);
00099 PLDAP_ATTR_SIMP(RTPerson, MSIPAddress, sipAddress);
00100 PLDAP_ATTR_SIMP(RTPerson, PWORDArray, sport);
00101 PLDAP_ATTR_INIT(RTPerson, unsigned, sflags, 0);
00102 PLDAP_ATTR_INIT(RTPerson, unsigned, ssecurity, 0);
00103 PLDAP_ATTR_INIT(RTPerson, unsigned, smodop, 0);
00104 PLDAP_ATTR_INIT(RTPerson, unsigned, sttl, 3600);
00105 PLDAP_ATTR_SIMP(RTPerson, PStringList, sprotid);
00106 PLDAP_ATTR_SIMP(RTPerson, PStringList, sprotmimetype);
00107 PLDAP_ATTR_INIT(RTPerson, PString, sappid, PProcess::Current().GetName());
00108 PLDAP_ATTR_INIT(RTPerson, PString, sappguid, "none");
00109 PLDAP_ATTR_SIMP(RTPerson, PStringList, smimetype);
00110 PLDAP_ATTR_INIT(RTPerson, BOOL, ilsa32833566, 0);
00111 PLDAP_ATTR_INIT(RTPerson, BOOL, ilsa32964638, 0);
00112 PLDAP_ATTR_INIT(RTPerson, BOOL, ilsa26214430, 0);
00113 PLDAP_ATTR_INIT(RTPerson, unsigned, ilsa26279966, 0);
00114 PLDAP_ATTR_INIT(RTPerson, unsigned, ilsa39321630, 0);
00115 PLDAP_ATTR_INIT(RTPerson, time_t, timestamp, PTime().GetTimeInSeconds());
00116
00117 public:
00118 PString GetDN() const;
00119
00120 PLDAP_STRUCT_END();
00121
00122 BOOL AddPerson(
00123 const RTPerson & person
00124 );
00125
00126 BOOL ModifyPerson(
00127 const RTPerson & person
00128 );
00129
00130 BOOL DeletePerson(
00131 const RTPerson & person
00132 );
00133
00134 BOOL SearchPerson(
00135 const PString & canonicalName,
00136 RTPerson & person
00137 );
00138
00139 PList<RTPerson> SearchPeople(
00140 const PString & filter
00141 );
00142 };
00143
00144 #endif // P_LDAP
00145
00146 #endif // _PILS_H
00147
00148
00149