o
    €Ï>  ã                   @   s(   d Z ddlZdd„ Zdd„ Zdd„ ZdS )	z¨Implements interface for talking to hid devices.

This module implenets an interface for talking to low level hid devices
using various methods on different platforms.
é    Nc                   C   s   t dƒS )NÚ	Enumerate©ÚInternalPlatformSwitch© r   r   ú;/tmp/google-cloud-sdk/lib/third_party/pyu2f/hid/__init__.pyr      s   r   c                 C   s
   t d| ƒS )NÚ__init__r   )Úpathr   r   r   ÚOpen   s   
r	   c                 O   sž   d}t j d¡rddlm} |j}nt j d¡r"ddlm} |j}nt j d¡r1ddlm} |j	}|s:t
d	t j ƒ‚| d
krE||i |¤ŽS t|| ƒ|i |¤ŽS )z=Determine, on a platform-specific basis, which module to use.NÚlinuxr   )r
   Úwin32)ÚwindowsÚdarwin)ÚmacoszUnsupported platform: r   )ÚsysÚplatformÚ
startswithÚ	pyu2f.hidr
   ÚLinuxHidDevicer   ÚWindowsHidDevicer   ÚMacOsHidDeviceÚ	ExceptionÚgetattr)ÚfuncnameÚargsÚkwargsÚclzr
   r   r   r   r   r   r      s   r   )Ú__doc__r   r   r	   r   r   r   r   r   Ú<module>   s
   