/usr/include/ptclib/pils.h is in libpt-1.10.10-dev 1.10.10-3.1ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 | /*
* pils.h
*
* Microsoft Internet Location Server Protocol interface class.
*
* Portable Windows Library
*
* Copyright (c) 1993-2003 Equivalence Pty. Ltd.
*
* The contents of this file are subject to the Mozilla Public License
* Version 1.0 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS"
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
* the License for the specific language governing rights and limitations
* under the License.
*
* The Original Code is Portable Windows Library.
*
* The Initial Developer of the Original Code is Equivalence Pty. Ltd.
*
* Contributor(s): ______________________________________.
*
* $Log: pils.h,v $
* Revision 1.4 2004/02/20 16:27:52 ykiryanov
* if'd LDAP code to enable non-LDAP builds
*
* Revision 1.3 2003/04/11 00:07:46 robertj
* More for Microsoft IP address specification wierdness (registration side).
*
* Revision 1.2 2003/04/07 13:05:09 robertj
* Workaround for Microsoft IP address specification wierdness.
*
* Revision 1.1 2003/03/31 03:35:20 robertj
* Major addition of LDAP functionality.
* Added ILS specialisation of LDAP.
*
*/
#ifndef _PILS_H
#define _PILS_H
#ifdef P_USE_PRAGMA
#pragma interface
#endif
#if P_LDAP
#include <ptlib/sockets.h>
#include <ptclib/pldap.h>
/**This class will create an LDAP client to access a remote ILS server.
*/
class PILSSession : public PLDAPSession
{
PCLASSINFO(PILSSession, PLDAPSession)
public:
/**Create an ILS client.
*/
PILSSession();
/**Special IP address class. Microsoft in their infinite wisdom save the
IP address as an little endian integer in the LDAP fild, but this was
generated from a 32 bit integer that was in network byte order (big
endian) which causes immense confusion. Reading directly into a
PIPSocket::Address does not work as it assumes that any integer forms
would be in host order. So we need to override the standard read
function so the marchalling into the RTPerson structure works.
All very sad.
*/
class MSIPAddress : public PIPSocket::Address
{
public:
MSIPAddress(DWORD a = 0) : Address(a) { }
MSIPAddress(const PIPSocket::Address & a) : Address(a) { }
MSIPAddress(const PString & dotNotation) : Address(dotNotation) { }
MSIPAddress(PINDEX len, const BYTE * bytes) : Address(len, bytes) { }
MSIPAddress & operator=(DWORD a) { Address::operator=(a); return *this; }
MSIPAddress & operator=(const PIPSocket::Address & a) { Address::operator=(a); return *this; }
MSIPAddress & operator=(const PString & dotNotation) { Address::operator=(dotNotation); return *this; }
friend istream & operator>>(istream & s, MSIPAddress & a);
friend ostream & operator<<(ostream & s, MSIPAddress & a);
};
PLDAP_STRUCT_BEGIN(RTPerson)
PLDAP_ATTR_SIMP(RTPerson, PString, cn); // Must be non-empty
PLDAP_ATTR_SIMP(RTPerson, PString, c);
PLDAP_ATTR_SIMP(RTPerson, PString, o);
PLDAP_ATTR_SIMP(RTPerson, PString, surname);
PLDAP_ATTR_SIMP(RTPerson, PString, givenName);
PLDAP_ATTR_SIMP(RTPerson, PString, rfc822Mailbox); // Must be non-empty
PLDAP_ATTR_SIMP(RTPerson, PString, location);
PLDAP_ATTR_SIMP(RTPerson, PString, comment);
PLDAP_ATTR_SIMP(RTPerson, MSIPAddress, sipAddress);
PLDAP_ATTR_SIMP(RTPerson, PWORDArray, sport);
PLDAP_ATTR_INIT(RTPerson, unsigned, sflags, 0);
PLDAP_ATTR_INIT(RTPerson, unsigned, ssecurity, 0);
PLDAP_ATTR_INIT(RTPerson, unsigned, smodop, 0);
PLDAP_ATTR_INIT(RTPerson, unsigned, sttl, 3600);
PLDAP_ATTR_SIMP(RTPerson, PStringList, sprotid);
PLDAP_ATTR_SIMP(RTPerson, PStringList, sprotmimetype);
PLDAP_ATTR_INIT(RTPerson, PString, sappid, PProcess::Current().GetName()); // Must be non-empty
PLDAP_ATTR_INIT(RTPerson, PString, sappguid, "none"); // Must be non-empty
PLDAP_ATTR_SIMP(RTPerson, PStringList, smimetype);
PLDAP_ATTR_INIT(RTPerson, BOOL, ilsa32833566, 0); // 1=audio capable
PLDAP_ATTR_INIT(RTPerson, BOOL, ilsa32964638, 0); // 1=video capable
PLDAP_ATTR_INIT(RTPerson, BOOL, ilsa26214430, 0); // 1=in a call
PLDAP_ATTR_INIT(RTPerson, unsigned, ilsa26279966, 0); // unknown
PLDAP_ATTR_INIT(RTPerson, unsigned, ilsa39321630, 0); // 1 personal; 2 business user; 4 adults-only
PLDAP_ATTR_INIT(RTPerson, time_t, timestamp, PTime().GetTimeInSeconds());
public:
PString GetDN() const;
PLDAP_STRUCT_END();
BOOL AddPerson(
const RTPerson & person
);
BOOL ModifyPerson(
const RTPerson & person
);
BOOL DeletePerson(
const RTPerson & person
);
BOOL SearchPerson(
const PString & canonicalName,
RTPerson & person
);
PList<RTPerson> SearchPeople(
const PString & filter
);
};
#endif // P_LDAP
#endif // _PILS_H
// End of file ////////////////////////////////////////////////////////////////
|