<?xml version="1.0"?>
<!--
/**
 * Magento
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License (AFL 3.0)
 * that is bundled with this package in the file LICENSE_AFL.txt.
 * It is also available through the world-wide-web at this URL:
 * http://opensource.org/licenses/afl-3.0.php
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@magento.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade Magento to newer
 * versions in the future. If you wish to customize Magento for your
 * needs please refer to http://www.magento.com for more information.
 *
 * @category    Mage
 * @package     Mage_XmlConnect
 * @copyright   Copyright (c) 2006-2014 X.commerce, Inc. (http://www.magento.com)
 * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
 */
-->
<config>
    <modules>
        <Mage_XmlConnect>
            <version>1.6.0.0.1</version>
            <innerVersion>23.1</innerVersion>
        </Mage_XmlConnect>
    </modules>
    <global>
        <models>
            <xmlconnect>
                <class>Mage_XmlConnect_Model</class>
                <resourceModel>xmlconnect_resource</resourceModel>
            </xmlconnect>
            <xmlconnect_resource>
                <class>Mage_XmlConnect_Model_Resource</class>
                <deprecatedNode>xmlconnect_mysql4</deprecatedNode>
                <entities>
                    <application><table>xmlconnect_application</table></application>
                    <history><table>xmlconnect_history</table></history>
                    <application_design><table>xmlconnect_application</table></application_design>
                    <queue><table>xmlconnect_queue</table></queue>
                    <template><table>xmlconnect_notification_template</table></template>
                    <configData><table>xmlconnect_config_data</table></configData>
                    <images><table>xmlconnect_images</table></images>
                </entities>
            </xmlconnect_resource>
        </models>
        <blocks>
            <xmlconnect>
                <class>Mage_XmlConnect_Block</class>
            </xmlconnect>
        </blocks>
        <helpers>
            <xmlconnect>
                <class>Mage_XmlConnect_Helper</class>
            </xmlconnect>
        </helpers>
        <resources>
            <xmlconnect_setup>
                <setup>
                    <module>Mage_XmlConnect</module>
                    <class>Mage_XmlConnect_Model_Resource_Setup</class>
                </setup>
            </xmlconnect_setup>
        </resources>
        <request>
            <direct_front_name>
                <xmlconnect/>
            </direct_front_name>
        </request>
        <events>
            <websiterestriction_frontend>
                <observers>
                    <xmlconnect>
                        <class>xmlconnect/observer</class>
                        <method>restrictWebsite</method>
                    </xmlconnect>
                </observers>
            </websiterestriction_frontend>
            <clean_catalog_images_cache_after>
                <observers>
                    <xmlconnect>
                        <class>xmlconnect/observer</class>
                        <method>clearCategoryImagesCache</method>
                    </xmlconnect>
                </observers>
            </clean_catalog_images_cache_after>
            <controller_action_predispatch>
                <observers>
                    <xmlconnect>
                        <class>xmlconnect/observer</class>
                        <method>actionFrontPreDispatchXmlAdmin</method>
                    </xmlconnect>
                </observers>
            </controller_action_predispatch>
        </events>
        <xmlconnect>
            <sales>
                <quote>
                    <totals>
                        <subtotal>
                            <renderer>xmlconnect/cart_cartTotals_subtotal</renderer>
                        </subtotal>
                        <grand_total>
                            <renderer>xmlconnect/cart_cartTotals_grandtotal</renderer>
                        </grand_total>
                        <shipping>
                            <renderer>xmlconnect/cart_cartTotals_shipping</renderer>
                        </shipping>
                        <giftcardaccount>
                            <renderer>xmlconnect/cart_cartTotals_nodes_giftcardaccount</renderer>
                            <is_node>1</is_node>
                        </giftcardaccount>
                        <discount>
                            <renderer>xmlconnect/cart_cartTotals_nodes_default</renderer>
                            <is_node>1</is_node>
                        </discount>
                        <customerbalance>
                            <renderer>xmlconnect/cart_cartTotals_nodes_default</renderer>
                            <is_node>1</is_node>
                        </customerbalance>
                    </totals>
                </quote>
            </sales>
        </xmlconnect>
    </global>
    <admin>
         <routers>
            <adminhtml>
                <args>
                    <modules>
                        <xmlconnect before="Mage_Adminhtml">Mage_XmlConnect_Adminhtml</xmlconnect>
                    </modules>
                </args>
            </adminhtml>
        </routers>
    </admin>
    <adminhtml>
        <layout>
            <updates>
                <mage_xmlconnect>
                    <file>xmlconnect.xml</file>
                </mage_xmlconnect>
            </updates>
        </layout>
        <translate>
            <modules>
                <Mage_XmlConnect>
                    <files>
                        <default>Mage_XmlConnect.csv</default>
                    </files>
                </Mage_XmlConnect>
            </modules>
        </translate>
        <events>
            <core_config_data_save_after>
                <observers>
                    <xmlconnect>
                        <class>xmlconnect/observer</class>
                        <method>changeUpdatedAtParamOnConfigSave</method>
                    </xmlconnect>
                </observers>
            </core_config_data_save_after>
            <core_config_data_save_before>
                <observers>
                    <xmlconnect>
                        <class>xmlconnect/observer</class>
                        <method>changeUpdatedAtParamOnConfigSave</method>
                    </xmlconnect>
                </observers>
            </core_config_data_save_before>
            <before_save_message_queue>
                <observers>
                    <xmlconnect>
                        <class>xmlconnect/observer</class>
                        <method>sendMessageImmediately</method>
                    </xmlconnect>
                </observers>
            </before_save_message_queue>
            <controller_action_predispatch>
                <observers>
                    <xmlconnect>
                        <class>xmlconnect/observer</class>
                        <method>actionPreDispatchXmlAdmin</method>
                    </xmlconnect>
                </observers>
            </controller_action_predispatch>
        </events>
    </adminhtml>
    <frontend>
        <routers>
            <xmlconnect>
                <use>standard</use>
                <args>
                    <module>Mage_XmlConnect</module>
                    <frontName>xmlconnect</frontName>
                </args>
            </xmlconnect>
        </routers>
        <layout>
            <updates>
                <xmlconnect>
                    <file>xmlconnect.xml</file>
                </xmlconnect>
            </updates>
        </layout>
        <translate>
            <modules>
                <Mage_XmlConnect>
                    <files>
                        <default>Mage_XmlConnect.csv</default>
                    </files>
                </Mage_XmlConnect>
            </modules>
        </translate>
    </frontend>
    <default>
        <payment>
            <paypal_mep>
                <active>1</active>
                <model>xmlconnect/payment_method_paypal_mep</model>
                <title>PayPal Mobile Payments Library</title>
                <allowspecific>0</allowspecific>
                <group>paypal</group>
                <line_items_enabled>1</line_items_enabled>
            </paypal_mep>
            <paypal_mecl>
                <active>1</active>
                <model>xmlconnect/payment_method_paypal_mecl</model>
                <title>PayPal Mobile Express Checkout Library</title>
                <allowspecific>0</allowspecific>
                <group>paypal</group>
                <payment_action>Authorization</payment_action>
                <line_items_enabled>1</line_items_enabled>
                <solution_type>Mark</solution_type>
                <authorization_honor_period>3</authorization_honor_period>
                <order_valid_period>29</order_valid_period>
                <child_authorization_number>1</child_authorization_number>
            </paypal_mecl>
        </payment>
        <screen_size>
            <!-- WARNING !!!!!  ALL IMAGE NODES MUST END ON "icon"|"Icon"|"Image"  !!!!!  -->
            <default>
                <interface>
                    <native>
                        <!-- for all devices preview and config -->
                        <tabBar>
                            <home> <icon> <heightMax>35</heightMax> </icon> </home>
                            <shop> <icon> <heightMax>35</heightMax> </icon> </shop>
                            <search> <icon> <heightMax>35</heightMax> </icon> </search>
                            <cart> <icon> <heightMax>35</heightMax> </icon> </cart>
                            <more> <icon> <heightMax>35</heightMax> </icon> </more>
                        </tabBar>
                        <!-- for all devices preview end -->

                        <itemActions>
                            <backgroundImage> <width>320</width> <height>90</height> </backgroundImage>
                            <viewGalleryIcon> <widthMax>40</widthMax> <heightMax>40</heightMax> </viewGalleryIcon>
                            <tellAFriendIcon> <widthMax>40</widthMax> <heightMax>40</heightMax> </tellAFriendIcon>
                            <addToWishlistIcon> <widthMax>40</widthMax> <heightMax>40</heightMax> </addToWishlistIcon>
                            <addToCartIcon> <widthMax>40</widthMax> <heightMax>40</heightMax> </addToCartIcon>
                            <viewDetailsIcon> <widthMax>40</widthMax> <heightMax>40</heightMax> </viewDetailsIcon>
                            <radioEnabledIcon> <widthMax>20</widthMax> <heightMax>20</heightMax> </radioEnabledIcon>
                            <radioDisabledIcon> <widthMax>20</widthMax> <heightMax>20</heightMax> </radioDisabledIcon>
                            <checkBoxEnabledIcon> <widthMax>20</widthMax> <heightMax>20</heightMax> </checkBoxEnabledIcon>
                            <checkBoxDisabledIcon> <widthMax>20</widthMax> <heightMax>20</heightMax> </checkBoxDisabledIcon>
                        </itemActions>
                    </native>
                    <submit>
                        <!-- images that are the same for all type of devices -->
                        <icon></icon>
                        <big_logo></big_logo>

                        <!-- iphone images -->
                        <loader_image></loader_image>
                        <loader_image_i4></loader_image_i4>
                        <logo></logo>
                        <logo_i4></logo_i4>
                        <big_logo_i4></big_logo_i4>

                        <!-- ipad images -->
                        <ipad_loader_portrait_image></ipad_loader_portrait_image>
                        <ipad_loader_landscape_image></ipad_loader_landscape_image>
                        <ipad_logo></ipad_logo>

                        <!-- andriod images -->
                        <android_loader_image></android_loader_image>
                        <android_logo></android_logo>
                    </submit>
                </interface>
            </default>
        </screen_size>
        <xmlconnect>
            <mobile_application>
                <curl_ssl_verifypeer>1</curl_ssl_verifypeer>
                <magentocommerce_url>www.magentocommerce.com/products/index.php/mobile/activate/index/key/</magentocommerce_url>
                <activation_key_url>http://magentocommerce.com/product/mobile</activation_key_url>
                <resubmission_key_url>http://www.magentocommerce.com/product/mobile#resubmission</resubmission_key_url>
                <urbanairship_push_url>http://urbanairship.com/products/push-notifications/</urbanairship_push_url>
                <urbanairship_rich_push_url>http://urbanairship.com/products/rich-push/</urbanairship_rich_push_url>
                <urbanairship_terms_of_service_url>http://urbanairship.com/terms-of-service/</urbanairship_terms_of_service_url>
                <urbanairship_login_url>https://go.urbanairship.com/partners/magento/</urbanairship_login_url>
                <urbanairship_credentials_email>magentomobile@magento.com</urbanairship_credentials_email>
                <cron_send_messages_count>3</cron_send_messages_count>
                <nodes_excluded_from_config_xml>
                    <master_secret>notifications/applicationMasterSecret</master_secret>
                </nodes_excluded_from_config_xml>
                <cache_lifetime>86400</cache_lifetime>
            </mobile_application>
            <devices>
                <iphone>
                    <tab_limit>5</tab_limit>
                    <notification_type>aps</notification_type>
                </iphone>
                <ipad>
                    <tab_limit>10</tab_limit>
                    <notification_type>aps</notification_type>
                </ipad>
                <android>
                    <tab_limit>10</tab_limit>
                    <notification_type>android</notification_type>
                </android>
            </devices>
            <flurry_analytics>
                <statistics_url>http://www.flurry.com/product/analytics/index.html</statistics_url>
            </flurry_analytics>
            <social_networking>
                <howto_twitter_url>http://www.magentocommerce.com/product/mobile-social-networking-setup#twitter</howto_twitter_url>
                <howto_facebook_url>http://www.magentocommerce.com/product/mobile-social-networking-setup#facebook</howto_facebook_url>
                <howto_linkedin_url>http://www.magentocommerce.com/product/mobile-social-networking-setup#linkedin</howto_linkedin_url>
            </social_networking>
            <push>
                <broadcast_url>https://go.urbanairship.com/api/push/broadcast/</broadcast_url>
            </push>
            <airmail>
                <broadcast_url>https://go.urbanairship.com/api/airmail/send/broadcast/</broadcast_url>
            </airmail>
        </xmlconnect>
        <system>
            <media_storage_configuration>
                <allowed_resources>
                    <xmlconnect_images_folder>xmlconnect</xmlconnect_images_folder>
                </allowed_resources>
            </media_storage_configuration>
        </system>
    </default>
    <crontab>
        <jobs>
            <xmlconnect_notification_send_all>
                <schedule><cron_expr>*/5 * * * *</cron_expr></schedule>
                <run><model>xmlconnect/observer::scheduledSend</model></run>
            </xmlconnect_notification_send_all>
        </jobs>
    </crontab>
</config>
