
functions
files
intro
|
|
Network configuration |
modules/Provider.ycp |
Provider data |
|
|
Used by Modem, ISDN, DSL.
The provider data is grouped by country. There are predefined ones
(providers.rpm) and custom ones (/etc/sysconfig/network/providers,
represented here as country = "_custom")
Imports
- Language
- Map
- String
- Summary
Global Variables
Global Functions
Local Variables
Local Functions
|
|
|
Current provider name
Current provider
structure depends on Type. See providers.rpm
Current provider type
global LastCountry -> string
|
|
Last selected country
local Supported -> list<string>
|
|
Supported provider types
local Providers -> map<string,map>
|
|
Custom providers
(system ones are too many and thus read on demand)
local OriginalProviders -> map<string,map>
|
|
Custom providers (initial copy)
Countries list
local Deleted -> list<string>
|
|
Deleted providers
local operation -> symbol
|
|
Pending operation (nil = none)
local initialized -> boolean
|
|
True if providers are already read
Country language
global Modified (string type) -> boolean
|
|
Were the providers changed?
- Parameters:
- Return value:
global Read () -> boolean
|
|
Read providers data (custom only) and country mappings
- Return value:
local Filter (map<string,map> providers, string type) -> map
|
|
- Parameters:
local FilterNOT (map<string,map> providers, string type) -> map
|
|
- Parameters:
local CheckType (string type) -> boolean
|
|
- Parameters:
global Write (string type) -> boolean
|
|
Write custom providers data
- Parameters:
type |
providers the module is working with ("all"|"modem"|"isdn"|"dsl") |
- Return value:
global Import (string type, map providers) -> map
|
|
Import data
- Parameters:
type |
|
providers |
providers to be imported |
- Return value:
global Export (string type) -> map
|
|
Export data
- Parameters:
- Return value:
|
dumped settings (later acceptable by Import()) |
global SelectSystem (path name) -> boolean
|
|
Select the given system provider
- Parameters:
name |
SCR path to the system provider |
- Return value:
global Select (string name) -> boolean
|
|
Select the given provider
- Parameters:
name |
provider to select ("" for new provider, default values) |
- Return value:
global Add (string type) -> boolean
|
|
Add a new provider
- Parameters:
type |
provider type (modem|isdn|dsl) |
- Return value:
global Edit (string name) -> boolean
|
|
Edit the given provider
- Parameters:
- Return value:
global Delete (string name) -> boolean
|
|
Delete the given provider
- Parameters:
- Return value:
global Commit () -> boolean
|
|
Commit pending operation
- Return value:
global Clone (string name) -> boolean
|
|
Clone the given provider
- Parameters:
- Return value:
global CloneSystem (path name) -> boolean
|
|
Clone the given system provider
- Parameters:
name |
SCR path to system provider to clone |
- Return value:
local CloneProvider () -> boolean
|
|
Clone current provider
- Return value:
global Overview (string type) -> list
|
|
Create an overview table with all configured providers
- Parameters:
- Return value:
global Summary (string type, boolean split) -> list
|
|
Create a textual summary and a list of unconfigured providers
- Parameters:
type |
|
split |
split configured and unconfigured? |
- Return value:
|
summary of the current configuration |
global GetCountries () -> list
|
|
Get list of countries
- Return value:
global IsUnique (string name) -> boolean
|
|
Check if provider name is unique
- Parameters:
- Return value:
global ProviderType () -> string
|
|
Return current provider type
- Return value:
local FilterProviders (list provs, string type) -> list
|
|
Filter providers based on the type
- Parameters:
provs |
list of providers |
type |
desired type "modem"|"isdn"|"rawip"|"syncppp"|"dsl" |
- Return value:
|
of type capable providers |
local SortProviders (list provs) -> list
|
|
Sorts providers alphabeticly (non-case-sensitively) and by priority.
In the first step, priority and name of each provider is obtained.
List of strings built from these values is created. Item lists are:
"<1-character-priority><34-characters-provider-name>"
This list is sorted, result is correctly sorted, by priority and
alphabeticaly. I did not use builtin sort with sort code because it
uses bubble sort -- it was bloody slow.
- Parameters:
- Return value:
global GetProviders (string type, string country, string preselect) -> list
|
|
Get providers from a group (country/other)
- Parameters:
type |
|
country |
we want providers from this country |
preselect |
preselect this provider |
- Return value:
|
of items for SelectionBox |
|