blob: 01ecacc983d8fe9fce321920d59913c4d8b7a362 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
// -*- C++ -*-
//=============================================================================
/**
* @file Iterator_Factory_i.h
*
* $Id$
*
* Header file for the Web_Server::Iterator_Factory implementation.
*
*
* @author Ossama Othman <ossama@uci.edu>
*/
//=============================================================================
#ifndef ITERATOR_FACTORY_I_H
#define ITERATOR_FACTORY_I_H
#include "Web_ServerS.h"
#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
#include "ace/OS_NS_sys_stat.h"
// Forward declarations
class Content_Iterator_i;
/**
* @class Iterator_Factory_i
*
* @brief Factory that creates a Content_Iterator that retrieves fixed
* size chunks of data from Content server.
*
* This class creates a Content_Iterator that is set up to
* iteratively download a specific file. This same factory can
* be used to create Content_Iterators for other files.
*/
class Iterator_Factory_i : virtual public POA_Web_Server::Iterator_Factory
{
public:
/**
* This factory method returns a <Content_Iterator> that can be used
* to read the <contents> associated with <pathname> one ``chunk''
* at a time. The <metadata> reports information about the
* <contents>.
*/
virtual void get_iterator (const char *pathname,
Web_Server::Content_Iterator_out contents,
Web_Server::Metadata_Type_out metadata);
/// Set the file modification date in the metadata structure.
int modification_date (ACE_stat *file_status,
Web_Server::Metadata_Type_out metadata);
/// Set the type of file content in the metadata structure.
int content_type (const char *filename,
Web_Server::Metadata_Type_out metadata);
};
#endif /* ITERATOR_FACTORY_I_H */
|