2
* librest - RESTful web services access
3
* Copyright (c) 2010 Intel Corporation.
5
* Authors: Ross Burton <ross@linux.intel.com>
6
* Rob Bradford <rob@linux.intel.com>
8
* RestParam is inspired by libsoup's SoupBuffer
9
* Copyright (C) 2000-2030 Ximian, Inc
11
* This program is free software; you can redistribute it and/or modify it
12
* under the terms and conditions of the GNU Lesser General Public License,
13
* version 2.1, as published by the Free Software Foundation.
15
* This program is distributed in the hope it will be useful, but WITHOUT ANY
16
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
20
* You should have received a copy of the GNU Lesser General Public License
21
* along with this program; if not, write to the Free Software Foundation,
22
* Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
29
#include <glib-object.h>
35
* @REST_MEMORY_STATIC: the memory block can be assumed to always exist for the
36
* lifetime of the parameter, #RestParam will use it directly.
37
* @REST_MEMORY_TAKE: #RestParam will take ownership of the memory block, and
38
* g_free() it when it isn't used.
39
* @REST_MEMORY_COPY: #RestParam will make a copy of the memory block.
48
typedef struct _RestParam RestParam;
50
RestParam *rest_param_new_string (const char *name,
54
RestParam *rest_param_new_full (const char *name,
58
const char *content_type,
59
const char *filename);
61
RestParam *rest_param_new_with_owner (const char *name,
64
const char *content_type,
67
GDestroyNotify owner_dnotify);
70
gboolean rest_param_is_string (RestParam *param);
72
const char *rest_param_get_name (RestParam *param);
73
const char *rest_param_get_content_type (RestParam *param);
74
const char *rest_param_get_file_name (RestParam *param);
75
gconstpointer rest_param_get_content (RestParam *param);
76
gsize rest_param_get_content_length (RestParam *param);
78
RestParam *rest_param_ref (RestParam *param);
79
void rest_param_unref (RestParam *param);
83
#endif /* _REST_PARAM */