This file is indexed.

/usr/include/ptclib/pils.h is in libpt-dev 2.10.11~dfsg-2.1.

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
/*
 * 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): ______________________________________.
 *
 * $Revision: 21788 $
 * $Author: rjongbloed $
 * $Date: 2008-12-11 23:42:13 -0600 (Thu, 11 Dec 2008) $
 */

#ifndef PTLIB_PILS_H
#define PTLIB_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, PBoolean,        ilsa32833566, 0); // 1=audio capable
       PLDAP_ATTR_INIT(RTPerson, PBoolean,        ilsa32964638, 0); // 1=video capable
       PLDAP_ATTR_INIT(RTPerson, PBoolean,        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();

    PBoolean AddPerson(
      const RTPerson & person
    );

    PBoolean ModifyPerson(
      const RTPerson & person
    );

    PBoolean DeletePerson(
      const RTPerson & person
    );

    PBoolean SearchPerson(
      const PString & canonicalName,
      RTPerson & person
    );

    PList<RTPerson> SearchPeople(
      const PString & filter
    );
};

#endif // P_LDAP

#endif // PTLIB_PILS_H


// End of file ////////////////////////////////////////////////////////////////