######################################################
#        *** in-application purchase API enabler ***
######################################################
symbian {
    contains(DEFINES, INAPP_BILLING){
        message(Building In-application Purchase API support ...)

        SOURCES += src/in_application_billing/declarativepurchaselistmodel.cpp \
                   src/in_application_billing/itemstatusimageprovider.cpp \
                   src/in_application_billing/purchasableitem.cpp \
                   src/in_application_billing/purchasableitemBase.cpp \
                   src/in_application_billing/drmfile.cpp \
                   src/in_application_billing/symbian_drm/drmfile_p.cpp \
                   src/in_application_billing/productcatalogmodel.cpp \ 
                   src/in_application_billing/resourcedataprovider.cpp 

        HEADERS += src/in_application_billing/declarativepurchaselistmodel.h \
                   src/in_application_billing/itemstatusimageprovider.h \
                   src/in_application_billing/purchasableitem.h \
                   src/in_application_billing/purchasableitemBase.h \
                   src/in_application_billing/drmfile.h \
                   src/in_application_billing/symbian_drm/drmfile_p.h \
                   src/in_application_billing/productcatalogmodel.h \ 
                   src/in_application_billing/resourcedataprovider.h

        # IAP client dependecy
        MOBILITY += serviceframework

        CONFIG += inapppurchase
        QT += network script

        # IAP v0.2.2 has changed to dynamic library from static
        LIBS += -liapclientapi  -lusrt2_2
        # DRM protection support
        LIBS += -lcaf -lcafutils -lapmime -lefsrv

        # capabilities required for IAP API
        TARGET.CAPABILITY += NetworkServices

        # IAP API files to include in package
        addIapFiles.sources = ./items2sell/IAP_VARIANTID.txt ./items2sell/TEST_MODE.txt
        addIapFiles.path = ./

        # DRM protected purchasable items
        addDrmHelmet.source = items2sell/bell_helmet/resources
        addDrmHelmet.target = drm/data/resourceid_673237
        DEPLOYMENTFOLDERS = addDrmHelmet

        addDrmCoolBike.source = items2sell/enhanced_bike/resources
        addDrmCoolBike.target = drm/data/resourceid_673272
        DEPLOYMENTFOLDERS += addDrmCoolBike

        # execute function from qmlapplicationviewer/qmlapplicationviewer.pri
        qtcAddDeployment()

        #correspondent icons
        addIconHelmet.sources = ./items2sell/bell_helmet/buy.png
        addIconHelmet.path = ./item2sell/icons/resourceid_673237/

        addIconCoolBike.sources = ./items2sell/enhanced_bike/buy.png
        addIconCoolBike.path = ./item2sell/icons/resourceid_673272/

        DEPLOYMENT += addIapFiles addIconHelmet addIconCoolBike
    }
}

# Harmattan
unix:!symbian:!maemo5 {
    DEFINES -= INAPP_BILLING #IAP is not supported on Harmattan at the moment
}
