# Path: dapbench/thredds/lib/results.py
# class Results(object):
#     def __init__(self, access_allowed_count=0, access_denied_count=0, inconsistent_count=0,
#                  untested_count=0):
#         self.access_allowed_count = access_allowed_count
#         self.access_denied_count = access_denied_count
#         self.inconsistent_count = inconsistent_count
#         self.untested_count = untested_count
#         self.untested_service_types = []
# 
#     def add_access_allowed(self):
#         self.access_allowed_count += 1
# 
#     def add_access_denied(self):
#         self.access_denied_count += 1
# 
#     def add_inconsistent(self):
#         self.inconsistent_count += 1
# 
#     def add_untested(self):
#         self.untested_count += 1
# 
#     def add_untested_service_type(self, service_type):
#         """Add a service type to a sorted list.
#         """
#         if service_type not in self.untested_service_types:
#             bisect.insort(self.untested_service_types, service_type)
# 
#     def __eq__(self, other):
#         return (isinstance(other, Results)
#                 and (self.access_allowed_count == other.access_allowed_count)
#                 and (self.access_denied_count == other.access_denied_count)
#                 and (self.inconsistent_count == other.inconsistent_count)
#                 and (self.untested_count == other.untested_count)
#                 and (self.untested_service_types == other.untested_service_types))
# 
#     def __repr__(self):
#         return("(allowed=%d, denied=%d, inconsistent=%d, untested=%d %s)" %
#                (self.access_allowed_count, self.access_denied_count, self.inconsistent_count,
#                 self.untested_count, self.untested_service_types.__str__()))


import dapbench.thredds.lib.httpget as httpget
from dapbench.thredds.lib.results import Results
# BSD Licence
# Copyright (c) 2012, Science & Technology Facilities Council (STFC)
# All rights reserved.
#
# See the LICENSE file in the source distribution of this software for
# the full license text.

'''
Functions to check access to individual files.

Created on 5 Oct 2011

@author: rwilkinson
'''

def check_files(file_list, config):
    """Checks access to a list of files.
    @param file_list list of files to check
    @param config - configuration
    @return accumulated results of check
    """

# Path: dapbench/thredds/lib/results.py
# class Results(object):
#     def __init__(self, access_allowed_count=0, access_denied_count=0, inconsistent_count=0,
#                  untested_count=0):
#         self.access_allowed_count = access_allowed_count
#         self.access_denied_count = access_denied_count
#         self.inconsistent_count = inconsistent_count
#         self.untested_count = untested_count
#         self.untested_service_types = []
# 
#     def add_access_allowed(self):
#         self.access_allowed_count += 1
# 
#     def add_access_denied(self):
#         self.access_denied_count += 1
# 
#     def add_inconsistent(self):
#         self.inconsistent_count += 1
# 
#     def add_untested(self):
#         self.untested_count += 1
# 
#     def add_untested_service_type(self, service_type):
#         """Add a service type to a sorted list.
#         """
#         if service_type not in self.untested_service_types:
#             bisect.insort(self.untested_service_types, service_type)
# 
#     def __eq__(self, other):
#         return (isinstance(other, Results)
#                 and (self.access_allowed_count == other.access_allowed_count)
#                 and (self.access_denied_count == other.access_denied_count)
#                 and (self.inconsistent_count == other.inconsistent_count)
#                 and (self.untested_count == other.untested_count)
#                 and (self.untested_service_types == other.untested_service_types))
# 
#     def __repr__(self):
#         return("(allowed=%d, denied=%d, inconsistent=%d, untested=%d %s)" %
#                (self.access_allowed_count, self.access_denied_count, self.inconsistent_count,
#                 self.untested_count, self.untested_service_types.__str__()))


# Path: dapbench/thredds/lib/file_access.py
import dapbench.thredds.lib.httpget as httpget
from dapbench.thredds.lib.results import Results

# BSD Licence
# Copyright (c) 2012, Science & Technology Facilities Council (STFC)
# All rights reserved.
#
# See the LICENSE file in the source distribution of this software for
# the full license text.

'''
Functions to check access to individual files.

Created on 5 Oct 2011

@author: rwilkinson
'''

def check_files(file_list, config):
    """Checks access to a list of files.
    @param file_list list of files to check
    @param config - configuration
    @return accumulated results of check
    """

    results = Results()