U
    HI^W                     @   sZ   d Z ddlZdddddZdd Zdd Zd	d
 Zdd Zdd ZG dd dZe Z	dS )u   
Get locations where ibus-table stores stuff.

The directories used are according to the
“XDG Base Directory Specification”,
see: http://standards.freedesktop.org/basedir-spec/latest/index.html
    N )datalib	data_home
cache_homec                   C   s   t d S )Nr   IBUS_TABLE_LOCATION r	   r	   3/usr/share/ibus-table/engine/ibus_table_location.pyr   '   s    r   c                   C   s   t d S )Nr   r   r	   r	   r	   r
   r   *   s    r   c                   C   s   t d S )Nr   r   r	   r	   r	   r
   r   -   s    r   c                   C   s   t d S )Nr   r   r	   r	   r	   r
   r   0   s    r   c                   C   s  t dtd< td r&t jtd s.dtd< t dtd< td rTt jtd s\dtd< t dtd< td rt jtd st d	td< td rt jtd st jd
td< t jtd dtd< t td t jst j	td dd t dtd< td rt jtd s*t dtd< td rFt jtd sVt jdtd< t jtd dtd< t td t jst j	td dd d S )Nr   r   z/usr/share/ibus-table/ZIBUS_TABLE_LIB_LOCATIONr   z/usr/libexecZIBUS_TABLE_DATA_HOMEr   ZXDG_DATA_HOMEz~/.local/sharez
ibus-tableT)exist_okZIBUS_TABLE_CACHE_HOMEr   ZXDG_CACHE_HOMEz~/.cache)
osgetenvr   pathexists
expanduserjoinaccessF_OKmakedirsr	   r	   r	   r
   _init3   sP     

 r   c                   @   s   e Zd Zdd Zdd ZdS )__ModuleInitializerc                 C   s
   t   d S N)r   selfr	   r	   r
   __init___   s    z__ModuleInitializer.__init__c                 C   s   d S r   r	   r   r	   r	   r
   __del__c   s    z__ModuleInitializer.__del__N)__name__
__module____qualname__r   r   r	   r	   r	   r
   r   ^   s   r   )
__doc__r   r   r   r   r   r   r   r   Z__module_initr	   r	   r	   r
   <module>   s   +