2008-04-26 03:20:09 +02:00
|
|
|
|
|
|
|
|
|
|
|
#ifndef FILEINFO_H
|
|
|
|
#define FILEINFO_H
|
|
|
|
|
|
|
|
|
2008-06-06 00:41:50 +02:00
|
|
|
/*!
|
|
|
|
* \file
|
|
|
|
*
|
|
|
|
* \brief UpnpFileInfo object declararion.
|
|
|
|
*
|
|
|
|
* \author Marcelo Roberto Jimenez
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
2008-04-26 03:20:09 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif /* __cplusplus */
|
|
|
|
|
|
|
|
|
2008-05-04 03:36:07 +02:00
|
|
|
/** Detailed description of this class should go here */
|
2008-05-22 19:24:56 +02:00
|
|
|
typedef struct s_UpnpFileInfo UpnpFileInfo;
|
2008-04-26 03:20:09 +02:00
|
|
|
|
|
|
|
|
2008-05-23 23:55:04 +02:00
|
|
|
#include "ixml.h" /* for DOMString */
|
2008-06-06 00:41:50 +02:00
|
|
|
#include "UpnpGlobal.h" /* for EXPORT_SPEC */
|
2008-04-26 03:20:09 +02:00
|
|
|
|
|
|
|
|
2008-05-23 23:55:04 +02:00
|
|
|
#include <sys/types.h> /* for off_t */
|
|
|
|
#include <time.h> /* for time_t */
|
2008-04-26 03:20:09 +02:00
|
|
|
|
|
|
|
|
|
|
|
/** Constructor */
|
2008-06-06 00:41:50 +02:00
|
|
|
EXPORT_SPEC UpnpFileInfo *UpnpFileInfo_new();
|
2008-04-26 03:20:09 +02:00
|
|
|
|
|
|
|
/** Destructor */
|
2008-06-06 00:41:50 +02:00
|
|
|
EXPORT_SPEC void UpnpFileInfo_delete(UpnpFileInfo *p);
|
2008-04-26 03:20:09 +02:00
|
|
|
|
|
|
|
/** Copy Constructor */
|
2008-06-06 00:41:50 +02:00
|
|
|
EXPORT_SPEC UpnpFileInfo *UpnpFileInfo_dup(const UpnpFileInfo *p);
|
2008-04-26 03:20:09 +02:00
|
|
|
|
|
|
|
/** Assignment operator */
|
2008-06-06 00:41:50 +02:00
|
|
|
EXPORT_SPEC void UpnpFileInfo_assign(UpnpFileInfo *q, const UpnpFileInfo *p);
|
2008-04-26 03:20:09 +02:00
|
|
|
|
|
|
|
/** The length of the file. A length less than 0 indicates the size
|
|
|
|
* is unknown, and data will be sent until 0 bytes are returned from
|
|
|
|
* a read call. */
|
2008-06-06 00:41:50 +02:00
|
|
|
EXPORT_SPEC off_t UpnpFileInfo_get_FileLength(const UpnpFileInfo *p);
|
|
|
|
EXPORT_SPEC void UpnpFileInfo_set_FileLength(UpnpFileInfo *p, off_t l);
|
2008-04-26 03:20:09 +02:00
|
|
|
|
|
|
|
/** The time at which the contents of the file was modified;
|
|
|
|
* The time system is always local (not GMT). */
|
2008-06-06 00:41:50 +02:00
|
|
|
EXPORT_SPEC const time_t *UpnpFileInfo_get_LastModified(const UpnpFileInfo *p);
|
|
|
|
EXPORT_SPEC void UpnpFileInfo_set_LastModified(UpnpFileInfo *p, const time_t *t);
|
2008-04-26 03:20:09 +02:00
|
|
|
|
|
|
|
/** If the file is a directory, {\bf is_directory} contains
|
|
|
|
* a non-zero value. For a regular file, it should be 0. */
|
2008-06-06 00:41:50 +02:00
|
|
|
EXPORT_SPEC int UpnpFileInfo_get_IsDirectory(const UpnpFileInfo *p);
|
|
|
|
EXPORT_SPEC void UpnpFileInfo_set_IsDirectory(UpnpFileInfo *p, int b);
|
2008-04-26 03:20:09 +02:00
|
|
|
|
|
|
|
/** If the file or directory is readable, this contains
|
|
|
|
* a non-zero value. If unreadable, it should be set to 0. */
|
2008-06-06 00:41:50 +02:00
|
|
|
EXPORT_SPEC int UpnpFileInfo_get_IsReadable(const UpnpFileInfo *p);
|
|
|
|
EXPORT_SPEC void UpnpFileInfo_set_IsReadable(UpnpFileInfo *p, int b);
|
2008-04-26 03:20:09 +02:00
|
|
|
|
|
|
|
/** The content type of the file. */
|
2008-06-06 00:41:50 +02:00
|
|
|
EXPORT_SPEC const DOMString UpnpFileInfo_get_ContentType(const UpnpFileInfo *p);
|
|
|
|
EXPORT_SPEC void UpnpFileInfo_set_ContentType(UpnpFileInfo *p, const DOMString s);
|
2008-04-26 03:20:09 +02:00
|
|
|
|
|
|
|
/** Additional HTTP headers to return. Each header line should be
|
|
|
|
* followed by "\r\n". */
|
2008-06-06 00:41:50 +02:00
|
|
|
EXPORT_SPEC const DOMString UpnpFileInfo_get_ExtraHeaders(const UpnpFileInfo *p);
|
|
|
|
EXPORT_SPEC void UpnpFileInfo_set_ExtraHeaders(UpnpFileInfo *p, const DOMString s);
|
2008-04-26 03:20:09 +02:00
|
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif /* __cplusplus */
|
|
|
|
|
|
|
|
|
|
|
|
#endif /* FILEINFO_H */
|
|
|
|
|