YaST2 Developers Documentation: Unknown YCP Module

Unknown YCP Module

This module has an unstable interface.

Global Functions

Local Functions

Info:

File: modules/Punycode.ycp Package: Main yast package Summary: DNS Punycode Handling Authors: Lukas Ocilka Tags: Unstable

$Id$

global GetMaximumCacheSize () -> integer

Returns the maximum cache size (sum of already converted strings).

Return value:
maximum_cache_size
See
SetMaximumCacheSize()
global SetMaximumCacheSize (integer new_max_size) -> void

Offers to set the maximum cache size (sum of already converted strings).

Parameters:
new_max_size
See
GetMaximumCacheSize()
local CreateNewCacheRecord (string decoded, string encoded) -> void

Adds new cache records for encoded and decoded strings.

Parameters:
decoded
encoded
local GetEncodedCachedString (string decoded_string) -> string

Returns string encoded in Punycode if it has been already cached. Returns nil if not found.

Parameters:
decoded_string
Return value:
encoded_string (Punycode)
local GetDecodedCachedString (string encoded_string) -> string

Returns string encoded in Punycode if it has been already cached. Returns nil if not found.

Parameters:
encoded_string
Return value:
decoded_string (Unicode)
local GetTmpDirectory () -> string

Returns the current temporary directory. Lazy loading for the initialization is used.

local ConvertBackAndForth (list <string> strings_in, boolean to_punycode) -> list <string>

Function takes the list of strings and returns them in the converted format. Unicode to Punycode or Punycode to Unicode (param to_punycode). It uses a cache of already-converted strings.

Parameters:
strings_in
to_punycode
global EncodePunycodes (list <string> punycode_strings) -> list <string>

Converts list of UTF-8 strings into their Punycode ASCII repserentation.

Parameters:
punycode_strings
Return value:
encoded_strings
global DecodePunycodes (list <string> punycode_strings) -> list <string>

Converts list of Punycode strings into their UTF-8 representation.

Parameters:
punycode_strings
Return value:
decoded_strings
global EncodeDomainName (string decoded_domain_name) -> string

Encodes the domain name (relative or FQDN) to the Punycode.

Parameters:
decoded_domain_name
Return value:
encoded domain_name
Example

	EncodeDomainName("žížala.jůlinka.go.home")
		-> "xn--ala-qma83eb.xn--jlinka-3mb.go.home"
global DecodeDomainName (string encoded_domain_name) -> string

Decodes the domain name (relative or FQDN) from the Punycode.

Parameters:
encoded_domain_name
Return value:
decoded domain_name
Example

	DecodeDomainName("xn--ala-qma83eb.xn--jlinka-3mb.go.home")
		-> "žížala.jůlinka.go.home"
global DocodeDomainNames (list <string> encoded_domain_names) -> list <string>

Decodes the list of domain names to their Unicode representation. This function is similar to DecodePunycodes but it works with every string as a domain name (that means every domain name is parsed by dots and separately evaluated).

Parameters:
encoded_domain_names
Return value:
decoded_domain_names
Example

 	DocodeDomainNames(["mx1.example.org", "xp3.example.org.", "xn--ala-qma83eb.org.example."])
		-> ["mx1.example.org", "xp3.example.org.", "žížala.org.example."]