Skip to content
  • Lubomir Rintel's avatar
    libnm-core/utils: add some special properties for the attributes · 47b1dc38
    Lubomir Rintel authored
    "no_value" indicates that the the attribute is a single word, not a
    key=value pair. If the type is BOOLEAN then the attribute is considered
    true, if it's a STRING then the key is used instead of a value.
    
    "consumes_rest" indicates that the particular key takes the unparseable
    tail of the string for a value.
    
    This allows parsing tc-style strings. Consider this filter:
    
                  ,------ regular key/value pair
           ,-----'----.
      root handle 1234: matchall action simple foo bar baz
        |                  |     `-----------.-----------'
        |                  |                 `- "", STRING, consumes_rest
        |                  `------------------- "kind", STRING, no_value
        `-------------------------------------- "root', BOOLEAN, no_value
    47b1dc38