Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
PrivatePosix.h
Go to the documentation of this file.
1 #ifndef _sys_posix_PrivatePosix_h
2 #define _sys_posix_PrivatePosix_h
3 
4 /*
5  *
6  * Licensed to the Apache Software Foundation (ASF) under one
7  * or more contributor license agreements. See the NOTICE file
8  * distributed with this work for additional information
9  * regarding copyright ownership. The ASF licenses this file
10  * to you under the Apache License, Version 2.0 (the
11  * "License"); you may not use this file except in compliance
12  * with the License. You may obtain a copy of the License at
13  *
14  * http://www.apache.org/licenses/LICENSE-2.0
15  *
16  * Unless required by applicable law or agreed to in writing,
17  * software distributed under the License is distributed on an
18  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
19  * KIND, either express or implied. See the License for the
20  * specific language governing permissions and limitations
21  * under the License.
22  *
23  */
24 
25 #include "qpid/sys/Time.h"
26 #include "qpid/sys/IOHandle.h"
27 
28 struct timespec;
29 struct timeval;
30 struct addrinfo;
31 
32 namespace qpid {
33 namespace sys {
34 
35 // Private Time related implementation details
36 struct timespec& toTimespec(struct timespec& ts, const Duration& t);
37 struct timeval& toTimeval(struct timeval& tv, const Duration& t);
38 Duration toTime(const struct timespec& ts);
39 
40 // Private SocketAddress details
41 class SocketAddress;
42 const struct addrinfo& getAddrInfo(const SocketAddress&);
43 
44 // Private fd related implementation details
46 public:
47  IOHandlePrivate(int f = -1) :
48  fd(f)
49  {}
50 
51  int fd;
52 };
53 
54 int toFd(const IOHandlePrivate* h);
55 
56 // Posix fd as an IOHandle
57 class PosixIOHandle : public IOHandle {
58 public:
59  PosixIOHandle(int fd) :
60  IOHandle(new IOHandlePrivate(fd))
61  {}
62 };
63 
64 // Dummy IOHandle for places it's required in the API
65 // but we promise not to actually try to do any operations on the IOHandle
66 class NullIOHandle : public IOHandle {
67 public:
70  {}
71 };
72 
73 extern NullIOHandle DummyIOHandle;
74 
75 }}
76 
77 #endif

Qpid C++ API Reference
Generated on Thu Nov 15 2012 for Qpid C++ Client API by doxygen 1.8.1.2