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 #ifndef _PILS_H
00032 #define _PILS_H
00033
00034 #ifdef P_USE_PRAGMA
00035 #pragma interface
00036 #endif
00037
00038 #if P_LDAP
00039
00040 #include <ptlib/sockets.h>
00041 #include <ptclib/pldap.h>
00042
00043
00046 class PILSSession : public PLDAPSession
00047 {
00048 PCLASSINFO(PILSSession, PLDAPSession)
00049 public:
00052 PILSSession();
00053
00063 class MSIPAddress : public PIPSocket::Address
00064 {
00065 public:
00066 MSIPAddress(DWORD a = 0) : Address(a) { }
00067 MSIPAddress(const PIPSocket::Address & a) : Address(a) { }
00068 MSIPAddress(const PString & dotNotation) : Address(dotNotation) { }
00069 MSIPAddress(PINDEX len, const BYTE * bytes) : Address(len, bytes) { }
00070
00071 MSIPAddress & operator=(DWORD a) { Address::operator=(a); return *this; }
00072 MSIPAddress & operator=(const PIPSocket::Address & a) { Address::operator=(a); return *this; }
00073 MSIPAddress & operator=(const PString & dotNotation) { Address::operator=(dotNotation); return *this; }
00074
00075 friend istream & operator>>(istream & s, MSIPAddress & a);
00076 friend ostream & operator<<(ostream & s, MSIPAddress & a);
00077 };
00078
00079 PLDAP_STRUCT_BEGIN(RTPerson)
00080 PLDAP_ATTR_SIMP(RTPerson, PString, cn);
00081 PLDAP_ATTR_SIMP(RTPerson, PString, c);
00082 PLDAP_ATTR_SIMP(RTPerson, PString, o);
00083 PLDAP_ATTR_SIMP(RTPerson, PString, surname);
00084 PLDAP_ATTR_SIMP(RTPerson, PString, givenName);
00085 PLDAP_ATTR_SIMP(RTPerson, PString, rfc822Mailbox);
00086 PLDAP_ATTR_SIMP(RTPerson, PString, location);
00087 PLDAP_ATTR_SIMP(RTPerson, PString, comment);
00088 PLDAP_ATTR_SIMP(RTPerson, MSIPAddress, sipAddress);
00089 PLDAP_ATTR_SIMP(RTPerson, PWORDArray, sport);
00090 PLDAP_ATTR_INIT(RTPerson, unsigned, sflags, 0);
00091 PLDAP_ATTR_INIT(RTPerson, unsigned, ssecurity, 0);
00092 PLDAP_ATTR_INIT(RTPerson, unsigned, smodop, 0);
00093 PLDAP_ATTR_INIT(RTPerson, unsigned, sttl, 3600);
00094 PLDAP_ATTR_SIMP(RTPerson, PStringList, sprotid);
00095 PLDAP_ATTR_SIMP(RTPerson, PStringList, sprotmimetype);
00096 PLDAP_ATTR_INIT(RTPerson, PString, sappid, PProcess::Current().GetName());
00097 PLDAP_ATTR_INIT(RTPerson, PString, sappguid, "none");
00098 PLDAP_ATTR_SIMP(RTPerson, PStringList, smimetype);
00099 PLDAP_ATTR_INIT(RTPerson, PBoolean, ilsa32833566, 0);
00100 PLDAP_ATTR_INIT(RTPerson, PBoolean, ilsa32964638, 0);
00101 PLDAP_ATTR_INIT(RTPerson, PBoolean, ilsa26214430, 0);
00102 PLDAP_ATTR_INIT(RTPerson, unsigned, ilsa26279966, 0);
00103 PLDAP_ATTR_INIT(RTPerson, unsigned, ilsa39321630, 0);
00104 PLDAP_ATTR_INIT(RTPerson, time_t, timestamp, PTime().GetTimeInSeconds());
00105
00106 public:
00107 PString GetDN() const;
00108
00109 PLDAP_STRUCT_END();
00110
00111 PBoolean AddPerson(
00112 const RTPerson & person
00113 );
00114
00115 PBoolean ModifyPerson(
00116 const RTPerson & person
00117 );
00118
00119 PBoolean DeletePerson(
00120 const RTPerson & person
00121 );
00122
00123 PBoolean SearchPerson(
00124 const PString & canonicalName,
00125 RTPerson & person
00126 );
00127
00128 PList<RTPerson> SearchPeople(
00129 const PString & filter
00130 );
00131 };
00132
00133 #endif // P_LDAP
00134
00135 #endif // _PILS_H
00136
00137
00138