]> git.proxmox.com Git - ceph.git/blob - ceph/src/auth/AuthMethodList.h
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / auth / AuthMethodList.h
1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab
3 /*
4 * Ceph - scalable distributed file system
5 *
6 * Copyright (C) 2004-2009 Sage Weil <sage@newdream.net>
7 *
8 * This is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License version 2.1, as published by the Free Software
11 * Foundation. See file COPYING.
12 *
13 */
14
15 #ifndef CEPH_AUTHMETHODLIST_H
16 #define CEPH_AUTHMETHODLIST_H
17
18 #include "include/int_types.h"
19
20 #include <list>
21 #include <set>
22 #include <string>
23
24 class CephContext;
25
26 class AuthMethodList {
27 std::list<__u32> auth_supported;
28 public:
29 AuthMethodList(CephContext *cct, std::string str);
30
31 bool is_supported_auth(int auth_type);
32 int pick(const std::set<__u32>& supported);
33
34 const std::list<__u32>& get_supported_set() const {
35 return auth_supported;
36 }
37
38 void remove_supported_auth(int auth_type);
39 };
40
41
42 #endif