Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/client/SessionBase_0_10.h
Go to the documentation of this file.
00001 #ifndef QPID_CLIENT_SESSIONBASE_H
00002 #define QPID_CLIENT_SESSIONBASE_H
00003 
00004 /*
00005  *
00006  * Licensed to the Apache Software Foundation (ASF) under one
00007  * or more contributor license agreements.  See the NOTICE file
00008  * distributed with this work for additional information
00009  * regarding copyright ownership.  The ASF licenses this file
00010  * to you under the Apache License, Version 2.0 (the
00011  * "License"); you may not use this file except in compliance
00012  * with the License.  You may obtain a copy of the License at
00013  *
00014  *   http://www.apache.org/licenses/LICENSE-2.0
00015  *
00016  * Unless required by applicable law or agreed to in writing,
00017  * software distributed under the License is distributed on an
00018  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00019  * KIND, either express or implied.  See the License for the
00020  * specific language governing permissions and limitations
00021  * under the License.
00022  *
00023  */
00024 
00025 #include "qpid/SessionId.h"
00026 #include "qpid/framing/amqp_structs.h"
00027 #include "qpid/client/Message.h"
00028 #include "qpid/client/Completion.h"
00029 #include "qpid/client/TypedResult.h"
00030 #include "qpid/client/ClientImportExport.h"
00031 #include <string>
00032 
00033 namespace qpid {
00034 namespace client {
00035 
00036 class Connection;
00037 class SessionImpl;
00038 
00039 using qpid::framing::Content;
00040 using qpid::framing::FieldTable;
00041 using qpid::framing::SequenceNumber;
00042 using qpid::framing::SequenceSet;
00043 using qpid::framing::SequenceNumberSet;
00044 using qpid::SessionId;
00045 using qpid::framing::Xid;
00046 
00048 enum CreditUnit { MESSAGE_CREDIT=0, BYTE_CREDIT=1, UNLIMITED_CREDIT=0xFFFFFFFF };
00049 
00056 class QPID_CLIENT_CLASS_EXTERN SessionBase_0_10 {
00057   public:
00058 
00060     QPID_CLIENT_EXTERN SessionBase_0_10();
00061     QPID_CLIENT_EXTERN ~SessionBase_0_10();
00062 
00064     QPID_CLIENT_EXTERN SessionId getId() const;
00065 
00069     QPID_CLIENT_EXTERN void close();
00070 
00080     QPID_CLIENT_EXTERN void sync();
00081 
00083     QPID_CLIENT_EXTERN uint32_t timeout(uint32_t seconds);
00084 
00086     QPID_CLIENT_EXTERN void suspend();
00087 
00089     QPID_CLIENT_EXTERN void resume(Connection);
00090 
00092     QPID_CLIENT_EXTERN uint16_t getChannel() const;
00093 
00094     QPID_CLIENT_EXTERN void flush();
00095     QPID_CLIENT_EXTERN void markCompleted(const framing::SequenceSet& ids, bool notifyPeer);
00096     QPID_CLIENT_EXTERN void markCompleted(const framing::SequenceNumber& id, bool cumulative, bool notifyPeer);
00097     QPID_CLIENT_EXTERN void sendCompletion();
00098 
00099     QPID_CLIENT_EXTERN bool isValid() const;
00100 
00101     QPID_CLIENT_EXTERN Connection getConnection();
00102   protected:
00103     boost::shared_ptr<SessionImpl> impl;
00104   friend class SessionBase_0_10Access;
00105 };
00106 
00107 }} // namespace qpid::client
00108 
00109 #endif  

Qpid C++ API Reference
Generated on Thu Aug 23 2012 for Qpid C++ Client API by doxygen 1.7.5