Numworks Epsilon  1.4.1
Graphing Calculator Operating System
url_descriptor.h
Go to the documentation of this file.
1 #ifndef ION_DEVICE_USB_STACK_URL_DESCRIPTOR_H
2 #define ION_DEVICE_USB_STACK_URL_DESCRIPTOR_H
3 
4 #include "descriptor.h"
5 
6 namespace Ion {
7 namespace USB {
8 namespace Device {
9 
10 class URLDescriptor : public Descriptor {
11 public:
12  enum class Scheme {
13  HTTP = 0,
14  HTTPS = 1,
15  IncludedInURL = 255
16  };
17 
18  constexpr URLDescriptor(Scheme scheme, const char * url) :
19  Descriptor(0x03),
20  m_bScheme((uint8_t)scheme),
21  m_string(url)
22  {
23  }
24 protected:
25  void push(Channel * c) const override;
26  virtual uint8_t bLength() const override;
27 private:
28  uint8_t m_bScheme;
29  const char * m_string;
30 };
31 
32 }
33 }
34 }
35 
36 #endif
constexpr URLDescriptor(Scheme scheme, const char *url)
unsigned char uint8_t
Definition: stdint.h:4
c(generic_all_nodes)
virtual uint8_t bLength() const override
Definition: app.cpp:5
void push(Channel *c) const override
Definition: backlight.h:6