summaryrefslogtreecommitdiff
path: root/ACE/TAO/examples/Content_Server/AMI_Iterator/Web_Server.idl
blob: f669e39d98c41dc299e8a74ded40757757cbac7b (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
// $Id$

module Web_Server
// = TITLE
// IDL schema definition for Web server interface.
{
  typedef sequence<octet> Chunk_Type;

  interface Content_Iterator
  {
    // This operation returns the next <chunk> of the
    // file starting at <offset>.  If there are
    // no more bindings, false is returned.
    boolean next_chunk (in unsigned long long offset,
                        out Chunk_Type chunk);

    // This operation destroys the iterator.
    void destroy ();
  };

  exception Error_Result {
    // Status of the <get_iterator> operation.  These
    // values should map onto the normal HTTP
    // status values, e.g., 200 means success, 404
    // means "file not found," etc.
    short status;
 };

  struct Metadata_Type
  {
    // Modification date.
    string modification_date;

    // Type of content.
    string content_type;
  };

  interface Iterator_Factory
  {
    // 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>.
    void get_iterator (in string pathname,
                       out Content_Iterator contents,
                       out Metadata_Type metadata)
      raises (Error_Result);
  };
};