NAVTOR SDK  v.3.0
Software Development Kit for fast and efficient development of ECDIS, ECS and generic marine applications
gdb_stream.h
Go to the documentation of this file.
1 
9 #ifndef SDK_GDB_STREAM_H_
10 #define SDK_GDB_STREAM_H_
11 #pragma once
12 
13 #include <base/inc/base_types.h>
14 #include <base/inc/sdk_ref_ptr.h>
16 #include <datalayer/inc/senc/cryptor_interface.h>
18 
19 namespace sdk {
20 namespace gdb {
21 
22 // Classes declared in this file.
23 FWD_DECL_INTERFACE(IGDBStream);
24 
27 class IGDBStream : public ISDKComponent {
28 public:
30  virtual GDBResult SDK_CALLTYPE Open() throw() = 0;
32  virtual GDBResult SDK_CALLTYPE IsOpened() throw() = 0;
34  virtual GDBResult SDK_CALLTYPE Close() throw() = 0;
35 
38  virtual GDBResult SDK_CALLTYPE Read(SDKUInt8* buffer, SDKUInt64 buffer_size,
39  bool is_encrypted, bool is_compressed) throw() = 0;
40 
43  virtual GDBResult SDK_CALLTYPE Read(SDKUInt64 bytes_to_read,
44  ICryptor* cryptor, // bool is_encrypted, bool is_compressed,
45  sdk::base::ISDKStream* out_stream) throw() = 0;
46 
48  virtual GDBResult SDK_CALLTYPE Read(
49  sdk::base::ISDKStream* out_stream) throw() = 0;
50 
52  virtual GDBResult SDK_CALLTYPE SetPos(SDKUInt64 pos) throw() = 0;
53 
55  virtual GDBResult SDK_CALLTYPE GetPos(SDKUInt64& pos) throw() = 0;
56 
58  virtual GDBResult SDK_CALLTYPE GetSize(
59  SDKUInt64& file_size) const throw() = 0;
60 
62  virtual GDBResult SDK_CALLTYPE GetFlags(SDKUInt8& flags) const throw() = 0;
63 
65  virtual GDBResult SDK_CALLTYPE GetDescription(
66  ISDKComponentSP& descr) const throw() = 0;
67 
68  SDK_IMPLEMENT_IID(IGDBStream)
69  SDK_END_INTERFACE(IGDBStream)
70 };
71 SDK_DECLARE_IID(IGDBStream)
72 
73 } // namespace gdb
74 } // namespace sdk
75 
76 #endif // SDK_GDB_STREAM_H_
sdk::gdb::IGDBStream::GetPos
virtual GDBResult SDK_CALLTYPE GetPos(SDKUInt64 &pos)=0
Gets the current position in stream.
sdk::gdb::IGDBStream::IsOpened
virtual GDBResult SDK_CALLTYPE IsOpened()=0
Tells if stream resource is opened or not.
base_types.h
SDK base types.
sdk::gdb::IGDBStream::GetSize
virtual GDBResult SDK_CALLTYPE GetSize(SDKUInt64 &file_size) const =0
Gets the size of the file associated with the stream.
sdk_ref_ptr.h
Interfaces wrapper with reference count control.
generic_resource_interface.h
Generic data resource interfaces.
sdk::gdb::IGDBStream::Open
virtual GDBResult SDK_CALLTYPE Open()=0
Opens connected to stream resource.
sdk::base::ISDKStream
Generic data stream interface.
Definition: stream_interface.h:32
sdk::gdb::IGDBStream::GetFlags
virtual GDBResult SDK_CALLTYPE GetFlags(SDKUInt8 &flags) const =0
Gets the flags of the stream.
sdk::gdb::IGDBStream::Close
virtual GDBResult SDK_CALLTYPE Close()=0
Closes a stream.
sdk::gdb::IGDBStream::SetPos
virtual GDBResult SDK_CALLTYPE SetPos(SDKUInt64 pos)=0
Sets current position in stream.
sdk::gdb::IGDBStream
Geodatabase stream.
Definition: gdb_stream.h:27
gdb_const.h
Geo database constants and structures.
ISDKComponent
Base interface for all SDK interfaces.
Definition: sdk_component_interface.h:41
sdk::gdb::IGDBStream::Read
virtual GDBResult SDK_CALLTYPE Read(SDKUInt8 *buffer, SDKUInt64 buffer_size, bool is_encrypted, bool is_compressed)=0
Reads specified number of bytes to the specified buffer from the current position and unpacks them.
sdk::gdb::IGDBStream::GetDescription
virtual GDBResult SDK_CALLTYPE GetDescription(ISDKComponentSP &descr) const =0
Gets description of the stream.
FWD_DECL_INTERFACE
FWD_DECL_INTERFACE(ILWEParserWrapper)
Provides a wrapper around the message parser to get, add or remove the.