add download state database interface