ApplicationInterface
Object Hierarchy:
Description:
public interface ApplicationInterface : Object
Interface for OLLMchat applications that provides standardized configuration and data directory management.
Implementations should call type registration methods (e.g., `OLLMvector.Database.register_config()`) directly before calling
`load_config()` if needed. The base_load_config() method handles Config1 to Config2 migration automatically.
Example
public class MyApp : Object, ApplicationInterface {
public Settings.Config2 config { get; set; }
public string data_dir { get; set; default = "~/.local/share/myapp"; }
public Settings.Config2 load_config() {
// Register types if needed
OLLMvector.Database.register_config();
// Use base implementation
return base_load_config();
}
}
Since:
1.0
All known implementing classes:
Content:
Properties:
Static methods:
Methods:
- protected virtual Config2 base_load_config ()
Base implementation that loads configuration, handling Config1 to
Config2 migration.
- public bool check_help_arg (string[] args)
Checks if help flag (--help or -h) is present in command-line
arguments.
- public void ensure_data_dir () throws Error
Ensures the data directory exists, creating it if necessary.
- public string? get_help_text (string help_text, string program_name, OptionContext opt_context)
Returns custom help text for this application. If 'help' property is
set, outputs it (with {ARG} replaced) followed by auto-generated options from GLib's OptionContext.
- public abstract Config2 load_config ()
Loads and returns the configuration.
Inherited Members:
All known members inherited from class GLib.Object
- @get
- @new
- @ref
- @set
- add_toggle_ref
- add_weak_pointer
- bind_property
- connect
- constructed
- disconnect
- dispose
- dup_data
- dup_qdata
- force_floating
- freeze_notify
- get_class
- get_data
- get_property
- get_qdata
- get_type
- getv
- interface_find_property
- interface_install_property
- interface_list_properties
- is_floating
- new_valist
- new_with_properties
- newv
- notify
- notify_property
- ref_count
- ref_sink
- remove_toggle_ref
- remove_weak_pointer
- replace_data
- replace_qdata
- set_data
- set_data_full
- set_property
- set_qdata
- set_qdata_full
- set_valist
- setv
- steal_data
- steal_qdata
- thaw_notify
- unref
- watch_closure
- weak_ref
- weak_unref