CppCMS
|
00001 // 00002 // Copyright (C) 2009-2012 Artyom Beilis (Tonkikh) 00003 // 00004 // Distributed under the Boost Software License, Version 1.0. (See 00005 // accompanying file LICENSE_1_0.txt or copy at 00006 // http://www.boost.org/LICENSE_1_0.txt) 00007 // 00008 #ifndef BOOSTER_ERROR_CATEGORY_H 00009 #define BOOSTER_ERROR_CATEGORY_H 00010 00011 00012 #include <booster/system_error.h> 00013 00014 namespace booster { 00015 namespace aio { 00016 00020 namespace aio_error { 00021 enum { 00022 ok, 00023 canceled, 00024 select_failed, 00025 eof, 00026 invalid_endpoint, 00027 no_service_provided, 00028 prefork_not_enabled 00029 }; 00030 00034 class BOOSTER_API category : public system::error_category { 00035 public: 00037 virtual char const *name() const; 00039 virtual std::string message(int cat) const; 00040 }; 00041 00045 BOOSTER_API aio_error::category const &get_category(); 00046 } 00047 00051 static aio_error::category const &aio_error_cat = aio_error::get_category(); 00052 } 00053 } // booster 00054 00055 00056 #endif