Apache Qpid C++ API
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/framing/ProtocolVersion.h"
00028 #include "qpid/framing/MethodContent.h"
00029 #include "qpid/framing/TransferContent.h"
00030 #include "qpid/client/Completion.h"
00031 #include "qpid/client/ConnectionImpl.h"
00032 #include "qpid/client/Execution.h"
00033 #include "qpid/client/SessionImpl.h"
00034 #include "qpid/client/TypedResult.h"
00035 #include "qpid/shared_ptr.h"
00036 #include <string>
00037 
00038 namespace qpid {
00039 namespace client {
00040 
00041 class Connection;
00042 
00043 using std::string;
00044 using framing::Content;
00045 using framing::FieldTable;
00046 using framing::MethodContent;
00047 using framing::SequenceNumber;
00048 using framing::SequenceSet;
00049 using framing::SequenceNumberSet;
00050 using qpid::SessionId;
00051 using framing::Xid;
00052 
00054 enum CreditUnit { MESSAGE_CREDIT=0, BYTE_CREDIT=1, UNLIMITED_CREDIT=0xFFFFFFFF };
00055 
00062 class SessionBase_0_10 {
00063   public:
00064     
00065     typedef framing::TransferContent DefaultContent;
00066 
00068     SessionBase_0_10();
00069     ~SessionBase_0_10();
00070 
00072     framing::FrameSet::shared_ptr get();
00073     
00075     SessionId getId() const;         
00076 
00080     void close();
00081     
00091     void sync();
00092 
00094     uint32_t timeout(uint32_t seconds);
00095 
00097     void suspend();
00098 
00100     void resume(Connection);
00101 
00103     uint16_t getChannel() const;
00104 
00105     Execution& getExecution();  
00106     void flush();
00107     void markCompleted(const framing::SequenceSet& ids, bool notifyPeer);
00108     void markCompleted(const framing::SequenceNumber& id, bool cumulative, bool notifyPeer);
00109     void sendCompletion();
00110 
00111     bool isValid() const;
00112 
00113   protected:
00114     boost::shared_ptr<SessionImpl> impl;
00115   friend class SessionBase_0_10Access;
00116 };
00117 
00118 }} // namespace qpid::client
00119 
00120 #endif  

Qpid C++ API Reference
Generated on Tue Dec 8 15:39:36 2009 for Qpid C++ Client API by doxygen 1.4.7