NWPSCfgAddPrintServerAttr(3nw)


NWPSCfgAddPrintServerAttr -- adds attribute to existing print server

Synopsis

   #include <nwps_cfg.h> 
   or 
   #include <nwpsrv.h> 
   

NWCCODE NWAPI NWPSCfgAddPrintServerAttr (WORD connType, WORD connID, char NWFAR *pServerName, WORD attrID, void NWFAR *attrValue);

Description

The parameters are as follows:

connType
(IN) Specifies either NWPS_BINDERY_SERVICE, NWPS_BINDERY_SERVICE_PRE_40, or NWPS_DIRECTORY_SERVICE.

connID
(IN) Specifies the connection or context identifier.

pServerName
(IN) Points to the name of the print server.

attrID
(IN) Specifies the print server attribute identifier.

attrValue
(IN) Points to the attribute value.

Return values

0x0000
Successful

-1
General Error

other
Bindery or Directory Services Errors

Notices

The type of the buffer pointed to by attrValue depends on the value of attrID. If attrID is not recognized, an error is returned.

If attrValue is single-valued, the new value overwrites the old value. If attrValue is multi-valued, the new attribute value is added to the list.

Legal attribute identifers and values for the print server follow:

Bindery Identifier Directory Identifier Type Multi Valued
None NWPS_ATTR_ACL Object_ACL_T Yes
NWPS_ATTR_CN NWPS_ATTR_CN char[ ] No
NWPS_ATTR_DESC NWPS_ATTR_DESC char[ ] No
None NWPS_ATTR_HOST_DEV char[ ] No
None NWPS_ATTR_NADD Net_Address_T Yes
NWPS_ATTR_OPER NWPS_ATTR_OPER char[ ] Yes
NWPS_ATTR_PRINTER NWPS_ATTR_PRINTER Typed_Name_T Yes
None NWPS_ATTR_PRIV_KEY Octet_String_T No
None NWPS_ATTR_PUBL_KEY Octet_String_T No
NWPS_ATTR_SAP NWPS_ATTR_SAP char[ ] No
None NWPS_ATTR_SEE_ALSO char[ ] Yes
NWPS_ATTR_STAT NWPS_ATTR_STAT Integer_T No
NWPS_ATTR_USER NWPS_ATTR_USER char[ ] Yes
NWPS_ATTR_VERS NWPS_ATTR_VERS char[ ] No

 
 --------------------------------------------------------------------------- 
| Bindery Identifier|  Directory Identifier|  Type          |  Multi Valued| 
|-------------------|----------------------|----------------|--------------| 
| None              |  NWPS_ATTR_ACL       |  Object_ACL_T  |  Yes         | 
|-------------------|----------------------|----------------|--------------| 
| NWPS_ATTR_CN      |  NWPS_ATTR_CN        |  char[ ]       |  No          | 
|-------------------|----------------------|----------------|--------------| 
| NWPS_ATTR_DESC    |  NWPS_ATTR_DESC      |  char[ ]       |  No          | 
|-------------------|----------------------|----------------|--------------| 
| None              |  NWPS_ATTR_HOST_DEV  |  char[ ]       |  No          | 
|-------------------|----------------------|----------------|--------------| 
| None              |  NWPS_ATTR_NADD      |  Net_Address_T |  Yes         | 
|-------------------|----------------------|----------------|--------------| 
| NWPS_ATTR_OPER    |  NWPS_ATTR_OPER      |  char[ ]       |  Yes         | 
|-------------------|----------------------|----------------|--------------| 
| NWPS_ATTR_PRINTER |  NWPS_ATTR_PRINTER   |  Typed_Name_T  |  Yes         | 
|-------------------|----------------------|----------------|--------------| 
| None              |  NWPS_ATTR_PRIV_KEY  |  Octet_String_T|  No          | 
|-------------------|----------------------|----------------|--------------| 
| None              |  NWPS_ATTR_PUBL_KEY  |  Octet_String_T|  No          | 
|-------------------|----------------------|----------------|--------------| 
| NWPS_ATTR_SAP     |  NWPS_ATTR_SAP       |  char[ ]       |  No          | 
|-------------------|----------------------|----------------|--------------| 
| None              |  NWPS_ATTR_SEE_ALSO  |  char[ ]       |  Yes         | 
|-------------------|----------------------|----------------|--------------| 
| NWPS_ATTR_STAT    |  NWPS_ATTR_STAT      |  Integer_T     |  No          | 
|-------------------|----------------------|----------------|--------------| 
| NWPS_ATTR_USER    |  NWPS_ATTR_USER      |  char[ ]       |  Yes         | 
|-------------------|----------------------|----------------|--------------| 
| NWPS_ATTR_VERS    |  NWPS_ATTR_VERS      |  char[ ]       |  No          | 
|-------------------|----------------------|----------------|--------------| 
char[ ] is a NULL-terminated character string.

NWPS_ATTR_STAT values follow:

   0 = NWPS_RUNNING 
   1 = NWPS_GOING_DOWN 
   2 = NWPS_DOWN 
   3 = NWPS_INITIALIZING 

Services

Print Server

References

NWPSCfgAddPrintServer(3nw), NWPSCfgDeletePrintServerAttr(3nw), NWPSCfgGetFirstPrintServerAttr(3nw), NWPSCfgGetNextPrintServerAttr(3nw), NWPSCfgEndNextPrintServerAttr(3nw), NWPSCfgModifyPrintServerAttr(3nw), NWCCOpenConnByName(3nw), NWDSCreateContext(3nw)
30 January 1998
© 1998 The Santa Cruz Operation, Inc. All rights reserved.