/* Copyright (c) 2014 ActiveState Software Inc.
   See the file LICENSE.txt for licensing information. */

#include "nsISupports.idl"
interface koIAsyncCallback;

[scriptable, uuid(16265b4a-4323-4250-8ef1-b4f4ee859136)]
interface koIScopeFiles: nsISupports {

    void buildCache(in AString path, in AString opts);

    // Each time the shortcuts file is modified, the version will be
    // incremented. This is used to determine if need to pass all shortcut info
    // through XPCOM (Python > JS).
    readonly attribute long shortcutsVersion;
    // getShortcuts returns a json map { name: path }.
    AString getShortcutsAsJson();

    void search(in AString query,
                in AString searchUuid,
                in AString path,
                in AString opts,
                in koIAsyncCallback callback);

    void deleteCachePath(in AString path);

    void emptyCache();

};
