Re: New simpler gnome-keyring API



Hi,

Stef Walter wrote:
A new simpler GNOME keyring API is now committed to trunk. It has API
documentation in SVN and is described here:

http://live.gnome.org/GnomeKeyring/StoringPasswords [1]

If anyone wants contribute ideas or make suggestions before its set in
stone, please feel free.


Thanks! This looks great.

Two suggestions:

 - the docs don't really explain what the NETWORK_PASSWORD,
   GENERIC_SECRET, NOTE thing is for. My understanding
   is that basically everyone should use GENERIC_SECRET?

 - more pie-in-the-sky, it *might* (or might not) be
   clearer/simpler to do the API as follows:

    schema = gnome_keyring_item_schema_new(
       GNOME_KEYRING_ITEM_GENERIC_SECRET,
       GNOME_KEYRING_DEFAULT,
       _("My special password"),
       "login", GNOME_KEYRING_ATTRIBUTE_TYPE_STRING,
       "server", GNOME_KEYRING_ATTRIBUTE_TYPE_STRING,
       NULL);

    gnome_keyring_store_password(schema,
                                 "the-password",
                                 stored_password, NULL, NULL,
                                 "login", "me",
                                 "server", "gnome.org",
                                 NULL);
    gnome_keyring_find_password(schema, found_password,
                                NULL, NULL,
                                "login", "me",
                                "server", "gnome.org",
                                NULL);

    the main virtue I guess is just having slightly less
    arguments, especially to store_password, but obviously
    there are downsides too like memory-managing the
    schema thingy. It's just an idea I haven't thought
    about too much.

Havoc



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]