~morphis/aethercast/enable-arm64-builds

« back to all changes in this revision

Viewing changes to src/w11t/wfddeviceinfo.h

  • Committer: Tarmac
  • Author(s): Simon Fels
  • Date: 2016-02-04 06:38:31 UTC
  • mfrom: (119.1.65 trunk)
  • Revision ID: tarmac-20160204063831-b6q9o8ktznevvd8x
Add a network manager implementation to use the DBus interface of wpa-supplicant.

Approved by PS Jenkins bot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * Copyright (C) 2015 Canonical, Ltd.
3
 
 *
4
 
 * This program is free software: you can redistribute it and/or modify it
5
 
 * under the terms of the GNU General Public License version 3, as published
6
 
 * by the Free Software Foundation.
7
 
 *
8
 
 * This program is distributed in the hope that it will be useful, but
9
 
 * WITHOUT ANY WARRANTY; without even the implied warranties of
10
 
 * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
11
 
 * PURPOSE.  See the GNU General Public License for more details.
12
 
 *
13
 
 * You should have received a copy of the GNU General Public License along
14
 
 * with this program.  If not, see <http://www.gnu.org/licenses/>.
15
 
 *
16
 
 */
17
 
 
18
 
#ifndef WFDDEVICEINFO_H_
19
 
#define WFDDEVICEINFO_H_
20
 
 
21
 
#include <iosfwd>
22
 
#include <string>
23
 
 
24
 
namespace w11t {
25
 
enum class WpsConfig {
26
 
    kDisplay = 0x0008,
27
 
    kPushbutton = 0x0080,
28
 
    kKeypad = 0x0100
29
 
};
30
 
 
31
 
enum class WfdDeviceType {
32
 
    unknown = -1,
33
 
    kSource = 0x0,
34
 
    kPrimarySink = 0x1,
35
 
    kSecondarySink = 0x2,
36
 
    kSourceOrPrimarySink = 0x3
37
 
};
38
 
 
39
 
std::ostream& operator<<(std::ostream &, WfdDeviceType);
40
 
 
41
 
struct WfdDeviceInfo
42
 
{
43
 
    static WfdDeviceType TypeFromInfoFlags(uint flags);
44
 
 
45
 
    static WfdDeviceInfo Parse(const std::string &str);
46
 
 
47
 
    enum Flag {
48
 
        type = 0x3,
49
 
        coupled_sink_support_at_source = 0x4,
50
 
        coupled_sink_support_at_sink = 0x8,
51
 
        session_available = 0x30,
52
 
        session_available_bit1 = 0x10,
53
 
        session_available_bit2 = 0x20
54
 
    };
55
 
 
56
 
    bool IsSupported() const;
57
 
    bool IsSupportedSink() const;
58
 
    bool IsSupportedSource() const;
59
 
 
60
 
    WfdDeviceType device_type_ = WfdDeviceType::unknown;
61
 
    ushort ctrl_port_ = 0;
62
 
    uint max_tput_ = 0;
63
 
};
64
 
}
65
 
#endif