aboutsummaryrefslogtreecommitdiffstats
path: root/lib/cosFileTransfer/src/CosFileTransfer.idl
blob: 2eb310478a07bfa544d4d6bcb31647c7b7cb54d3 (plain) (blame)
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
//File: CosFileTransfer.idl 
#ifndef _COS_FILE_TRANSFER_IDL_ 
#define _COS_FILE_TRANSFER_IDL_ 

#include <CosProperty.idl> 
#pragma prefix "omg.org" 

module CosFileTransfer { 
  
  typedef string Istring; 
  typedef Istring ProtocolAddress; 
  typedef long ContentType; 

  const ContentType FTAM_1  = 1; 
  const ContentType FTAM_2  = 2; 
  const ContentType FTAM_3  = 3; 
  const ContentType FTAM_4  = 4; 
  const ContentType FTAM_5  = 5; 
  const ContentType NBS_9   = 6; 
  const ContentType INTAP_1 = 7; 
  
  exception CommandNotImplementedException { Istring reason; }; 
  exception SessionException { Istring reason; }; 
  exception TransferException { Istring reason; }; 
  exception FileNotFoundException { Istring reason; };
  exception RequestFailureException { Istring reason; }; 
  exception IllegalOperationException { Istring reason; }; 

  interface VirtualFileSystem; 

  struct AccessLevel { 
    boolean read; 
    boolean insert; 
    boolean replace; 
    boolean extend; 
    boolean erase; 
    boolean read_attr; 
    boolean change_attr; 
    boolean delete; 
  }; 

  typedef sequence<ProtocolAddress> ProtocolAddressList; 
  
  struct ProtocolSupport { 
    Istring protocol_name; 
    ProtocolAddressList addresses; 
  }; 

  typedef sequence<ProtocolSupport> SupportedProtocolAddresses; 

  interface Directory; 
  interface FileTransferSession; 

  typedef Istring FileName; 
  typedef sequence<FileName> FileNameList; 

  interface File:CosPropertyService::PropertySetDef { 

    readonly attribute FileName name;
    readonly attribute FileNameList complete_file_name; 
    readonly attribute Directory parent; 
    readonly attribute FileTransferSession associated_session; 

  }; 

  enum FileType {nfile, ndirectory}; 
  
  struct FileWrapper { 
    File the_file; 
    FileType file_type; 
  }; 

  typedef sequence<FileWrapper> FileList; 

  interface FileIterator; 
  interface Directory : File { 

    void list(in unsigned long how_many, out FileList fl, out FileIterator fi); 

  }; 

  interface FileIterator { 
    
    boolean next_one(out FileWrapper f); 
    boolean next_n(in unsigned long how_many, out FileList fl); 

    void destroy(); 
  }; 

  interface FileTransferSession { 

    readonly attribute SupportedProtocolAddresses protocols_supported; 

    void set_directory(in Directory new_directory) 
      raises(SessionException, FileNotFoundException, RequestFailureException, 
	     IllegalOperationException); 

    File create_file(in FileNameList name) 
      raises(SessionException, FileNotFoundException, RequestFailureException, 
	     IllegalOperationException);

    Directory create_directory(in FileNameList name) 
      raises(SessionException, FileNotFoundException, RequestFailureException, 
	     IllegalOperationException); 

    FileWrapper get_file(in FileNameList complete_file_name) 
      raises(SessionException, FileNotFoundException, RequestFailureException, 
	     IllegalOperationException); 

    void delete(in File file) 
      raises(SessionException, FileNotFoundException, RequestFailureException,
	     IllegalOperationException); 

    void transfer(in File src, in File dest) 
      raises(SessionException, TransferException, FileNotFoundException, 
	     RequestFailureException, IllegalOperationException); 

    void append(in File src, in File dest) 
      raises(CommandNotImplementedException, SessionException, TransferException, 
	     FileNotFoundException, RequestFailureException, 
	     IllegalOperationException); 

    void insert(in File src, in File dest, in long offset) 
      raises(CommandNotImplementedException, SessionException, TransferException, 
	     FileNotFoundException, RequestFailureException, 
	     IllegalOperationException); 

    void logout();
    
    // WARNING!!!
    // Theses are Orber specific operations and may only be used internally!!
    // Maybe removed, altered and changed in any way without warning!!
    Directory oe_orber_create_directory_current() 
      raises(SessionException, FileNotFoundException, IllegalOperationException); 
    FileList oe_orber_get_content(in FileNameList complete_file_name,
				  in Directory parent); 
    long oe_orber_count_children(in FileNameList complete_file_name); 

  }; 

  interface VirtualFileSystem { 

    enum NativeFileSystemType { FTAM, FTP, NATIVE }; 

    readonly attribute NativeFileSystemType file_system_type; 

    typedef sequence<ContentType> ContentList; 
    
    readonly attribute ContentList supported_content_types; 

    FileTransferSession login(in Istring username, in Istring password, 
			      in Istring account, out Directory root) 
      raises(SessionException, FileNotFoundException, IllegalOperationException); 
  }; 
}; 

#endif //_COS_FILE_TRANSFER_IDL_