"Fossies" - the Fresh Open Source Software Archive

Member "darktable-3.6.1/src/common/pwstorage/backend_libsecret.h" (10 Sep 2021, 2660 Bytes) of package /linux/misc/darktable-3.6.1.tar.xz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "backend_libsecret.h" see the Fossies "Dox" file reference documentation.

    1 // This file is part of darktable
    2 //
    3 // Copyright (c) 2014 Moritz Lipp <mlq@pwmt.org>.
    4 // Copyright (c) 2016 tobias ellinghaus <me@houz.org>.
    5 //
    6 // Permission is hereby granted, free of charge, to any person obtaining a copy
    7 // of this software and associated documentation files (the "Software"), to deal
    8 // in the Software without restriction, including without limitation the rights
    9 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
   10 // copies of the Software, and to permit persons to whom the Software is
   11 // furnished to do so, subject to the following conditions:
   12 //
   13 // The above copyright notice and this permission notice shall be included in
   14 // all copies or substantial portions of the Software.
   15 //
   16 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
   17 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
   18 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
   19 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
   20 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
   21 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
   22 // THE SOFTWARE.
   23 
   24 #pragma once
   25 
   26 #include <glib.h>
   27 
   28 typedef struct backend_libsecret_context_t
   29 {
   30   int placeholder; // we have to allocate one of these to signal that init didn't fail
   31 } backend_libsecret_context_t;
   32 
   33 /**
   34  * Initializes a new libsecret backend context.
   35  *
   36  * @return The libsecret context
   37  */
   38 const backend_libsecret_context_t *dt_pwstorage_libsecret_new();
   39 
   40 /**
   41  * Destroys the libsecret backend context.
   42  *
   43  * @param context The libsecret context
   44  */
   45 void dt_pwstorage_libsecret_destroy(const backend_libsecret_context_t *context);
   46 
   47 /**
   48  * Store (key,value) pairs.
   49  *
   50  * @param context The libsecret context
   51  * @param slot The name of the slot
   52  * @param attributes List of (key,value) pairs
   53  *
   54  * @return TRUE If function succeeded, otherwise FALSE
   55  */
   56 gboolean dt_pwstorage_libsecret_set(const backend_libsecret_context_t *context, const gchar *slot,
   57                                     GHashTable *attributes);
   58 
   59 /**
   60  * Loads (key, value) pairs
   61  *
   62  * @param context The libsecret context
   63  * @param slot The name of the slot
   64  *
   65  * @return table List of (key,value) pairs
   66  */
   67 GHashTable *dt_pwstorage_libsecret_get(const backend_libsecret_context_t *context, const gchar *slot);
   68 
   69 // modelines: These editor modelines have been set for all relevant files by tools/update_modelines.sh
   70 // vim: shiftwidth=2 expandtab tabstop=2 cindent
   71 // kate: tab-indents: off; indent-width 2; replace-tabs on; indent-mode cstyle; remove-trailing-spaces modified;