/usr/share/vala/vapi/fsobasics-2.0.vapi is in libfsoframework-dev 0.12.0-4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 | /* fsobasics-2.0.vapi generated by valac 0.20.1, do not modify. */
[CCode (cprefix = "G", gir_namespace = "GLib", gir_version = "2.0", lower_case_cprefix = "g_")]
namespace GLib {
[CCode (cheader_filename = "glib.h")]
public const bool SOURCE_CALL_AGAIN;
[CCode (cheader_filename = "glib.h")]
public const bool SOURCE_CALL_NEVER;
}
namespace FsoFramework {
namespace Async {
[CCode (cheader_filename = "fsobasics.h")]
[Compact]
public class EventFd {
public GLib.IOChannel channel;
public uint watch;
public EventFd (uint initvalue, GLib.IOFunc callback);
public uint read ();
public void write (int count);
}
[CCode (cheader_filename = "fsobasics.h")]
public class ReactorChannel : GLib.Object {
public delegate void ActionFunc (void* data, ssize_t length);
public ReactorChannel (int fd, owned FsoFramework.Async.ReactorChannel.ActionFunc actionfunc, size_t bufferlength = 512);
public int fileno ();
public ReactorChannel.rewind (int fd, owned FsoFramework.Async.ReactorChannel.ActionFunc actionfunc, size_t bufferlength = 512);
}
[CCode (cheader_filename = "fsobasics.h")]
public static async void sleep_async (int timeout, GLib.Cancellable? cancellable = null);
}
namespace Checksum {
[CCode (cheader_filename = "fsobasics.h")]
public static uint16 crc16 (uint8[] data);
[CCode (cheader_filename = "fsobasics.h")]
public static bool crc16_verify (uint8[] data, uint16 expected);
}
namespace DataSharing {
[CCode (cheader_filename = "fsobasics.h")]
public static void setValueForKey (string key, void* val);
[CCode (cheader_filename = "fsobasics.h")]
public static void* valueForKey (string key);
}
namespace FileHandling {
[CCode (cheader_filename = "fsobasics.h")]
public static bool createDirectory (string filename, Posix.mode_t mode);
[CCode (cheader_filename = "fsobasics.h")]
public static bool isPresent (string filename);
[CCode (cheader_filename = "fsobasics.h")]
public static string[] listDirectory (string dirname);
[CCode (cheader_filename = "fsobasics.h")]
public static string read (string filename);
[CCode (cheader_filename = "fsobasics.h")]
public static uint8[] readContentsOfFile (string filename) throws GLib.FileError;
[CCode (cheader_filename = "fsobasics.h")]
public static string readIfPresent (string filename);
[CCode (cheader_filename = "fsobasics.h")]
public static bool removeTree (string path);
[CCode (cheader_filename = "fsobasics.h")]
public static void write (string contents, string filename, bool create = false);
[CCode (cheader_filename = "fsobasics.h")]
public static void writeBuffer (void* buffer, ulong length, string filename, bool create = false);
[CCode (cheader_filename = "fsobasics.h")]
public static void writeContentsToFile (uint8[] buffer, string filename) throws GLib.FileError;
}
namespace Net {
[CCode (cheader_filename = "fsobasics.h")]
public static string ipv4AddressForInterface (string iface);
}
namespace Network {
[CCode (cheader_filename = "fsobasics.h")]
public static async string[]? textForUri (string servername, string uri = "/") throws GLib.Error;
}
namespace Process {
[CCode (cheader_filename = "fsobasics.h")]
public static Posix.pid_t findByName (string name);
}
namespace StringHandling {
[CCode (cheader_filename = "fsobasics.h")]
public static T convertEnum<F,T> (F from);
[CCode (cheader_filename = "fsobasics.h")]
public static T enumFromName<T> (string name);
[CCode (cheader_filename = "fsobasics.h")]
public static T enumFromNick<T> (string nick);
[CCode (cheader_filename = "fsobasics.h")]
public static T enumFromString<T> (string value, T default_value);
[CCode (cheader_filename = "fsobasics.h")]
public static string enumToNick<T> (T value);
[CCode (cheader_filename = "fsobasics.h")]
public static string enumToString<T> (T value);
[CCode (cheader_filename = "fsobasics.h")]
public static string filterByAllowedCharacters (string input, string allowed);
[CCode (cheader_filename = "fsobasics.h")]
public static string hexdump (uint8[] array, int linelength = 16, string prefix = "", uchar unknownCharacter = '?');
[CCode (cheader_filename = "fsobasics.h")]
public static GLib.HashTable<string,string> splitKeyValuePairs (string str);
[CCode (cheader_filename = "fsobasics.h")]
public static string stringListToString (string[] list);
}
namespace Threading {
[CCode (cheader_filename = "fsobasics.h")]
public delegate void VoidFuncWithVoidStarParam (void* param);
[CCode (cheader_filename = "fsobasics.h")]
public static void callDelegateOnMainThread (FsoFramework.Threading.VoidFuncWithVoidStarParam func, bool waitForCompletion = false, void* param = null);
[CCode (cheader_filename = "fsobasics.h")]
public static void callDelegateOnNewThread (FsoFramework.Threading.VoidFuncWithVoidStarParam func, void* param);
[CCode (cheader_filename = "fsobasics.h")]
public static bool isMainThread ();
}
namespace UserGroupHandling {
[CCode (cheader_filename = "fsobasics.h")]
public static Posix.gid_t gidForGroup (string group);
[CCode (cheader_filename = "fsobasics.h")]
public static bool switchToUserAndGroup (string user, string group);
[CCode (cheader_filename = "fsobasics.h")]
public static Posix.uid_t uidForUser (string user);
}
namespace Utility {
[CCode (cheader_filename = "fsobasics.h")]
public static int copyData (ref uint8[] destination, uint8[] source, int limit = -1);
[CCode (cheader_filename = "fsobasics.h")]
public static string[] createBacktrace ();
[CCode (cheader_filename = "fsobasics.h")]
public static string dataToString (uint8[] data, int limit = -1);
[CCode (cheader_filename = "fsobasics.h")]
public static string? firstAvailableProgram (string[] candidates);
[CCode (cheader_filename = "fsobasics.h")]
public static string hardware ();
[CCode (cheader_filename = "fsobasics.h")]
public static T[] listToArray<T> (GLib.List<T> list);
[CCode (cheader_filename = "fsobasics.h")]
public static string machineConfigurationDir ();
[CCode (cheader_filename = "fsobasics.h")]
public static string prefixForExecutable ();
[CCode (cheader_filename = "fsobasics.h")]
public static string programName ();
}
[CCode (cheader_filename = "fsobasics.h")]
public abstract class AbstractLogger : FsoFramework.Logger, GLib.Object {
protected bool colored;
protected string destination;
protected string domain;
protected uint level;
protected ReprDelegate reprdelegate;
public AbstractLogger (string domain);
protected string colorwrap (string message, string level);
protected virtual string format (string message, string level);
public bool getColored ();
public static string levelToString (GLib.LogLevelFlags level);
public void setColored (bool on);
public static GLib.LogLevelFlags stringToLevel (string level);
protected virtual void write (string message);
}
[CCode (cheader_filename = "fsobasics.h")]
public abstract class AbstractObject : GLib.Object {
public string classname;
protected FsoFramework.SmartKeyFile config;
public FsoFramework.Logger logger;
public AbstractObject ();
public abstract string repr ();
}
[CCode (cheader_filename = "fsobasics.h")]
public class AsyncWorkerQueue<T> : FsoFramework.AbstractWorkerQueue<T>, GLib.Object {
protected GLib.Queue<T> q;
protected FsoFramework.AbstractWorkerQueue.WorkerFunc<T> worker;
public AsyncWorkerQueue ();
protected bool _onIdle ();
}
[CCode (cheader_filename = "fsobasics.h")]
public class BaseKObjectNotifier : GLib.Object {
public static FsoFramework.BaseKObjectNotifier instance;
public BaseKObjectNotifier ();
protected void _addMatch (string action, string subsystem, FsoFramework.KObjectNotifierFunc callback);
public static void addMatch (string action, string subsystem, FsoFramework.KObjectNotifierFunc callback);
protected void handleMessage (string[] parts);
protected bool onActionFromSocket (GLib.IOChannel source, GLib.IOCondition condition);
}
[CCode (cheader_filename = "fsobasics.h")]
public class BaseNetlinkNotifier : GLib.Object {
public Netlink.LinkCache cache;
public static FsoFramework.BaseNetlinkNotifier instance;
public Netlink.Socket socket;
public BaseNetlinkNotifier ();
protected void _addMatch (uint16 type, FsoFramework.NetlinkNotifierFunc callback);
public static void addMatch (uint16 action, FsoFramework.NetlinkNotifierFunc callback);
protected void fillAddressProperties (Netlink.Address addr, ref GLib.HashTable<string,string> properties);
protected void fillLinkProperties (Netlink.Link lnk, ref GLib.HashTable<string,string> properties);
protected void fillNeighbourProperties (Netlink.Neighbour neigh, ref GLib.HashTable<string,string> properties);
protected void fillQdiscProperties (Netlink.Qdisc qdisc, ref GLib.HashTable<string,string> properties);
protected void fillRouteProperties (Netlink.Route route, ref GLib.HashTable<string,string> properties);
protected void fillRuleProperties (Netlink.Rule rule, ref GLib.HashTable<string,string> properties);
protected void handleMessage (uint16 type, Netlink.Object obj);
protected int handleNetlinkMessage (Netlink.Message msg);
protected bool onActionFromSocket (GLib.IOChannel source, GLib.IOCondition condition);
}
[CCode (cheader_filename = "fsobasics.h")]
public class BinBuilder : GLib.Object {
protected GLib.List<uint8> _data;
public BinBuilder (int alignment = 0, uint8 alignment_byte = '\0', GLib.DataStreamByteOrder e = GLib.DataStreamByteOrder.HOST_ENDIAN);
public void append_align ();
public void append_bitfield (int position, uint64 value, int offset = 0, int bit_length = 1, int byte_length = 1);
public void append_crc16 (int start = 0, int end = -1);
public void append_custom (uint64 val, int size);
public void append_data (uint8[] d, int pad_to = 0, uint8 padding = '\0');
public void append_int16 (int16 v);
public void append_int32 (int32 v);
public void append_int64 (int64 v);
public void append_int8 (int8 c);
public void append_pad (long length, uint8 byte);
public void append_string (string s, bool include_null_byte = true, int pad_to = 0, uint8 padding = '\0');
public void append_uint16 (uint16 v);
public void append_uint32 (uint32 v);
public void append_uint64 (uint64 v);
public void append_uint8 (uint8 c);
protected unowned GLib.List<uint8> get_at (int position, uint assure_nth = 1);
public void insert_crc16 (int pos, int start = 0, int end = -1);
public void insert_data (uint8[] data, int position);
public void insert_string (string str, int position);
public void insert_uint16 (uint16 val, int position);
public void insert_uint32 (uint32 val, int position);
public void insert_uint64 (uint64 val, int position);
public void insert_uint8 (uint8 val, int position);
public static uint8 nth_byte (uint64 val, uint byte);
public void reset ();
public void set_align (int pos);
public void set_crc16 (int pos, int start = 0, int end = -1);
public new void set_data (uint8[] d, int position, uint pad_to = 0, uint8 padding = '\0');
public void set_string (string s, int position, bool include_null_byte = true, uint pad_to = 0, uint8 padding = '\0');
public void set_uint16 (uint16 val, int position);
public void set_uint32 (uint32 val, int position);
public void set_uint64 (uint64 val, int position);
public void set_uint8 (uint8 val, int position);
public uint16 uint16_convert (uint16 val);
public uint32 uint32_convert (uint32 val);
public uint64 uint64_convert (uint64 val);
public uint alignment { get; set; }
public uint8 alignment_byte { get; set; }
public uint8[] data { get; }
public GLib.DataStreamByteOrder endianess { get; set; }
public uint length { get; }
public bool packed { get; }
}
[CCode (cheader_filename = "fsobasics.h")]
public class BinReader : GLib.Object {
public GLib.DataStreamByteOrder endianess;
public BinReader (uint8[] d, int alignment = 0, GLib.DataStreamByteOrder e = GLib.DataStreamByteOrder.HOST_ENDIAN);
public bool crc16_verify (int crc_position, int start = 0, int end = -3) throws FsoFramework.BinReaderError;
public uint64 get_bits (int position, int offset, int length) throws FsoFramework.BinReaderError;
public new uint8[] get_data (int pos, int length) throws FsoFramework.BinReaderError;
public string get_string (int pos, int length = -1) throws FsoFramework.BinReaderError;
public uint16 get_uint16 (int pos) throws FsoFramework.BinReaderError;
public uint32 get_uint32 (int pos) throws FsoFramework.BinReaderError;
public uint64 get_uint64 (int pos) throws FsoFramework.BinReaderError;
public uint8 get_uint8 (int pos) throws FsoFramework.BinReaderError;
public uint16 uint16_convert (uint16 val);
public uint32 uint32_convert (uint32 val);
public uint64 uint64_convert (uint64 val);
public BinReader.void_pointer (void* d, uint len, int alignment = 0, GLib.DataStreamByteOrder e = GLib.DataStreamByteOrder.HOST_ENDIAN);
public int alignment { get; set; }
public bool packed { get; }
}
[CCode (cheader_filename = "fsobasics.h")]
public class FileLogger : FsoFramework.AbstractLogger {
public FileLogger (string domain);
public void setFile (string filename, bool append = true);
protected override void write (string message);
}
[CCode (cheader_filename = "fsobasics.h")]
public class GProcessGuard : FsoFramework.IProcessGuard, GLib.Object {
public GProcessGuard ();
public Posix.pid_t _pid ();
public bool attach (Posix.pid_t pid, string[] command);
public bool launchWithPipes (string[] command, out int fdin, out int fdout);
}
[CCode (cheader_filename = "fsobasics.h")]
public class INotifier : GLib.Object {
public static FsoFramework.INotifier instance;
public INotifier ();
protected uint _add (string path, Linux.InotifyMaskFlags mask, FsoFramework.INotifyNotifierFunc cb);
protected void _remove (uint source);
public static uint add (string path, Linux.InotifyMaskFlags mask, FsoFramework.INotifyNotifierFunc cb);
protected void handleEvent (Linux.InotifyEvent event);
protected bool onActionFromInotify (GLib.IOChannel source, GLib.IOCondition condition);
public static void remove (uint source);
}
[CCode (cheader_filename = "fsobasics.h")]
public class Kernel26Module {
public Kernel26Module (string name);
public bool load ();
public bool unload ();
public bool active { get; private set; }
public string arguments { get; set; }
public bool available { get; private set; }
public string name { get; set; }
}
[CCode (cheader_filename = "fsobasics.h")]
public class KmsgLogger : FsoFramework.AbstractLogger {
public KmsgLogger (string domain);
protected override string format (string message, string level);
protected override void write (string message);
}
[CCode (cheader_filename = "fsobasics.h")]
public class NullLogger : FsoFramework.AbstractLogger {
public NullLogger (string domain);
protected override void write (string message);
}
[CCode (cheader_filename = "fsobasics.h")]
public class OverlayFile : GLib.Object {
public OverlayFile (string filename, string newcontent);
}
[CCode (cheader_filename = "fsobasics.h")]
public class Pair<T1,T2> {
public T1 first;
public T2 second;
public Pair (T1 first, T2 second);
}
[CCode (cheader_filename = "fsobasics.h")]
public class Quadtruple<T1,T2,T3,T4> {
public T1 first;
public T4 fourth;
public T2 second;
public T3 third;
public Quadtruple (T1 first, T2 second, T3 third, T4 fourth);
}
[CCode (cheader_filename = "fsobasics.h")]
public class SmartKeyFile : GLib.Object {
public SmartKeyFile ();
public bool boolValue (string section_raw, string key, bool defaultvalue = false);
public static FsoFramework.SmartKeyFile createFromConfig (string filename);
public static FsoFramework.SmartKeyFile defaultKeyFile ();
public double doubleValue (string section_raw, string key, double defaultvalue = 0.0);
public bool hasKey (string section_raw, string key);
public bool hasSection (string section_raw);
public int intValue (string section_raw, string key, int defaultvalue = 0);
public GLib.List<string> keysWithPrefix (string section_raw, string? prefix = null);
public bool loadFromFile (string filename);
public GLib.List<string> sectionsWithPrefix (string? prefix = null);
public string[]? stringListValue (string section_raw, string key, string[]? defaultvalue = null);
public string stringValue (string section_raw, string key, string defaultvalue = "");
public void write<T> (string section_raw, string key, T value);
}
[CCode (cheader_filename = "fsobasics.h")]
public class SmartKeyFileSection : GLib.Object {
public static FsoFramework.SmartKeyFileSection? openSection (FsoFramework.SmartKeyFile kf, string section);
}
[CCode (cheader_filename = "fsobasics.h")]
public class StdErrLogger : FsoFramework.FileLogger {
public StdErrLogger (string domain);
}
[CCode (cheader_filename = "fsobasics.h")]
public class SyncWrapper : GLib.Object {
protected GLib.VoidFunc func;
protected GLib.MainLoop loop;
public SyncWrapper (owned GLib.VoidFunc func);
protected virtual bool onIdle ();
}
[CCode (cheader_filename = "fsobasics.h")]
public class SyslogLogger : FsoFramework.AbstractLogger {
public SyslogLogger (string domain);
protected override string format (string message, string level);
protected override void write (string message);
}
[CCode (cheader_filename = "fsobasics.h")]
public class Triple<T1,T2,T3> {
public T1 first;
public T2 second;
public T3 third;
public Triple (T1 first, T2 second, T3 third);
}
[CCode (cheader_filename = "fsobasics.h")]
public class TypedArrayWrapper<T> {
public T[] data;
public TypedArrayWrapper ();
}
[CCode (cheader_filename = "fsobasics.h")]
public class WaitForPredicate : GLib.Object {
public WaitForPredicate (uint secs, owned GLib.SourceFunc func);
public static bool Wait (uint secs, owned GLib.SourceFunc func);
protected bool onTimeout ();
}
[CCode (cheader_filename = "fsobasics.h")]
public interface AbstractWorkerQueue<T> : GLib.Object {
public delegate void WorkerFunc<T> (T element);
public abstract void enqueue (T element);
public abstract void setDelegate (FsoFramework.AbstractWorkerQueue.WorkerFunc<T> worker);
public abstract void trigger ();
}
[CCode (cheader_filename = "fsobasics.h")]
public interface IProcessGuard : GLib.Object {
public abstract bool isRunning ();
public abstract bool launch (string[] command);
public abstract bool sendSignal (int sig);
public abstract void setAutoRelaunch (bool on);
public abstract void stop (int sig = Posix.SIGTERM);
public signal void running ();
public signal void stopped ();
}
[CCode (cheader_filename = "fsobasics.h")]
public interface Logger : GLib.Object {
public static FsoFramework.Logger createFromConfig (string filename, string group, string domain);
public static FsoFramework.Logger createFromKeyFile (FsoFramework.SmartKeyFile smk, string group, string domain);
public static FsoFramework.Logger createFromKeyFileName (string filename, string group, string domain);
public static FsoFramework.Logger createLogger (string group, string domain);
public abstract bool critical (string message);
public abstract bool data (uint8[] message, bool @in = true, GLib.LogLevelFlags when = GLib.LogLevelFlags.LEVEL_DEBUG);
public abstract bool debug (string message);
public static FsoFramework.Logger defaultLogger ();
public abstract bool error (string message);
public abstract string getDestination ();
public abstract GLib.LogLevelFlags getLevel ();
public abstract bool info (string message);
public abstract void setDestination (string destination);
public abstract void setLevel (GLib.LogLevelFlags level);
public abstract void setReprDelegate (ReprDelegate repr);
public abstract bool warning (string message);
}
[CCode (cheader_filename = "fsobasics.h")]
public enum Ternary {
UNKNOWN,
FALSE,
TRUE
}
[CCode (cheader_filename = "fsobasics.h")]
public errordomain BinReaderError {
OUT_OF_RANGE,
CHECKSUM_IN_DATA,
ILLEGAL_PARAMETER
}
[CCode (cheader_filename = "fsobasics.h")]
public delegate void INotifyNotifierFunc (Linux.InotifyMaskFlags flags, uint32 cookie, string? name);
[CCode (cheader_filename = "fsobasics.h")]
public delegate void KObjectNotifierFunc (GLib.HashTable<string,string> properties);
[CCode (cheader_filename = "fsobasics.h")]
public delegate void NetlinkNotifierFunc (GLib.HashTable<string,string> properties);
[CCode (cheader_filename = "fsobasics.h")]
public static FsoFramework.SmartKeyFile theConfig;
[CCode (cheader_filename = "fsobasics.h")]
public static FsoFramework.Logger theLogger;
[CCode (cheader_filename = "fsobasics.h")]
public static async void asyncWaitSeconds (int seconds);
[CCode (cheader_filename = "fsobasics.h")]
public static bool typeInherits (GLib.Type subtype, GLib.Type type);
}
[CCode (cheader_filename = "fsobasics.h")]
public class GLibLogger : GLib.Object {
public GLibLogger (FsoFramework.Logger logger);
public void log (string? log_domain, GLib.LogLevelFlags log_level, string message);
}
[CCode (cheader_filename = "fsobasics.h")]
public class AsyncProcess : GLib.Object {
public AsyncProcess ();
public async int launch (GLib.Cancellable? cancel = null, string[] argv) throws GLib.SpawnError;
public void set_stderr_watch (GLib.IOFunc watch, GLib.IOCondition cond = GLib.IOCondition.IN | GLib.IOCondition.HUP, GLib.IOFlags flags = GLib.IOFlags.NONBLOCK);
public void set_stdout_watch (GLib.IOFunc watch, GLib.IOCondition cond = GLib.IOCondition.IN | GLib.IOCondition.HUP, GLib.IOFlags flags = GLib.IOFlags.NONBLOCK);
public string cmd_line { get; }
public int std_in { get; }
}
[CCode (cheader_filename = "fsobasics.h")]
public delegate string ReprDelegate ();
|