Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- NetLib for Clipper, Version 6.0 - n_b_prtype( <cobject>, <ntype>, <cproperty> ) http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
N_B_PRTYPE( <cObject>, <nType>, <cProperty> )


Parameters

<cObject>
Name of the object.

<nType>
Object type.

<cProperty>)
Name of the property in question.


Returns

Type of the specified property.

Code     Type of property
I        Item property
S        Set property
U        Property not found



Description

Note that the function can return U if the object does not exist or if 
the object does not have that property.

Commonly used object types are:

Value    Object type
 1       User
 2       Group
 3       Print queue
 4       File server
 6       Gateway
 7       Print server
38       Remote bridge


Commonly used item and set properties are:

Item Properties
Name                         Description
ACCOUNT_BALANCE              User's usage balance on server
                             for various services.

IDENTIFICATION               Full name (usually attached to
                             user or group objects).

NET_ADDRESS                  Twelve-byte Internet address 
                             (usually attached to server 
                              objects).

PASSWORD                     Generally encrypted.

Q_DIRECTORY                  Path to a print queue. Must be
                             less than 128 characters.

Set Properties
Name                    Owner         Member
GROUPS_I'M_IN           User          Groups an object 
                                      belongs to. Usually 
                                      attached to user or 
                                      group objects.

GROUP_MEMBERS           Group         Members of a user 
                                      group. Usually 
                                      attached to group 
                                      objects.

                                      Note that for every 
                                      entry in a 
                                      GROUP_MEMBERS 
                                      set, there is a corre-
                                      sponding entry in a 
                                      GROUPS_I'M_IN set.

OPERATORS               File server   Console operators.

Q_OPERATORS             Print queue   User/group who can 
                                      reorder or delete any 
                                      job in the queue.

Q_SERVERS               Print queue   Print server that can 
                                      service jobs in the 
                                      queue.

Q_USERS                 Print queue   User/group who can 
                                      place jobs in the 
                                      queue. Usually 
                                      EVERYONE.

SECURITY_EQUALS         User          User/group with same 
                                      security level.


Examples

? N_B_PRTYPE('HPLASER', 3, 'Q_DIRECTORY')
I

? N_B_PRTYPE('HPLASER', 3, 'Q_OPERATORS')
S

? N_B_PRTYPE('HPLASER', 3, 'OPERATORS')
U

// Return an object's item properties in an array.
FUNCTION GetItems( cObject, nType )
   LOCAL aProperties := aItems := {}, i
   N_B_PRSCAN(cObject, nType, @aProperties)
   FOR i = 1 TO LEN(aProperties)
      // If it's an item property...
      IF N_B_PRTYPE(cObject, nType, aProperties[i]) = 'I'
         // add an element to the array.
         AADD(aItems, aProperties[i])
      ENDIF
   NEXT i
RETURN aItems



See Also: N_B_MEMBERS() N_B_PRREAD() N_B_PRSCAN()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson