<?xml version="1.0" encoding="UTF-8"?>
<ajxpdriver name="inbox" label="CONF_MESSAGE[Inbox Workspace]" description="CONF_MESSAGE[Received Files]" mixins="filesystem_commons,slug_provider,template_provider" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="file:../core.ajaxplorer/ajxp_registry.xsd">
    <class_definition filename="plugins/access.inbox/InboxAccessDriver.php" classname="Pydio\Access\Driver\StreamProvider\Inbox\InboxAccessDriver"/>
    <client_settings>
        <resources>
            <js className="FSActions" file="plugins/access.fs/res/build/FSActions.js" depends="PydioComponents"/>
            <js file="plugins/access.inbox/res/build/InboxWidgets.js" className="InboxWidgets" depends="FSActions"/>
            <css file="plugins/access.inbox/res/inbox_style.css"/>
            <i18n namespace="inbox_driver" path="plugins/access.inbox/res/i18n"/>
        </resources>
    </client_settings>
    <registry_contributions>
        <external_file filename="plugins/access.fs/fsTemplatePart.xml" include="client_configs/*" exclude=""/>
        <external_file filename="plugins/access.fs/fsActions.xml"
                       include="actions/*"
                       exclude="actions/action[@name='download_all']|actions/action[@name='download']|actions/action[@name='download_chunk']|actions/action[@name='rename']|actions/action[@name='move']|actions/action[@name='copy']|actions/action[@name='delete']|actions/action[@name='chmod']|actions/action[@name='compress']|actions/action[@name='compress_ui']"/>
        <external_file filename="plugins/access.fs/fsActions.xml" include="client_configs/*" exclude=""/>
        <external_file filename="plugins/access.fs/manifest.xml" include="registry_contributions/hooks/*" exclude=""/>

        <hooks>
            <serverCallback methodName="loadRepositoryInfo" hookName="repository.load_info" />
        </hooks>

        <actions>
            <action name="inbox_accept_invitation">
                <gui text="547" title="547" iconClass="icon-ok-sign">
                    <context dir="true" recycle="false" selection="true" actionBar="true" actionBarGroup="change_main,inline,info_panel_share"/>
                    <selectionContext dir="true" file="true" behaviour="hidden" recycle="false" unique="true" allowedMimes="invitation"/>
                </gui>
                <processing>
                    <clientCallback module="InboxWidgets.Callbacks.acceptInvitation"/>
                </processing>
            </action>
            <action name="inbox_reject_invitation">
                <gui text="548" title="548" iconClass="icon-remove-sign">
                    <context dir="true" recycle="false" selection="true" actionBar="true" actionBarGroup="change_main,inline,info_panel_share"/>
                    <selectionContext dir="true" file="true" behaviour="hidden" recycle="false" unique="true" allowedMimes="invitation"/>
                </gui>
                <processing>
                    <clientCallback module="InboxWidgets.Callbacks.rejectInvitation"/>
                </processing>
            </action>
            <action name="inbox_reject_remote_share">
                <gui text="548" title="548" iconClass="icon-remove-sign">
                    <context dir="true" recycle="false" selection="true" actionBar="true" actionBarGroup="change_main,inline,info_panel_share"/>
                    <selectionContext dir="true" file="true" behaviour="hidden" recycle="false" unique="true" evalMetadata="metadata.get('remote_share_accepted') || metadata.get('ajxp_mime') === 'error'"/>
                </gui>
                <processing>
                    <clientCallback module="InboxWidgets.Callbacks.rejectRemoteShare"/>
                </processing>
            </action>
            <action name="download" fileDefault="false">
                <gui text="88" title="88" iconClass="icon-download-alt" accessKey="download_access_key" hasAccessKey="true">
                    <context selection="true" dir="" recycle="false"
                             actionBar="true" contextMenu="true" infoPanel="true"
                             actionBarGroup="0_get,inline,info_panel">
                    </context>
                    <selectionContext dir="false" file="true" recycle="false" unique="true" enableRoot="false"/></gui>
                <rightsContext noUser="true" userLogged="only" read="true" write="false" adminOnly=""/>
                <processing>
                    <clientCallback module="InboxWidgets.Callbacks.download"/>
                    <serverCallback methodName="downloadAction" restParams="/file+" checkParams="false" sdkMethodName="download" developerComment="Download one or many files at once. If multiple files (or a folder path) passed, they are sent back as an archive.">
                        <input_param description="User selection" name="nodes" type="AJXP_NODE[]" mandatory="true"/>
                        <output type="stream"/>
                    </serverCallback>
                </processing>
            </action>
            <action name="copy_inbox" ctrlDragndropDefault="true">
                <gui text="inbox_driver.14" title="inbox_driver.15" iconClass="icon-copy" hasAccessKey="false">
                    <context selection="true" dir="" recycle="hidden"
                             actionBar="true" contextMenu="true" infoPanel="false"
                             actionBarGroup="change_main">
                    </context>
                    <selectionContext dir="false" file="true" recycle="false" unique="false"/></gui>
                <rightsContext noUser="true" userLogged="only" read="true" write="false" adminOnly=""/>
                <processing>
                    <clientCallback module="InboxWidgets.Callbacks.copyInbox"/>
                    <clientListener module="InboxWidgets.Callbacks.copyContextListener" name="contextChange"/>
                    <serverCallback methodName="switchAction" restParams="/" developerComment="Copy one or more items to a given target">
                        <input_param description="Selection" name="nodes" type="AJXP_NODE[]" mandatory="true"/>
                        <input_param description="Target folder where to copy" name="dest" type="path" mandatory="true"/>
                    </serverCallback>
                </processing>
            </action>
            <action name="share_react" forbidOverride="true"/>
            <action name="share" forbidOverride="true"/>
            <action name="get_my_feed" forbidOverride="true"/>
            <action name="mkdir" forbidOverride="true"/>
            <action name="upload" forbidOverride="true"/>
            <action name="compress" forbidOverride="true"/>
            <action name="compress_ui" forbidOverride="true"/>
        </actions>
        <client_configs>
            <component_config component="FilesList">
                <columns>
                    <additional_column attributeName="share_meta_type" sortType="CellSorterValue" modifier="InboxWidgets.filesListCellModifier"
                                       defaultVisibilty="visible" messageString="Share Type"/>
                </columns>
            </component_config>
        </client_configs>
        <client_configs>
            <template_part ajxpClass="AjxpReactComponent" ajxpId="topPane" ajxpOptions='{"componentNamespace":"InboxWidgets","componentName":"LeftPanel"}'/>
        </client_configs>
    </registry_contributions>
    <dependencies>
        <pluginClass pluginName="access.fs"/>
        <pluginResources pluginName="access.fs"/>
    </dependencies>
    <class_stream_wrapper filename="plugins/access.inbox/InboxAccessWrapper.php" classname="Pydio\Access\Driver\StreamProvider\Inbox\InboxAccessWrapper" protocol="ajxp.inbox"/>
</ajxpdriver>
