'Code complete in this translation unit.
In-memory contents for files can be provided by passing a list of pairs
as unsaved_files, the first items should be the filenames to be mapped
and the second should be the contents to be substituted for the
file. The contents may be passed as strings or file objects.'

def codeComplete(self, path, line, column, unsaved_files=None, include_macros=False, include_code_patterns=False, include_brief_comments=False):

    options = 0
    if include_macros:
        options += 1
    if include_code_patterns:
        options += 2
    if include_brief_comments:
        options += 4
    if (unsaved_files is None):
        unsaved_files = []
    unsaved_files_array = 0
    if len(unsaved_files):
        unsaved_files_array = (_CXUnsavedFile * len(unsaved_files))()
        for (i, (name, value)) in enumerate(unsaved_files):
            if (not isinstance(value, str)):
                value = value.read()
                print value
            if (not isinstance(value, str)):
                raise TypeError('Unexpected    unsaved    file    contents.')
            unsaved_files_array[i].name = encode(name)
            unsaved_files_array[i].contents = encode(value)
            unsaved_files_array[i].length = len(value)
    ptr = conf.lib.clang_codeCompleteAt(self, encode(path), line, column, unsaved_files_array, len(unsaved_files), options)
    if ptr:
        return CodeCompletionResults(ptr)
    return None
