home *** CD-ROM | disk | FTP | other *** search
- {#Z+}
- (*(10U&l12D(s4099T&k2S*)
- {***************************************************************************}
- {** Program : NWBINDRY **}
- {***************************************************************************}
- {** Version : 1.4 ** Started : 11/11/91 ** Ended : / / **}
- {***************************************************************************}
- {******************************** Description ******************************}
- {***************************************************************************}
- {** OOP library for Netware API **}
- {** **}
- {** This unit forms the second level object : BINDERY **}
- {** This object is a descandent of : NETWARE **}
- {** **}
- {** **}
- {** **}
- {** **}
- {***************************************************************************}
- {******************************** Information ******************************}
- {***************************************************************************}
- {** Provides Netware Bindery Services. **}
- {** **}
- {** **}
- {** **}
- {** This code is (c) 1991 - 1994 Antonio Covelli. ALL RIGHTS RESERVED. **}
- {** Portions (c) Novell Inc, **}
- {** **}
- {** **}
- {***************************************************************************}
-
- {$I NETWARE.INC}
- {#Z-}
-
- UNIT NWBINDRY;
-
- INTERFACE
-
- USES
-
- nwvar,
- netware;
-
- TYPE
-
- PBinderyOBJ = ^BinderyOBJ;
- BinderyOBJ = OBJECT (NetwareOBJ)
-
- { This object provides Netware Bindery Services API's. }
-
- FUNCTION AddBinderyObjectToSet (BinderyObjectName : TObjectName;
- BinderyObjectType : OT_BinderyType;
- PropertyName : TPropertyName;
- MemberName : TObjectName;
- MemberType : OT_BinderyType) : WORD;
- { Allows a client to add a member (object) to a group property of an object.
- The property must be of type SET. This call can be used by clients with
- WRITE privileges to the specified property. }
- {#F}
- {}
- { BinderyObjectName: name of the object. }
- { BinderyObjectType: type of the object. }
- { PropertyName : property name to add this object to. }
- { MemberName : name of the object who owns the specified property. }
- { MemnerType : type of the object who owns the specified property. }
- {#F}
-
- FUNCTION ChangeBinderyObjectPassword (BinderyObjectName : TObjectName;
- BinderyObjectType : OT_BinderyType;
- OldPassword,
- NewPassword : TPassword) : WORD;
- { Allows clients to change an object's (usually their own) password. If the
- SUPERVISOR wishes to change an object's password then OLDPASSWORD is
- empty. For encrypted password support see the following:
-
- #KeyedChangePassword#
- #KeyedVerifyPassword# }
- {#F}
- {}
- { BinderyObjectName: name of the object. }
- { BinderyObjectType: type of the object. }
- { OldPassword : the old password of the object. }
- { NewPassword : the new password to be assigned to the object. }
- {#F}
-
- FUNCTION ChangeBinderyObjectSecurity (BinderyObjectName : TObjectName;
- BinderyObjectType : OT_BinderyType;
- NewObjectSecurity : BYTE) : WORD;
- { Allows a client to change the security access level of the specified
- object. The client must have security access levels equal to the object
- it wants to change. }
- {#F}
- {}
- { BinderyObjectName: name of the object. }
- { BinderyObjectType: type of the object. }
- { NewObjectSecurity: new access security assigned to the object. See Bindery
- Security Types in NWVAR.PAS. }
- {#F}
-
- FUNCTION ChangePropertySecurity (BinderyObjectName : TObjectName;
- BinderyObjectType : OT_BinderyType;
- PropertyName : TPropertyName;
- NewPropertySecurity : BYTE) : WORD;
- { Allows a client to change the security access level of a property for
- the specified object. This call can be used by clients who have Property
- Creation privileges for the specified object and Property Read and Write
- privileges for the specified property. }
- {#F}
- {}
- { BinderyObjectName: name of the object. }
- { BinderyObjectType: type of the object. }
- { PropertyName : name of the property whose security will be modified. }
- { NewObjectSecurity: new access security assigned to the property. See
- Bindery Security Types in NWVAR.PAS. }
- {#F}
-
- FUNCTION ChangeUserPassword (BinderyObjectName : TObjectName;
- OldPassword,
- NewPassword : TPassword) : word;
- { Allows clients to change an object's (USERS only) password. If the
- SUPERVISOR wishes to change a user's password then OLDPASSWORD is empty. }
- {#F}
- {}
- { BinderyObjectName: name of the USER. }
- { OldPassword : the old password of the object. }
- { NewPassword : the new password to be assigned to the object. }
- {#F}
-
- FUNCTION CloseBindery : WORD;
- { This call allows a SUPERVISOR or SUPERVISOR EQUIVALENT object to close
- the default file server's bindery files. When the bindery is closed many
- of the network functions are disabled. }
-
- FUNCTION CreateBinderyObject (BinderyObjectName : TObjectName;
- BinderyObjectType : OT_BinderyType;
- ObjectFlags, ObjectSecurity : BYTE) : WORD;
- { Allows clients to create objects within the bindery. A client cannot set
- security access levels equal to "File Server" access. Only SUPERVISORS and
- objects listed in the WORKGROUP_MANAGERS property can make this call.
-
- Bit 0 of ObjectFlags should be set if the object is dynamic (object is
- removed from the bindery when the server is downed.)
-
- Bit 0 of ObjectFlags should be cleared if the object is static (object is
- NOT removed from the bindery when the server is downed.) }
-
- FUNCTION CreateProperty (BinderyObjectName : TObjectName;
- BinderyObjectType : OT_BinderyType;
- PropertyName : TPropertyName;
- PropertyFlags, PropertySecurity : BYTE) : WORD;
- { Allows clients to create properties for the specified object. See
- #CreateBinderyObject# for more information. }
-
- FUNCTION DeleteBinderyObject (BinderyObjectName : TObjectName;
- BinderyObjectType : OT_BinderyType) : WORD;
- { Removes an object and all of its associated properties from the bindery.
- Only a client that is object supervisor of the specified object can make
- this call. Clients are NOT allowed to remove objects that have FileServer
- security levels. }
-
- FUNCTION DeleteBinderyObjectFromSet (BinderyObjectName : TObjectName;
- BinderyObjectType : OT_BinderyType;
- PropertyName : TPropertyName;
- MemberName : TObjectName;
- MemberType : OT_BinderyType) : WORD;
-
- { Allows a client to remove a bindery object from a set property of the
- specified object. }
-
- FUNCTION DeleteProperty (BinderyObjectName : TObjectName;
- BinderyObjectType : OT_BinderyType;
- PropertyName : TPropertyName) : WORD;
-
- { Removes the property attached to the object and disposes of the property
- from the file server's bindery. }
-
- FUNCTION GetBinderyAccessLevel (VAR SecurityAccessLevel : BYTE;
- VAR ObjectID : OT_BinderyID) : WORD;
- { Returns the security access level the logged in object has in the
- bindery as well as the object id. }
-
- FUNCTION GetBinderyObjectAccessLevel (ObjectID : OT_BinderyID;
- VAR SecurityAccessLevel : BYTE) : WORD;
- { Returns the security access level the specified object has in the
- bindery. }
-
- FUNCTION GetBinderyObjectID (BinderyObjectName : TObjectName;
- BinderyObjectType : OT_BinderyType;
- VAR ObjectID : OT_BinderyID) : WORD;
- { Returns the specified bindery object's unique ID number (Object ID). }
-
- FUNCTION GetBinderyObjectName (ObjectID : OT_BinderyID;
- VAR BinderyObjectName : TObjectName;
- VAR BinderyObjectType : OT_BinderyType) : WORD;
- { Returns the specified bindery object ID's full name and type. }
-
- FUNCTION IsBinderyObjectInSet (BinderyObjectName : TObjectName;
- BinderyObjectType : OT_BinderyType;
- PropertyName : TPropertyName;
- MemberName : TObjectName;
- MemberType : OT_BinderyType) : WORD;
- { Allows a client to verify whether an object appears as a member in a set
- property. This call can be used by any client with read privileges to the
- set property. }
-
- function IsCallingStationAManager : word;
- { Allows a workstation to verify whether it is has manager clearance. }
-
- function KeyedChangePassword (BinderyObjectName : TObjectName;
- BinderyObjectType : OT_BinderyType;
- Key : TEncryptKey;
- NewPassword : TPassword) : word;
- { Allows clients to change an object's (USERS only) password. If the
- SUPERVISOR wishes to change a user's password then OLDPASSWORD is empty.
- This function uses the encryption method by using a special key. }
-
- function KeyedVerifyPassword (BinderyObjectName : TObjectName;
- BinderyObjectType : OT_BinderyType;
- Key : TEncryptKey) : word;
- { Allows an object to verify (usually its own) password. This function
- uses the encryption method by using a special key. }
-
- function ListRelationsOfAnObject (BinderyObjectName : TObjectName;
- BinderyObjectType : OT_BinderyType;
- PropertyName : TPropertyName;
- var Relations : TLongint32Array;
- var LastRecord : longint) : word;
- { NO DOCUMENTATION AVAILABLE AS OF YET }
-
- FUNCTION OpenBindery : WORD;
- { This call allows a SUPERVISOR or SUPERVISOR EQUIVALENT object to open
- the default file server's bindery files. }
-
- FUNCTION ReadPropertyValue (BinderyObjectName : TObjectName;
- BinderyObjectType : OT_BinderyType;
- PropertyName : TPropertyName;
- SegmentNumber : WORD;
- VAR PropertyValue : TPropertyValue;
- VAR MoreSegments,
- PropertyFlags : BYTE) : WORD;
- { Allows a client to retrieve the contents of the specified property.
- Property values are stored in 128 byte segments. }
- {}
- { The Segment number must be 1 to read the first segment and then
- incremented by one for each subsequent segment. }
-
- FUNCTION RenameBinderyObject (BinderyObjectName,
- NewBinderyObjectName : TObjectName;
- BinderyObjectType : OT_BinderyType) : WORD;
- { Renames the specified bindery object. The new name must not already be
- defined for that particular object type. It is ok to have a group and
- a user with the same name. }
-
- FUNCTION ScanBinderyObject (SearchObjectName : TObjectName;
- SearchObjectType : OT_BinderyType;
- VAR ObjectID : OT_BinderyID;
- VAR BinderyObjectName : TObjectName;
- VAR BinderyObjectType : OT_BinderyType;
- VAR ObjectHasProperties,
- ObjectFlags, ObjectSecurity : BYTE) : WORD;
- { Allows a client to scan the file server's bindery to determine what
- objects exist. The ObjectID should be set to -1 for the first call and
- then passed back in for subsequent calls. This call can be made by any
- client if the object exists within the bindery and if the client has
- search privileges to the object. }
-
- FUNCTION ScanBinderyObjectTrusteePaths (ObjectID : OT_BinderyID;
- VolumeNumber : BYTE;
- VAR SequenceNumber : WORD;
- VAR TrusteeAccessMask : BYTE;
- VAR TrusteePathName : TPathName) : WORD;
- { This call allows a client to retrieve all of the trustee assignments that
- a given client has to a volume. SequenceNumber should be set to -1 for the
- first call and then passed back in for subsequent calls. }
-
- FUNCTION ScanProperty (BinderyObjectName : TObjectName;
- BinderyObjectType : OT_BinderyType;
- SearchPropertyName : TPropertyName;
- VAR SequenceNumber : LONGINT;
- VAR PropertyName : TPropertyName;
- VAR PropertyFlags, PropertySecurity,
- PropertyHasValue, MoreProperties : BYTE) : WORD;
- { This call allows a client to scan the properties that are associated with
- the speficied object. SequenceNumber must be set to -1 for the first call
- and passed back in on subsequent calls. This call can be used by clients
- who have read privileges for both the object and property. }
-
- FUNCTION VerifyBinderyObjectPassword (BinderyObjectName : TObjectName;
- BinderyObjectType : OT_BinderyType;
- Password : TPassword) : WORD;
- { Allows an object to verify (usually its own) password. }
-
- FUNCTION WritePropertyValue (BinderyObjectName : TObjectName;
- BinderyObjectType : OT_BinderyType;
- PropertyName : TPropertyName;
- SegmentNumber : WORD;
- PropertyValue : TPropertyValue;
- MoreSegments : BYTE) : WORD;
- { Allows clients to write values to the specified property. This call can
- be made by any client who has write privileges to the property. }
-
- private
-
- FUNCTION MemberBinderyCall (BinderyFunctionNumber : WORD;
- BinderyObjectName : TObjectName;
- BinderyObjectType : OT_BinderyType;
- PropertyName : TPropertyName;
- MemberName : TObjectName;
- MemberType : OT_BinderyType) : WORD;
- { Used by SET api's. PRIVATE FUNCTION. }
-
- DESTRUCTOR Done; VIRTUAL;
-
- END;
-
-