/* gcc $(pkg-config --cflags --libs libsecret-1) secret.c */

#include <libsecret/secret.h>

static const SecretSchema schema =
  {
    "se.lostca.is.rishi.secret", SECRET_SCHEMA_DONT_MATCH_NAME,
    {
      { "rishi-identity", SECRET_SCHEMA_ATTRIBUTE_STRING },
      { "NULL", 0 }
    }
  };

int
main (void)
{
  g_type_init ();

  if (!secret_password_store_sync (&schema,
                                   SECRET_COLLECTION_DEFAULT,
                                   "Secret Test Credentials",
                                   "pa$$w0rd",
                                   NULL, /* cancellable */
                                   NULL, /* error */
                                   "rishi-identity", "rishi-identity",
                                   NULL))
    g_message ("failed to store");

  return 0;
}
