<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">On 11/29/2014 08:38 PM, Dmitri Pal
      wrote:<br>
    </div>
    <blockquote cite="mid:547A750F.5070203@redhat.com" type="cite">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      Hello,<br>
      <br>
      I have been working on an interface to modify configuration file
      (yes alternative to augeas) as promised.<br>
      INI supports multi valued keys so the interface needs to be able
      to manage duplicates.<br>
      <br>
      The attached header file contains the prototype of the interface.<br>
      I have implemented value management and about to do the section
      management. That part would be quite simple.<br>
      Before I polish everything up, hook together and start sending
      patches I wanted to make sure the interface is OK and is not
      missing anything.<br>
      <br>
      I was not sure how much of the design page is needed.<br>
      I will probably create one based on this thread with a pointer to
      header file.<br>
      <br>
      The assumption is that:<br>
      - the caller will read an existing configuration object from a
      file or create a configuration object himself. These calls are
      already<big> </big>available for some time.<br>
      - the caller will then add/updated/delete the configuration object
      as he sees fit. This is this interface.<br>
      - the caller then will call already existing serialization
      function that will return a simple buffer object that will contain
      a serialized configuration ready to be stored in a file.<br>
      - the caller can use simple buffer methods to write content of the
      buffer to a file descriptor or just create a file (FILE *), get
      the serialized buffer and write to that file. It is up to the
      caller and there is so far no plan to provide a specific "save
      function" as it is unclear what would be a good function to have.<br>
      <br>
      <br>
      Let me know if any of these assumptions wrong.<br>
      Please take a look at the file, it has doxygen comments. It is a
      sanity check exercise not a thorough review :-).<br>
      The comments refer to collection interface so I included it too
      for easier reading.<br>
    </blockquote>
    <br>
    Please see attached a new version of the header.<br>
    <br>
    Also I wonder if I should provide a way to sort the sections and
    keys in a specific order.<br>
    Would it make sense to have a way to say: <br>
    - sort the keys in sections that match a specific pattern in the
    following way: first keys that match pattern a, then b, then c...
    and then all the rest as they are.<br>
    - sort the sections in such a way that sections with name matching
    the following patter should go first, then other pattern next, then
    other pattern and so on.<br>
    <br>
    Would that will be useful? I think so, but before I spend time on it
    I wanted to double check.<br>
    <br>
    <br>
    <br>
    <blockquote cite="mid:547A750F.5070203@redhat.com" type="cite"> <br>
      <pre class="moz-signature" cols="72">-- 
Thank you,
Dmitri Pal

Sr. Engineering Manager IdM portfolio
Red Hat, Inc.</pre>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
sssd-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:sssd-devel@lists.fedorahosted.org">sssd-devel@lists.fedorahosted.org</a>
<a class="moz-txt-link-freetext" href="https://lists.fedorahosted.org/mailman/listinfo/sssd-devel">https://lists.fedorahosted.org/mailman/listinfo/sssd-devel</a>
</pre>
    </blockquote>
    <br>
    <br>
    <pre class="moz-signature" cols="72">-- 
Thank you,
Dmitri Pal

Sr. Engineering Manager IdM portfolio
Red Hat, Inc.</pre>
  </body>
</html>