/*
 * Python object wrapper of libgzipf_member_t
 *
 * Copyright (C) 2019-2022, Joachim Metz <joachim.metz@gmail.com>
 *
 * Refer to AUTHORS for acknowledgements.
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 */

#if !defined( _PYGZIPF_MEMBER_H )
#define _PYGZIPF_MEMBER_H

#include <common.h>
#include <types.h>

#include "pygzipf_libgzipf.h"
#include "pygzipf_python.h"

#if defined( __cplusplus )
extern "C" {
#endif

typedef struct pygzipf_member pygzipf_member_t;

struct pygzipf_member
{
	/* Python object initialization
	 */
	PyObject_HEAD

	/* The libgzipf member
	 */
	libgzipf_member_t *member;

	/* The parent object
	 */
	PyObject *parent_object;
};

extern PyMethodDef pygzipf_member_object_methods[];
extern PyTypeObject pygzipf_member_type_object;

PyObject *pygzipf_member_new(
           libgzipf_member_t *member,
           PyObject *parent_object );

int pygzipf_member_init(
     pygzipf_member_t *pygzipf_member );

void pygzipf_member_free(
      pygzipf_member_t *pygzipf_member );

PyObject *pygzipf_member_get_modification_time(
           pygzipf_member_t *pygzipf_member,
           PyObject *arguments );

PyObject *pygzipf_member_get_modification_time_as_integer(
           pygzipf_member_t *pygzipf_member,
           PyObject *arguments );

PyObject *pygzipf_member_get_name(
           pygzipf_member_t *pygzipf_member,
           PyObject *arguments );

PyObject *pygzipf_member_get_comments(
           pygzipf_member_t *pygzipf_member,
           PyObject *arguments );

PyObject *pygzipf_member_get_operating_system(
           pygzipf_member_t *pygzipf_member,
           PyObject *arguments );

#if defined( __cplusplus )
}
#endif

#endif /* !defined( _PYGZIPF_MEMBER_H ) */

