#ifndef UI_BASE_TOUCH_MULTI_TOUCH_DEVICE_H
#define UI_BASE_TOUCH_MULTI_TOUCH_DEVICE_H

#include "ui/base/touch/axis.h"

#include <iostream>
#include <map>
#include <string>
#include <vector>

namespace ui {

class MultiTouchDevice {
 public:

  typedef std::map<Axis::Type,Axis> Axes;
  
  enum Type {
    DIRECT_TOUCH_DEVICE_TYPE,
    DEPENDENT_TOUCH_DEVICE_TYPE,
    INDEPENDENT_TOUCH_DEVICE_TYPE,
    SEMI_MULTI_TOUCH_DEVICE_TYPE,
    UNKNOWN_TOUCH_DEVICE_TYPE
  };

  MultiTouchDevice()
      : id_(-1),
        name_("Invalid touch device"),
        type_(UNKNOWN_TOUCH_DEVICE_TYPE),
        max_num_touches_(0),
        window_resolution_x_(0.f),
        window_resolution_y_(0.f) {
  }

  int id() const { return id_; }
  void set_id(int id) { id_ = id; }
  
  const std::string & name() const { return name_; }
  void set_name(const std::string& name) { name_ = name; }
  
  Type type() const { return type_; }
  void set_type(Type type) { type_ = type; }
  
  uint32_t max_num_touches() const { return max_num_touches_; }
  void set_max_num_touches(uint32_t num) { max_num_touches_ = num; }
  
  uint32_t num_axes() const { return axes_.size(); }

  const Axes & axes() const { return axes_; }
  void set_axes(const Axes & axes) { axes_ = axes; }
  
  float window_resolution_x() const { return window_resolution_x_; }
  void set_window_resolution_x(float res) { window_resolution_x_ = res; }

  float window_resolution_y() const { return window_resolution_y_; }
  void set_window_resolution_y(float res) { window_resolution_y_ = res; }

 private:
  int id_;
  std::string name_;
  Type type_;
  uint32_t max_num_touches_;
  Axes axes_;
  float window_resolution_x_;
  float window_resolution_y_;

  // DISALLOW_COPY_AND_ASSIGN(MultiTouchDevice);
};

std::ostream & operator<<(std::ostream & out, const MultiTouchDevice& device);

}

#endif // UI_BASE_TOUCH_MULTI_TOUCH_DEVICE_H
