[7297] Fixed profession spells sorting in trainer spell list at client.
[getmangos.git] / dep / ACE_wrappers / ace / ATM_Stream.h
blob41ffb0da32e7687a69ea89cf82a848153a01c624
1 /* -*- C++ -*- */
3 //=============================================================================
4 /**
5 * @file ATM_Stream.h
7 * $Id: ATM_Stream.h 80826 2008-03-04 14:51:23Z wotte $
9 * @author Joe Hoffert
11 //=============================================================================
14 #ifndef ACE_ATM_STREAM_H
15 #define ACE_ATM_STREAM_H
16 #include /**/ "ace/pre.h"
18 #include /**/ "ace/config-all.h"
20 #if !defined (ACE_LACKS_PRAGMA_ONCE)
21 # pragma once
22 #endif /* ACE_LACKS_PRAGMA_ONCE */
24 #if defined (ACE_HAS_ATM)
26 #include "ace/ATM_Addr.h"
27 #include "ace/ATM_Params.h"
29 #if defined (ACE_WIN32)
30 #include "ace/SOCK_Stream.h"
31 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
32 typedef ACE_SOCK_Stream ATM_Stream;
33 ACE_END_VERSIONED_NAMESPACE_DECL
34 #else
35 #include "ace/TLI_Stream.h"
36 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
37 typedef ACE_TLI_Stream ATM_Stream;
38 ACE_END_VERSIONED_NAMESPACE_DECL
39 #endif
41 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
43 /**
44 * @class ACE_ATM_Stream
46 * @brief Defines the member functions for ACE_ATM_Stream abstraction.
48 class ACE_Export ACE_ATM_Stream
50 public:
51 // = Initialization and termination methods.
52 /// Default constructor.
53 ACE_ATM_Stream (void);
55 // = ATM-specific open and shutdown operations.
56 /// open the stream.
57 int open (ACE_ATM_Params params = ACE_ATM_Params());
59 /// Close down and release resources.
60 int close (void);
62 /// Get the underlying handle.
63 ACE_HANDLE get_handle (void) const;
65 /// Get the underlying stream.
66 ATM_Stream& get_stream (void);
68 /// Get the name of the connected host.
69 char* get_peer_name (void) const;
71 /// Get the VPI and VCI of the stream.
72 int get_vpi_vci (ACE_UINT16 &vpi,
73 ACE_UINT16 &vci) const;
75 /// Recv an n byte buffer from the connected transport mechanism.
76 ssize_t recv (void *buf,
77 size_t n,
78 int *flags = 0) const;
80 /// Send exactly n bytes to the connected transport mechanism.
81 ssize_t send_n (const void *buf,
82 size_t n,
83 int flags) const;
85 // = Meta-type info
86 typedef ACE_ATM_Addr PEER_ADDR;
88 /// Dump the state of an object.
89 void dump (void) const;
91 /// Declare the dynamic allocation hooks.
92 ACE_ALLOC_HOOK_DECLARE;
94 private:
95 /// Typedef'd to the appropriate stream mechanism above.
96 ATM_Stream stream_;
99 ACE_END_VERSIONED_NAMESPACE_DECL
101 #if defined (__ACE_INLINE__)
102 #include "ace/ATM_Stream.inl"
103 #endif /* __ACE_INLINE__ */
105 #endif /* ACE_HAS_ATM */
106 #include /**/ "ace/post.h"
107 #endif /* ACE_ATM_STREAM_H */