qpid/SessionId.h Source File

Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET | Apache Qpid Documentation

- Main Page
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

qpid/SessionId.h
Go to the documentation of this file.

    00001 #ifndef QPID_SESSIONID_H
    00002 #define QPID_SESSIONID_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 <boost/operators.hpp>
    00026 #include <string>
    00027 #include <qpid/CommonImportExport.h>
    00028
    00029 namespace qpid {
    00030
    00042 class SessionId : boost::totally_ordered1<SessionId> {
    00043     std::string userId;
    00044     std::string name;
    00045   public:
    00046     QPID_COMMON_EXTERN SessionId(const std::string& userId=std::string(), const std::string& name=std::string());
    00047     std::string getUserId() const { return userId; }
    00048     std::string getName() const { return name; }
    00049     QPID_COMMON_EXTERN bool operator<(const SessionId&) const ;
    00050     QPID_COMMON_EXTERN bool operator==(const SessionId& id) const;
    00051     // Convert to a string
    00052     QPID_COMMON_EXTERN std::string str() const;
    00053 };
    00054
    00055 QPID_COMMON_EXTERN std::ostream& operator<<(std::ostream&, const SessionId&);
    00056
    00057
    00058 } // namespace qpid
    00059
    00060 #endif