| # ITK Programmer's Guide
Table of contents | Intro | General | TCP Low Level | TCP High Level | UDP | DNS | PPP Encoding/Decoding | Internet Config | Goodies | Cryptography & SSL | Appendix
Chapter 9 : Internet Config routines
Chapter contents: | ITK_ICCountKeys ITK_ICGetIndKey ITK_ICGetPref ITK_ICSetPref ITK_ICGetRaw ITK_ICSetRaw
About this chapter... | This chapter describes ITK's conversion routines for text, pictures, files, dates and blobs.
Note: | Internet Config routines are not supported in the Windows version of ITK.

ITK_ICCountKeys
Syntax: | nbKeys := ITK_ICCountKeys
Description: | Returns the number of Internet Config keys currently defined.
Params: |
In/Out | Parameter | Type |  | Example or note
<- | nbKeys | Longint | Number of keys defined |
Example: |
    For ($i;1;ITK_ICCountKeys)
      $keyType := ITK_ICGetIndKey($i)
    End For

Back to top

ITK_ICGetIndKeys
Syntax: | icKey := ITK_ICGetIndKey (index)
Description: | Returns the Nth key name.
Params: |
In/Out | Parameter | Type |  | Example or note
-> | index | Longint | Index | from 1 to ITK_ICCountKeys
<- | icKey | String | Key name | will return an empty string if index out of range
Example: |
    For ($i;1;ITK_ICCountKeys)
      $keyType := ITK_ICGetIndKey($i)
    End For

Back to top

ITK_ICGetPref
Syntax: | prefValue := ITK_ICGetPref (icKey)
Description: | Returns the preference value string associated with one key.
Note: | This routine is valid for preference values stored as Pascal String (limited to 255 chars)by Internet Config. For other formats, use the ITK_ICGetRaw routine.
Params: |
In/Out | Parameter | Type |  | Example or note
-> | icKey | String | Key Name | as returned by ITK_ICGetIndKey.
<- | prefValue | String | Preference value. | will return an empty string if the requested key doesn't exist.
Example: |
    $userEmail := ITK_ICGetPref("email")

Back to top

ITK_ICSetPref
Syntax: | error := ITK_ICSetPref (icKey;prefValue)
Description: | Sets an Internet Config preference value string associated to a Key.
Note: | This routine is valid for preference values stored as Pascal String (limited to 255 chars) by Internet Config. For other formats, use the ITK_ICSetRaw routine.
Params: |
In/Out | Parameter | Type |  | Example or note
-> | icKey | String | Key to set | You can use one of the existing icKeys or create your own !
-> | prefValue | String | Preference Value |
<- | error | Longint | Result code returned by Internet Config |
Example: |
    $err := ITK_ICSetPref("email";"myname@mydomain.com")

Back to top

ITK_ICGetRaw
Syntax: | prefValue := ITK_ICGetRaw (icKey)
Description: | Returns the preference value associated with one key.
Note: | This routine is valid for preference values not stored as Pascal String by Internet Config. For Pascal Strings values, use the ITK_ICGetPref routine.
Params: |
In/Out | Parameter | Type |  | Example or note
-> | icKey | String | Key Name | as returned by ITK_ICGetIndKey.
<- | prefValue | Text | Preference value. | will return an empty value if the requested key doesn't exist.
Example: |
    $userEmail := ITK_ICGetRaw("signature")

Back to top

ITK_ICSetRaw
Syntax: | error := ITK_ICSetRaw (icKey;prefValue)
Description: | Sets an Internet Config preference value string associated to a Key.
Note: | This routine is valid for preference values not stored as Pascal String by Internet Config. For Pascal Strings, use the ITK_ICSetPref routine.
Params: |
In/Out | Parameter | Type |  | Example or note
-> | icKey | String | Key to set | You can use one of the existing icKeys or create your own !
-> | prefValue | Text | Preference Value |
<- | error | Longint | Result code returned by Internet Config |
Example: |
    $err := ITK_ICSetPref("signature";$sig)

Back to top

CQ/17-Fev-98