gnunet-android

GNUnet for Android
Log | Files | Refs | README

gnunet_gnsrecord_json_lib.h (2149B)


      1 /*
      2      This file is part of GNUnet
      3      Copyright (C) 2012, 2013 GNUnet e.V.
      4 
      5      GNUnet is free software: you can redistribute it and/or modify it
      6      under the terms of the GNU Affero General Public License as published
      7      by the Free Software Foundation, either version 3 of the License,
      8      or (at your option) any later version.
      9 
     10      GNUnet is distributed in the hope that it will be useful, but
     11      WITHOUT ANY WARRANTY; without even the implied warranty of
     12      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
     13      Affero General Public License for more details.
     14 
     15      You should have received a copy of the GNU Affero General Public License
     16      along with this program.  If not, see <http://www.gnu.org/licenses/>.
     17 
     18      SPDX-License-Identifier: AGPL3.0-or-later
     19  */
     20 
     21 /**
     22  * @addtogroup GNS
     23  * @{
     24  *
     25  * @author Martin Schanzenbach
     26  *
     27  * @file
     28  * API that can be used to manipulate JSON GNS record data
     29  *
     30  * @defgroup gnsrecord  GNS Record library
     31  * Manipulate GNS record data
     32  *
     33  * @see [Documentation](https://gnunet.org/gns-plugins)
     34  *
     35  * @{
     36  */
     37 #ifndef GNUNET_GNSRECORD_JSON_LIB_H
     38 #define GNUNET_GNSRECORD_JSON_LIB_H
     39 
     40 
     41 #include "gnunet_gnsrecord_lib.h"
     42 #include "gnunet_json_lib.h"
     43 
     44 #ifdef __cplusplus
     45 extern "C" {
     46 #if 0 /* keep Emacsens' auto-indent happy */
     47 }
     48 #endif
     49 #endif
     50 
     51 
     52 /**
     53  * JSON Specification for GNS Records.
     54  *
     55  * @param gnsrecord_object struct of GNUNET_GNSRECORD_Data to fill
     56  * @return JSON Specification
     57  */
     58 struct GNUNET_JSON_Specification
     59 GNUNET_GNSRECORD_JSON_spec_gnsrecord (struct GNUNET_GNSRECORD_Data **rd,
     60                             unsigned int *rd_count,
     61                             char **name);
     62 
     63 
     64 /**
     65  * Convert GNS record to JSON.
     66  *
     67  * @param rname name of record
     68  * @param rd record data
     69  * @return corresponding JSON encoding
     70  */
     71 json_t *
     72 GNUNET_GNSRECORD_JSON_from_gnsrecord (const char*rname,
     73                             const struct GNUNET_GNSRECORD_Data *rd,
     74                             unsigned int rd_count);
     75 
     76 #if 0 /* keep Emacsens' auto-indent happy */
     77 {
     78 #endif
     79 #ifdef __cplusplus
     80 }
     81 #endif
     82 
     83 #endif
     84 
     85 /** @} */ /* end of group */
     86 
     87 /** @} */ /* end of group addition */