From: Amlan Chowdhury Date: Thu, 30 Jun 2016 09:35:24 +0000 (+0600) Subject: [TBT][NFC, MTP, NSD][DPITIZEN-1868][Modules added and tpk Updated] X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=03a80c01e18399cfd99e7943b2379e88576b4a9a;p=test%2Ftct%2Fnative%2Fbehavior.git [TBT][NFC, MTP, NSD][DPITIZEN-1868][Modules added and tpk Updated] Signed-off-by: Amlan Chowdhury Change-Id: I2ff2bbecc526a999418b770ca3cb044daca5e7ed --- diff --git a/release/binary-arm/install.sh b/release/binary-arm/install.sh index d23a9f9..e71ddeb 100644 --- a/release/binary-arm/install.sh +++ b/release/binary-arm/install.sh @@ -28,6 +28,8 @@ sdb install org.tizen.coretbt_dataprovider-1.0.0-arm.tpk sdb install org.tizen.coretbt_serviceapp-1.0.0-arm.tpk sdb install org.tizen.coretbt_uiapp-1.0.0-arm.tpk +sdb install org.tizen.tbt_hcetestappa-1.0.0-arm.tpk +sdb install org.tizen.tbt_hcetestappb-1.0.0-arm.tpk sdb install org.tizen.tbtcoreapp-1.0.0-arm.tpk sdb push dog_1024_960.gif /opt/home/owner/content/Images diff --git a/release/binary-arm/org.tizen.coretbt_dataprovider-1.0.0-arm.tpk b/release/binary-arm/org.tizen.coretbt_dataprovider-1.0.0-arm.tpk index a3fa9bb..322b18a 100644 Binary files a/release/binary-arm/org.tizen.coretbt_dataprovider-1.0.0-arm.tpk and b/release/binary-arm/org.tizen.coretbt_dataprovider-1.0.0-arm.tpk differ diff --git a/release/binary-arm/org.tizen.coretbt_serviceapp-1.0.0-arm.tpk b/release/binary-arm/org.tizen.coretbt_serviceapp-1.0.0-arm.tpk index e51feb4..4ed0670 100644 Binary files a/release/binary-arm/org.tizen.coretbt_serviceapp-1.0.0-arm.tpk and b/release/binary-arm/org.tizen.coretbt_serviceapp-1.0.0-arm.tpk differ diff --git a/release/binary-arm/org.tizen.coretbt_uiapp-1.0.0-arm.tpk b/release/binary-arm/org.tizen.coretbt_uiapp-1.0.0-arm.tpk index 3af3d46..f3c174a 100644 Binary files a/release/binary-arm/org.tizen.coretbt_uiapp-1.0.0-arm.tpk and b/release/binary-arm/org.tizen.coretbt_uiapp-1.0.0-arm.tpk differ diff --git a/release/binary-arm/org.tizen.tbt_hcetestappa-1.0.0-arm.tpk b/release/binary-arm/org.tizen.tbt_hcetestappa-1.0.0-arm.tpk new file mode 100644 index 0000000..6d78488 Binary files /dev/null and b/release/binary-arm/org.tizen.tbt_hcetestappa-1.0.0-arm.tpk differ diff --git a/release/binary-arm/org.tizen.tbt_hcetestappb-1.0.0-arm.tpk b/release/binary-arm/org.tizen.tbt_hcetestappb-1.0.0-arm.tpk new file mode 100644 index 0000000..47a37a7 Binary files /dev/null and b/release/binary-arm/org.tizen.tbt_hcetestappb-1.0.0-arm.tpk differ diff --git a/release/binary-arm/org.tizen.tbtcoreapp-1.0.0-arm.tpk b/release/binary-arm/org.tizen.tbtcoreapp-1.0.0-arm.tpk index f5ee953..ba867c0 100644 Binary files a/release/binary-arm/org.tizen.tbtcoreapp-1.0.0-arm.tpk and b/release/binary-arm/org.tizen.tbtcoreapp-1.0.0-arm.tpk differ diff --git a/release/binary-x86/install.sh b/release/binary-x86/install.sh index 555639c..10c5294 100644 --- a/release/binary-x86/install.sh +++ b/release/binary-x86/install.sh @@ -28,6 +28,8 @@ sdb install org.tizen.coretbt_dataprovider-1.0.0-i386.tpk sdb install org.tizen.coretbt_serviceapp-1.0.0-i386.tpk sdb install org.tizen.coretbt_uiapp-1.0.0-i386.tpk +sdb install org.tizen.tbt_hcetestappa-1.0.0-i386.tpk +sdb install org.tizen.tbt_hcetestappb-1.0.0-i386.tpk sdb install org.tizen.tbtcoreapp-1.0.0-i386.tpk sdb push dog_1024_960.gif /opt/home/owner/content/Images diff --git a/release/binary-x86/org.tizen.coretbt_dataprovider-1.0.0-i386.tpk b/release/binary-x86/org.tizen.coretbt_dataprovider-1.0.0-i386.tpk index a6431ab..ce3926c 100644 Binary files a/release/binary-x86/org.tizen.coretbt_dataprovider-1.0.0-i386.tpk and b/release/binary-x86/org.tizen.coretbt_dataprovider-1.0.0-i386.tpk differ diff --git a/release/binary-x86/org.tizen.coretbt_serviceapp-1.0.0-i386.tpk b/release/binary-x86/org.tizen.coretbt_serviceapp-1.0.0-i386.tpk index 32f4386..a4a6a66 100644 Binary files a/release/binary-x86/org.tizen.coretbt_serviceapp-1.0.0-i386.tpk and b/release/binary-x86/org.tizen.coretbt_serviceapp-1.0.0-i386.tpk differ diff --git a/release/binary-x86/org.tizen.coretbt_uiapp-1.0.0-i386.tpk b/release/binary-x86/org.tizen.coretbt_uiapp-1.0.0-i386.tpk index f44e4fe..80aec78 100644 Binary files a/release/binary-x86/org.tizen.coretbt_uiapp-1.0.0-i386.tpk and b/release/binary-x86/org.tizen.coretbt_uiapp-1.0.0-i386.tpk differ diff --git a/release/binary-x86/org.tizen.tbt_hcetestappa-1.0.0-i386.tpk b/release/binary-x86/org.tizen.tbt_hcetestappa-1.0.0-i386.tpk new file mode 100644 index 0000000..f9bff1a Binary files /dev/null and b/release/binary-x86/org.tizen.tbt_hcetestappa-1.0.0-i386.tpk differ diff --git a/release/binary-x86/org.tizen.tbt_hcetestappb-1.0.0-i386.tpk b/release/binary-x86/org.tizen.tbt_hcetestappb-1.0.0-i386.tpk new file mode 100644 index 0000000..12191da Binary files /dev/null and b/release/binary-x86/org.tizen.tbt_hcetestappb-1.0.0-i386.tpk differ diff --git a/release/binary-x86/org.tizen.tbtcoreapp-1.0.0-i386.tpk b/release/binary-x86/org.tizen.tbtcoreapp-1.0.0-i386.tpk index 3eb5cc3..f24aec7 100644 Binary files a/release/binary-x86/org.tizen.tbtcoreapp-1.0.0-i386.tpk and b/release/binary-x86/org.tizen.tbtcoreapp-1.0.0-i386.tpk differ diff --git a/tbt_hcetestappA/.cproject b/tbt_hcetestappA/.cproject new file mode 100644 index 0000000..7225314 --- /dev/null +++ b/tbt_hcetestappA/.cproject @@ -0,0 +1,547 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tbt_hcetestappA/.exportMap b/tbt_hcetestappA/.exportMap new file mode 100644 index 0000000..43e310e --- /dev/null +++ b/tbt_hcetestappA/.exportMap @@ -0,0 +1,4 @@ +{ + global: main; + local: *; +}; diff --git a/tbt_hcetestappA/.project b/tbt_hcetestappA/.project new file mode 100644 index 0000000..b7240f5 --- /dev/null +++ b/tbt_hcetestappA/.project @@ -0,0 +1,26 @@ + + + tbt_hcetestappA + + + + + + org.eclipse.cdt.managedbuilder.core.genmakebuilder + + + + + org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder + full,incremental, + + + + + + org.eclipse.cdt.core.cnature + org.eclipse.cdt.core.ccnature + org.eclipse.cdt.managedbuilder.core.managedBuildNature + org.eclipse.cdt.managedbuilder.core.ScannerConfigNature + + diff --git a/tbt_hcetestappA/.rds_delta b/tbt_hcetestappA/.rds_delta new file mode 100644 index 0000000..035bead --- /dev/null +++ b/tbt_hcetestappA/.rds_delta @@ -0,0 +1,6 @@ +#delete +#add +bin/tbt_hcetestappa +#modify +author-signature.xml +signature1.xml diff --git a/tbt_hcetestappA/.sdk_delta.info b/tbt_hcetestappA/.sdk_delta.info new file mode 100644 index 0000000..9ecd8bf Binary files /dev/null and b/tbt_hcetestappA/.sdk_delta.info differ diff --git a/tbt_hcetestappA/.sign/.manifest.tmp b/tbt_hcetestappA/.sign/.manifest.tmp new file mode 100644 index 0000000..ffec666 --- /dev/null +++ b/tbt_hcetestappA/.sign/.manifest.tmp @@ -0,0 +1,5 @@ +bin/tbt_hcetestappa__DEL__z5iq4GKaDwvnl0EYss+rbNNPF4QVRbQpeYNtgr6WCnc= +shared/res/hcetest.png__DEL__1d0oEZHqPn+QzNzGIHwj9ODby6x9ggFs9uOsav6jPNs= +shared/res/wallet.xml__DEL__NS+aMNFrtqE1vWJ6X8WXQ8OB9lbf6TMKzJxeyINGnbs= +tizen-manifest.xml__DEL__HCUz+Kj2wcBE+R+N6U3cZw8+MXO9+Rzkof5zU8frPjo= +author-signature.xml__DEL__lBwrYGrurwSJvyudTwpoGrH09tjJ0LKsyTtPFrWV0r0= diff --git a/tbt_hcetestappA/.sign/author-signature.xml b/tbt_hcetestappA/.sign/author-signature.xml new file mode 100644 index 0000000..6b3ae70 --- /dev/null +++ b/tbt_hcetestappA/.sign/author-signature.xml @@ -0,0 +1,70 @@ + + + + + + +z5iq4GKaDwvnl0EYss+rbNNPF4QVRbQpeYNtgr6WCnc= + + + +1d0oEZHqPn+QzNzGIHwj9ODby6x9ggFs9uOsav6jPNs= + + + +NS+aMNFrtqE1vWJ6X8WXQ8OB9lbf6TMKzJxeyINGnbs= + + + +HCUz+Kj2wcBE+R+N6U3cZw8+MXO9+Rzkof5zU8frPjo= + + + + + + +lpo8tUDs054eLlBQXiDPVDVKfw30ZZdtkRs1jd7H5K8= + + + +HJqngtYnd4ttu5pEF0FLVEtSDn+Bqj0JAeJ+Mk6WPc8pyNIOwVLjCJxFAYy/0BG7wULpho5V7N02 +nnv8De15DW7qDts1ECNF8cpKq+9JUl9OLeEQuK8fc9LFVzYExjDTpfX6tQJSJmSk0eyzkvItfW15 +qY6y+sedR3eu9IruCjQ= + + + + +MIIClTCCAX2gAwIBAgIGAVVxvR2gMA0GCSqGSIb3DQEBBQUAMFYxGjAYBgNVBAoMEVRpemVuIEFz +c29jaWF0aW9uMRowGAYDVQQLDBFUaXplbiBBc3NvY2lhdGlvbjEcMBoGA1UEAwwTVGl6ZW4gRGV2 +ZWxvcGVycyBDQTAeFw0xMjExMDEwMDAwMDBaFw0xOTAxMDEwMDAwMDBaMBExDzANBgNVBAMMBmF1 +dGhvcjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAjthQAiStjKCq/RmRd4Whk1i1FL50jJw8 +5mPEp3okCuqI7sDrOuQpF4kAmmpkXKJ9GHuF0r2qh5Xc5cTg8iXFJkx72vXLkRo6FnyOIZAiaIl7 +z+McpJtH+MDkDC2RHkfEeyZgdE5WVnsWTEVEnY8TAjgSdI7DMrZWCJkN2YIRv1kCAwEAAaMyMDAw +DAYDVR0TAQH/BAIwADALBgNVHQ8EBAMCB4AwEwYDVR0lBAwwCgYIKwYBBQUHAwMwDQYJKoZIhvcN +AQEFBQADggEBANP1v+QVda62aYwoYUwIxY84f1jnxxz7PI6MGlvJ9/zjSOaFsuMm0nCvfoeR6bkc +gZO0ImrFS++AkD+efs/LGSe+WDgNqV+eCHBtpP+01jbsdrmNLF0mERxcfsleywQWj3THEnr59Av0 +CAZ/KdAMoSQ5qpQ5wxcWd6s2Ua2cgWk9ftEQMv/OnvDipYPp9HujiHvOjmfSZm3vw/UspW07CGTt +omHSdZIMKh7FqSKen0Ztcp/H3kBhzNDemyu7TpTVyVcsCKHirN4bztsOqClI5z7QqyKhPT0XUMTQ +AaHviQeBv6gF+10OK0iqBonqJ2RPPrGj/4SZI8ALGWa8YxoNqkU= + + +MIIDOTCCAiGgAwIBAgIBATANBgkqhkiG9w0BAQUFADBYMRowGAYDVQQKDBFUaXplbiBBc3NvY2lh +dGlvbjEaMBgGA1UECwwRVGl6ZW4gQXNzb2NpYXRpb24xHjAcBgNVBAMMFVRpemVuIERldmVsb3Bl +cnMgUm9vdDAeFw0xMjAxMDEwMDAwMDBaFw0yNzAxMDEwMDAwMDBaMFYxGjAYBgNVBAoMEVRpemVu +IEFzc29jaWF0aW9uMRowGAYDVQQLDBFUaXplbiBBc3NvY2lhdGlvbjEcMBoGA1UEAwwTVGl6ZW4g +RGV2ZWxvcGVycyBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANVGhRGmMIUyBA7o +PCz8Sxut6z6HNkF4oDIuzuKaMzRYPeWodwe9O0gmqAkToQHfwg2giRhE5GoPld0fq+OYMMwSasCu +g8dwODx1eDeSYVuOLWRxpAmbTXOsSFi6VoWeyaPEm18JBHvZBsU5YQtgZ6Kp7MqzvQg3pXOxtajj +vyHxiatJl+xXrHgcXC1wgyG3buty7u/Fi2mvKXJ0PRJcCjjK81dqe/Vr20sRUCrbk02zbm5ggFt/ +jIEhV8wbFRQpliobc7J4dSTKhFfrqGM8rdd54LYhD7gSI1CFSe16pUXfcVR7FhJztRaiGLnCrwBE +dyTZ248+D4L/qR/D0axb3jcCAwEAAaMQMA4wDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOC +AQEAnOXXQ/1O/QTDHyrmQDtFziqPY3xWlJBqJtEqXiT7Y+Ljpe66e+Ee/OjQMlZe8gu21/8cKklH +95RxjopMWCVedXDUbWdvS2+CdyvVW/quT2E0tjqIzXDekUTYwwhlPWlGxvfj3VsxqSFq3p8Brl04 +1Gx5RKAGyKVsMfTLhbbwSWwApuBUxYfcNpKwLWGPXkysu+HctY03OKv4/xKBnVWiN8ex/Sgesi0M ++OBAOMdZMPK32uJBTeKFx1xZgTLIhk45V0hPOomPjZloiv0LSS11eyd451ufjW0iHRE7WlpR6EvI +W6TFyZgMpQq+kg4hWl2SBTf3s2VI8Ygz7gj8TMlClg== + + + + + \ No newline at end of file diff --git a/tbt_hcetestappA/.sign/signature1.xml b/tbt_hcetestappA/.sign/signature1.xml new file mode 100644 index 0000000..6ec5536 --- /dev/null +++ b/tbt_hcetestappA/.sign/signature1.xml @@ -0,0 +1,72 @@ + + + + + + +lBwrYGrurwSJvyudTwpoGrH09tjJ0LKsyTtPFrWV0r0= + + + +z5iq4GKaDwvnl0EYss+rbNNPF4QVRbQpeYNtgr6WCnc= + + + +1d0oEZHqPn+QzNzGIHwj9ODby6x9ggFs9uOsav6jPNs= + + + +NS+aMNFrtqE1vWJ6X8WXQ8OB9lbf6TMKzJxeyINGnbs= + + + +HCUz+Kj2wcBE+R+N6U3cZw8+MXO9+Rzkof5zU8frPjo= + + + + + + +u/jU3U4Zm5ihTMSjKGlGYbWzDfRkGphPPHx3gJIYEJ4= + + + +CZ+YQsEPb2yTp6eU2D2hK4alt39T2mNGHqYPeHK9gcbkrxSnpkdmp+B2x0b0lOQhh2snZyioa3Iu +ge3iaIOSTC1eYOjKR17XpdvZ0GevnvCN8MXYsDrE3+IVk0RYqC1rAHUPlrE3aIWe1pTNZKzlHiQQ +DwPlrg7krQH2ScP1Ag4= + + + + +MIICmzCCAgQCCQDXI7WLdVZwiTANBgkqhkiG9w0BAQUFADCBjzELMAkGA1UEBhMCS1IxDjAMBgNV +BAgMBVN1d29uMQ4wDAYDVQQHDAVTdXdvbjEWMBQGA1UECgwNVGl6ZW4gVGVzdCBDQTEiMCAGA1UE +CwwZVGl6ZW4gRGlzdHJpYnV0b3IgVGVzdCBDQTEkMCIGA1UEAwwbVGl6ZW4gUHVibGljIERpc3Ry +aWJ1dG9yIENBMB4XDTEyMTAyOTEzMDMwNFoXDTIyMTAyNzEzMDMwNFowgZMxCzAJBgNVBAYTAktS +MQ4wDAYDVQQIDAVTdXdvbjEOMAwGA1UEBwwFU3V3b24xFjAUBgNVBAoMDVRpemVuIFRlc3QgQ0Ex +IjAgBgNVBAsMGVRpemVuIERpc3RyaWJ1dG9yIFRlc3QgQ0ExKDAmBgNVBAMMH1RpemVuIFB1Ymxp +YyBEaXN0cmlidXRvciBTaWduZXIwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBALtMvlc5hENK +90ZdA+y66+Sy0enD1gpZDBh5T9RP0oRsptJv5jjNTseQbQi0SZOdOXb6J7iQdlBCtR343RpIEz8H +mrBy7mSY7mgwoU4EPpp4CTSUeAuKcmvrNOngTp5Hv7Ngf02TTHOLK3hZLpGayaDviyNZB5PdqQdB +hokKjzAzAgMBAAEwDQYJKoZIhvcNAQEFBQADgYEAvGp1gxxAIlFfhJH1efjb9BJK/rtRkbYn9+Ez +GEbEULg1svsgnyWisFimI3uFvgI/swzr1eKVY3Sc8MQ3+Fdy3EkbDZ2+WAubhcEkorTWjzWz2fL1 +vKaYjeIsuEX6TVRUugHWudPzcEuQRLQf8ibZWjbQdBmpeQYBMg5x+xKLCJc= + + +MIICtDCCAh2gAwIBAgIJAMDbehElPNKvMA0GCSqGSIb3DQEBBQUAMIGVMQswCQYDVQQGEwJLUjEO +MAwGA1UECAwFU3V3b24xDjAMBgNVBAcMBVN1d29uMRYwFAYDVQQKDA1UaXplbiBUZXN0IENBMSMw +IQYDVQQLDBpUVGl6ZW4gRGlzdHJpYnV0b3IgVGVzdCBDQTEpMCcGA1UEAwwgVGl6ZW4gUHVibGlj +IERpc3RyaWJ1dG9yIFJvb3QgQ0EwHhcNMTIxMDI5MTMwMjUwWhcNMjIxMDI3MTMwMjUwWjCBjzEL +MAkGA1UEBhMCS1IxDjAMBgNVBAgMBVN1d29uMQ4wDAYDVQQHDAVTdXdvbjEWMBQGA1UECgwNVGl6 +ZW4gVGVzdCBDQTEiMCAGA1UECwwZVGl6ZW4gRGlzdHJpYnV0b3IgVGVzdCBDQTEkMCIGA1UEAwwb +VGl6ZW4gUHVibGljIERpc3RyaWJ1dG9yIENBMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDe +OTS/3nXvkDEmsFCJIvRlQ3RKDcxdWJJp625pFqHdmoJBdV+x6jl1raGK2Y1sp2Gdvpjc/z92yzAp +bE/UVLPh/tRNZPeGhzU4ejDDm7kzdr2f7Ia0U98K+OoY12ucwg7TYNItj9is7Cj4blGfuMDzd2ah +2AgnCGlwNwV/pv+uVQIDAQABoxAwDjAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4GBACqJ +KO33YdoGudwanZIxMdXuxnnD9R6u72ltKk1S4zPfMJJv482CRGCI4FK6djhlsI4i0Lt1SVIJEed+ +yc3qckGm19dW+4xdlkekon7pViEBWuyHw8OWv3RXtTum1+PGHjBJ2eYY4ZKIpz73U/1NC16sTB/0 +VhfnkHwPltmrpYVe + + + + + \ No newline at end of file diff --git a/tbt_hcetestappA/.tproject b/tbt_hcetestappA/.tproject new file mode 100644 index 0000000..de5a150 --- /dev/null +++ b/tbt_hcetestappA/.tproject @@ -0,0 +1,12 @@ + + + + + wearable-3.0 + + + + + + + diff --git a/tbt_hcetestappA/Debug/.ninja_deps b/tbt_hcetestappA/Debug/.ninja_deps new file mode 100644 index 0000000..842cc14 Binary files /dev/null and b/tbt_hcetestappA/Debug/.ninja_deps differ diff --git a/tbt_hcetestappA/Debug/.ninja_log b/tbt_hcetestappA/Debug/.ninja_log new file mode 100644 index 0000000..b970439 --- /dev/null +++ b/tbt_hcetestappA/Debug/.ninja_log @@ -0,0 +1,48 @@ +# ninja log v5 +0 207 0 src/hcetest.o 113df96c5266092a +208 299 0 hcetest dd04e5e9ef12e91e +2 215 0 src/hcetest.o 113df96c5266092a +215 308 0 hcetest dd04e5e9ef12e91e +1 151 0 hcetest dd04e5e9ef12e91e +1 508 0 src/hcetest.o 113df96c5266092a +509 1015 0 hcetest dd04e5e9ef12e91e +1 229 0 src/hcetest.o 113df96c5266092a +229 360 0 hcetest dd04e5e9ef12e91e +2 223 0 src/hcetest.o 113df96c5266092a +223 319 0 hcetest dd04e5e9ef12e91e +1 214 0 src/hcetest.o 113df96c5266092a +214 306 0 hcetest dd04e5e9ef12e91e +1 229 0 src/hcetest.o 113df96c5266092a +229 369 0 hcetest dd04e5e9ef12e91e +1 215 0 src/hcetest.o 113df96c5266092a +215 330 0 hcetest dd04e5e9ef12e91e +1 224 0 src/hcetest.o 113df96c5266092a +224 322 0 hcetest dd04e5e9ef12e91e +1 211 0 src/hcetest.o 113df96c5266092a +211 305 0 hcetest dd04e5e9ef12e91e +1 224 0 src/hcetest.o 113df96c5266092a +224 345 0 hcetest dd04e5e9ef12e91e +2 242 0 src/hcetest.o 113df96c5266092a +242 342 0 hcetest dd04e5e9ef12e91e +1 254 0 src/hcetest.o 113df96c5266092a +254 395 0 hcetest dd04e5e9ef12e91e +2 220 0 src/hcetest.o 113df96c5266092a +220 313 0 hcetest dd04e5e9ef12e91e +3 2186 0 src/hcetest.o 113df96c5266092a +2186 3614 0 hcetest dd04e5e9ef12e91e +1 303 0 src/hcetest.o 90cf4bb07d8e875c +305 475 0 hcetest bc6f49b68c3cdd63 +2 167 0 hcetest bc6f49b68c3cdd63 +2 194 0 hcetest bc6f49b68c3cdd63 +2 310 0 src/hcetest.o b31531e590b12cfa +310 485 0 hcetest 5e2b48471be33a0b +1 277 0 src/hcetest.o b31531e590b12cfa +277 452 0 hcetest 5e2b48471be33a0b +2 281 0 src/hcetest.o b31531e590b12cfa +281 445 0 hcetest 5e2b48471be33a0b +0 331 0 src/tbt_hcetestappa.o 42647fa760fd0706 +331 500 0 tbt_hcetestappa 52369b04c136b07 +0 3 0 clean_sa d25f28340a6b2398 +3 6 0 clean d59b6dac04fa9b5d +1 362 0 src/tbt_hcetestappa.o 42647fa760fd0706 +362 532 0 tbt_hcetestappa 52369b04c136b07 diff --git a/tbt_hcetestappA/Debug/build.ninja b/tbt_hcetestappA/Debug/build.ninja new file mode 100644 index 0000000..a867d44 --- /dev/null +++ b/tbt_hcetestappA/Debug/build.ninja @@ -0,0 +1,24 @@ +################################################################################ +# Automatically-generated file. Do not edit! +################################################################################ + +ninja_required_version = 1.5 +include rules.ninja +include target.ninja + +shell = +builddir = /home/nazib/workspace_TBT_wearable/tbt_hcetestappA/Debug +sareportdir = /home/nazib/workspace_TBT_wearable/tbt_hcetestappA/SA_Report +sa_checkers = alpha,cplusplus,core,deadcode,resourceLeak,security,unix + +subninja ../Debug/src/subdir.ninja + +targettool = clang++ +targetflags = -L"/home/nazib/workspace_TBT_wearable/tbt_hcetestappA/lib" -target arm-tizen-linux-gnueabi -gcc-toolchain /home/nazib/tizen-sdk/tools/smart-build-interface/../arm-linux-gnueabi-gcc-4.9/ -ccc-gcc-name arm-linux-gnueabi-g++ -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 -mtune=cortex-a8 -Xlinker --as-needed -pie -lpthread -Xlinker -rpath="/home/developer/sdk_tools/lib" --sysroot="/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core" -Xlinker --version-script="/home/nazib/workspace_TBT_wearable/tbt_hcetestappA/.exportMap" -L"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/lib" -lBrokenLocale -laccounts-svc -lanl -lappcore-agent -lappcore-watch -lbadge -lbase-utils-i18n -lbundle -lcairo -lcapi-appfw-alarm -lcapi-appfw-app-common -lcapi-appfw-app-control -lcapi-appfw-application -lcapi-appfw-app-manager -lcapi-appfw-event -lcapi-appfw-package-manager -lcapi-appfw-preference -lcapi-appfw-widget-application -lcapi-base-common -lcapi-content-media-content -lcapi-content-mime-type -lcapi-location-manager -lcapi-maps-service -lcapi-media-audio-io -lcapi-media-camera -lcapi-media-codec -lcapi-media-controller -lcapi-mediademuxer -lcapi-media-image-util -lcapi-media-metadata-editor -lcapi-media-metadata-extractor -lcapi-mediamuxer -lcapi-media-player -lcapi-media-radio -lcapi-media-recorder -lcapi-media-sound-manager -lcapi-media-streamer -lcapi-media-streamrecorder -lcapi-media-thumbnail-util -lcapi-media-tone-player -lcapi-media-tool -lcapi-media-vision -lcapi-media-wav-player -lcapi-messaging-email -lcapi-messaging-messages -lcapi-network-bluetooth -lcapi-network-connection -lcapi-network-http -lcapi-network-mtp -lcapi-network-nfc -lcapi-network-smartcard -lcapi-network-wifi -lcapi-system-device -lcapi-system-info -lcapi-system-media-key -lcapi-system-runtime-info -lcapi-system-sensor -lcapi-system-system-settings -lcapi-telephony -lcapi-ui-efl-util -lcapi-ui-inputmethod-manager -lcapi-ui-inputmethod -lcapi-vpnsvc -lchromium-ewk -lcidn -lcontacts-service2 -lcore-context-manager -lcore-sync-client -lcrypto -lcrypt -lc -lcsr-client -lcurl -ld2d-conv-manager -ldali-adaptor -ldali-core -ldali-toolkit -ldata-control -ldlog -ldl -lebluez -leconnman0_7x -lecore_buffer -lecore_con -lecore_evas -lecore_file -lecore_imf_evas -lecore_imf -lecore_input_evas -lecore_input -lecore_ipc -lecore -ledbus -ledje -leet -lefl-extension -lefreet_mime -lefreet -lefreet_trash -lehal -leina -leio -lelementary -lembryo -lenotify -leofono -leom -leo -lethumb_client -lethumb -leukit -levas -lexif -lfeedback -lfido-client -lfontconfig -lfreetype -lgio-2.0 -lglib-2.0 -lgmodule-2.0 -lgobject-2.0 -lgthread-2.0 -lharfbuzz-icu -lharfbuzz -liotcon -ljson-glib-1.0 -lkey-manager-client -lmessage-port -lminizip -lm -lnotification -lnsd-dns-sd -lnsd-ssdp -lnsl -lnss_compat -lnss_dns -lnss_files -lnss_hesiod -lnss_nisplus -lnss_nis -loauth2 -loauth -lopenal -lphonenumber-utils -lprivilege-info -lpthread -lpush -lresolv -lrt -lsqlite3 -lssl -lstorage -lstt -ltbm -lthread_db -lttrace -ltts -lutil -lvc-elm -lvc -lwidget_service -lwidget_viewer_evas -lxml2 -lz -Xlinker -rpath="/opt/usr/apps/org.tizen.tbt_hcetestappa/lib" -Werror-implicit-function-declaration + +build tbt_hcetestappa: build_target src/tbt_hcetestappa.o +build ast: phony src/tbt_hcetestappa.o.ast +build externalFnMap.txt: fast_ext_fn src/tbt_hcetestappa.o.ast +build sa: phony $sareportdir/src/tbt_hcetestappa.o.xml +build apichecker: unusedapi_rule src/tbt_hcetestappa.o.txt + diff --git a/tbt_hcetestappA/Debug/compile_commands.json b/tbt_hcetestappA/Debug/compile_commands.json new file mode 100644 index 0000000..26b4463 --- /dev/null +++ b/tbt_hcetestappA/Debug/compile_commands.json @@ -0,0 +1,5 @@ +[ + { "directory": "/home/nazib/workspace_TBT_wearable/tbt_hcetestappA/Debug", + "command": "clang -I\"/home/nazib/workspace_TBT_wearable/tbt_hcetestappA/inc\" -O0 -g3 -Wall -c -fmessage-length=0 -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/libxml2\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/appcore-agent\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/appcore-watch\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/appfw\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/badge\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/base\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/cairo\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/chromium-ewk\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/ckm\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/contacts-svc\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/content\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/context-service\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/csr\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/dali\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/dali-toolkit\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/dbus-1.0\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/device\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/dlog\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/ecore-1\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/ecore-buffer-1\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/ecore-con-1\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/ecore-evas-1\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/ecore-file-1\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/ecore-imf-1\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/ecore-imf-evas-1\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/ecore-input-1\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/ecore-input-evas-1\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/ecore-ipc-1\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/ector-1\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/e_dbus-1\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/edje-1\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/eet-1\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/efl-1\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/efl-extension\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/efreet-1\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/eina-1\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/eina-1/eina\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/eio-1\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/eldbus-1\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/elementary-1\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/embryo-1\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/emile-1\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/eo-1\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/eom\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/ethumb-1\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/ethumb-client-1\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/evas-1\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/feedback\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/fontconfig\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/freetype2\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/gio-unix-2.0\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/glib-2.0\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/harfbuzz\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/iotcon\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/json-glib-1.0\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/location\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/maps\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/media\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/media-content\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/messaging\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/metadata-editor\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/minizip\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/network\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/notification\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/nsd/\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/phonenumber-utils\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/sensor\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/storage\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/system\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/telephony\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/ui\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/widget_service\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/widget_viewer_evas\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/lib/dbus-1.0/include\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/lib/glib-2.0/include\" $(TC_COMPILER_MISC) $(RS_COMPILER_MISC) -fPIE --sysroot=\"$(SBI_SYSROOT)\" -mthumb -Werror-implicit-function-declaration \"../src/tbt_hcetestappa.c\"", + "file": "../src/tbt_hcetestappa.c" }, +] diff --git a/tbt_hcetestappA/Debug/rules.ninja b/tbt_hcetestappA/Debug/rules.ninja new file mode 100644 index 0000000..07581eb --- /dev/null +++ b/tbt_hcetestappA/Debug/rules.ninja @@ -0,0 +1,288 @@ +################################################################################# +# C/ CPP Compilation Rules +################################################################################# + +rule build_c + command = $ctool -MMD -MT $out -MF $out.d $pchInc $cflags -c $in -o $out + description = Building $out + depfile = $out.d + deps = gcc + +rule build_long_c + command = $ctool -MMD -MT $out -MF $out.d @$out.rsp -c $in -o $out + description = Building $out + depfile = $out.d + deps = gcc + rspfile = $out.rsp + rspfile_content = $pchInc $cflags + +rule build_cpp + command = $cpptool -MMD -MT $out -MF $out.d $pchInc $cppflags -c $in -o $out + description = Building $out + depfile = $out.d + +rule build_long_cpp + command = $cpptool -MMD -MT $out -MF $out.d @$out.rsp -c $in -o $out + description = Building $out + depfile = $out.d + rspfile = $out.rsp + rspfile_content = $pchInc $cppflags + +################################################################################# +# Link Rules +################################################################################# + +rule build_target + command = $targettool -o $out $in $userobj $libs $targetflags + description = Linking $out + +rule build_long_target + command = $targettool -o $out @$out.rsp + description = Linking $out + rspfile = $out.rsp + rspfile_content = $in $userobj $libs $targetflags + +build main-build: phony all + +################################################################################# +# Prebuild/ Postbuild Rules +################################################################################# + +rule pre_build + command = $bashshell $prebuildcmd + description = Executing Prebuild Steps + pool = console + +rule post_build + command = $bashshell $postbuildcmd + description = Executing Postbuild Steps + pool = console + +rule build_pch + command = $pchtool -x c-header -MMD -MT $out -MF $out.d $pchflags -c $in -o $out + description = Building $out + depfile = $out.d + +rule build_long_pch + command = $pchtool -x c-header -MMD -MT $out -MF $out.d $pchflags -c $in -o $out + description = Building $out + depfile = $out.d + rspfile = $out.rsp + rspfile_content = $pchflags + +build pre-build: pre_build +build post-build: post_build | main_build + +################################################################################# +# Secondary Output Rules +################################################################################# + +rule build_edc + command = $edctool $edje-cc-options $out.d $edcflags $in $out + description = Building $out + depfile = $out.d + deps = gcc + +rule build_long_edc + command = $edctool $edje-cc-options $out.d @$out.rsp $in $out + description = Building $out + depfile = $out.d + deps = gcc + rspfile = $out.rsp + rspfile_content = $edcflags + +rule build_po + command = $potool -o $out $in + description = Building $out + +rule build_long_po + command = $potool -o $out @$out.rsp + description = Building $out + rspfile = $out.rsp + rspfile_content = $in + + +################################################################################# +# APIChecker Rules +################################################################################# + +rule build_c_api + command = APIChecker $apichecker-options $in -o $out -- $pchInc $cflags -w -fretain-comments-from-system-headers + description = Building $out + +rule build_long_c_api + command = APIChecker $apichecker-options $in -o $out -- @$out.rsp -w -fretain-comments-from-system-headers + description = Building $out + rspfile = $out.rsp + rspfile_content = $pchInc $cflags + +rule build_cpp_api + command = APIChecker $apichecker-options $in -o $out -- $pchInc $cppflags -w -fretain-comments-from-system-headers + description = Building $out + +rule build_long_cpp_api + command = APIChecker $apichecker-options $in -o $out -- @$out.rsp -w -fretain-comments-from-system-headers + description = Building $out + rspfile = $out.rsp + rspfile_content = $pchInc $cppflags + +################################################################################# +# APIChecker Unused Privilege Rules +################################################################################# + +rule unusedapi_rule + command = APIChecker -o $out $in $apichecker-misc-options $apichecker-options -- + description = Running Unused Privilege Check $out + +################################################################################# +# AST Rules +################################################################################# + +rule build_c_ast + command = $ctool -emit-ast -c $in -o $out $pchInc $cflags + description = Building $out + +rule build_long_c_ast + command = $ctool -emit-ast -c $in -o $out @$out.rsp + description = Building $out + rspfile = $out.rsp + rspfile_content = $pchInc $cflags + +rule build_cpp_ast + command = $cpptool -emit-ast -c $in -o $out $pchInc $cppflags + description = Building $out + +rule build_long_cpp_ast + command = $cpptool -emit-ast -c $in -o $out @$out.rsp + description = Building $out + rspfile = $out.rsp + rspfile_content = $pchInc $cppflags + +################################################################################# +# FN Map Rules +################################################################################# + +rule build_c_fn + command = clangFnMapGen -o $out -ast $in $in -- + description = Building $out + +rule build_long_c_fn + command = clangFnMapGen -o $out -ast $in $in -- + description = Building $out + +rule build_cpp_fn + command = clangFnMapGen -o $out -ast $in $in -- + description = Building $out + +rule build_long_cpp_fn + command = clangFnMapGen -o $out -ast $in $in -- + description = Building $out + +rule ext_fn + command = $shell cat $in > $sareportdir/externalFnMap.txt + description = Generating External Function Map + pool = console + +rule fast_ext_fn + command = clangFnMapGen -o $out $in -- + description = Generating External Function Map + pool = console + +################################################################################# +# SA Rules +################################################################################# + +rule build_c_sa + command = $ctool --analyze --analyzer-no-default-checks $in -Xclang -analyzer-purge=block -Xclang -analyzer-checker=$sa_checkers -o $sareportdir $pchInc $cflags + description = Building $out + +rule build_long_c_sa + command = $ctool --analyze --analyzer-no-default-checks $in -Xclang -analyzer-purge=block -Xclang -analyzer-checker=$sa_checkers -o $sareportdir @$out.rsp + description = Building $out + rspfile = $out.rsp + rspfile_content = $pchInc $cflags + +rule build_cpp_sa + command = $cpptool --analyze --analyzer-no-default-checks $in -Xclang -analyzer-purge=block -Xclang -analyzer-checker=$sa_checkers -o $sareportdir $pchInc $cppflags + description = Building $out + +rule build_long_cpp_sa + command = $cpptool --analyze --analyzer-no-default-checks $in -Xclang -analyzer-purge=block -Xclang -analyzer-checker=$sa_checkers -o $sareportdir @$out.rsp + description = Building $out + rspfile = $out.rsp + rspfile_content = $pchInc $cppflags + +################################################################################# +# FAST AST Rules +################################################################################# + +rule build_c_fast_ast + command = $ctool -emit-ast -Xclang -fmust-emit-func-decls -c $in -o $out $pchInc $cflags + description = Building $out + +rule build_long_c_fast_ast + command = $ctool -emit-ast -Xclang -fmust-emit-func-decls -c $in -o $out @$out.rsp + description = Building $out + rspfile = $out.rsp + rspfile_content = $pchInc $cflags + +rule build_cpp_fast_ast + command = $cpptool -emit-ast -Xclang -fmust-emit-func-decls -c $in -o $out $pchInc $cppflags + description = Building $out + +rule build_long_cpp_fast_ast + command = $cpptool -emit-ast -Xclang -fmust-emit-func-decls -c $in -o $out @$out.rsp + description = Building $out + rspfile = $out.rsp + rspfile_content = $pchInc $cppflags + +################################################################################# +# FAST SA Rules +################################################################################# + +ast_deps_prefix = Importing AST for File: +rule build_c_fast_sa + command = $ctool --analyze --analyzer-no-default-checks $in -Xanalyzer -analyzer-purge=block -Xanalyzer -analyzer-checker=$sa_checkers -Xanalyzer -emit-ast-deps -o $out + description = Analyzing $in + deps = ast + +rule build_long_c_fast_sa + command = $ctool --analyze --analyzer-no-default-checks $in -Xanalyzer -analyzer-purge=block -Xanalyzer -analyzer-checker=$sa_checkers -Xanalyzer -emit-ast-deps -o $out + description = Analyzing $in + deps = ast + +rule build_cpp_fast_sa + command = $cpptool --analyze --analyzer-no-default-checks $in -Xanalyzer -analyzer-purge=block -Xanalyzer -analyzer-checker=$sa_checkers -Xanalyzer -emit-ast-deps -o $out + description = Analyzing $in + deps = ast + +rule build_long_cpp_fast_sa + command = $cpptool --analyze --analyzer-no-default-checks $in -Xanalyzer -analyzer-purge=block -Xanalyzer -analyzer-checker=$sa_checkers -Xanalyzer -emit-ast-deps -o $out + description = Analyzing $in + deps = ast + +################################################################################# +# Clean Rules +################################################################################# + +rule clean_all + command = ninja -t clean + description = Cleaning build files ... +build clean: clean_all || clean_sa + +rule sa_report_clean + command = rm -rf $sareportdir/*.xml rm -rf $sareportdir/src + description = Cleaning SA Report files .. +build clean_sa: sa_report_clean + +################################################################################# +# Compilation DB Step +################################################################################# + +rule compdb_json + command = $shell ninja -t compdb cc cxx > $out + description = Generating $out +build $builddir/compile_commands.json: compdb_json +build compdb: phony $builddir/compile_commands.json + + diff --git a/tbt_hcetestappA/Debug/src/hcetest.o b/tbt_hcetestappA/Debug/src/hcetest.o new file mode 100644 index 0000000..8bf72a4 Binary files /dev/null and b/tbt_hcetestappA/Debug/src/hcetest.o differ diff --git a/tbt_hcetestappA/Debug/src/subdir.ninja b/tbt_hcetestappA/Debug/src/subdir.ninja new file mode 100644 index 0000000..883be49 --- /dev/null +++ b/tbt_hcetestappA/Debug/src/subdir.ninja @@ -0,0 +1,12 @@ +################################################################################ +# Automatically-generated file. Do not edit! +################################################################################ + + +ctool = clang +cflags = -I"/home/nazib/workspace_TBT_wearable/tbt_hcetestappA/inc" -O0 -g3 -Wall -c -fmessage-length=0 -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/libxml2" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/appcore-agent" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/appcore-watch" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/appfw" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/badge" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/base" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/cairo" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/chromium-ewk" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/ckm" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/contacts-svc" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/content" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/context-service" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/csr" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/dali" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/dali-toolkit" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/dbus-1.0" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/device" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/dlog" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/ecore-1" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/ecore-buffer-1" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/ecore-con-1" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/ecore-evas-1" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/ecore-file-1" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/ecore-imf-1" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/ecore-imf-evas-1" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/ecore-input-1" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/ecore-input-evas-1" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/ecore-ipc-1" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/ector-1" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/e_dbus-1" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/edje-1" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/eet-1" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/efl-1" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/efl-extension" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/efreet-1" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/eina-1" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/eina-1/eina" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/eio-1" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/eldbus-1" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/elementary-1" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/embryo-1" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/emile-1" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/eo-1" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/eom" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/ethumb-1" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/ethumb-client-1" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/evas-1" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/feedback" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/fontconfig" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/freetype2" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/gio-unix-2.0" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/glib-2.0" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/harfbuzz" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/iotcon" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/json-glib-1.0" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/location" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/maps" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/media" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/media-content" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/messaging" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/metadata-editor" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/minizip" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/network" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/notification" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/nsd/" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/phonenumber-utils" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/sensor" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/storage" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/system" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/telephony" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/ui" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/widget_service" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/widget_viewer_evas" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/lib/dbus-1.0/include" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/lib/glib-2.0/include" -target arm-tizen-linux-gnueabi -gcc-toolchain /home/nazib/tizen-sdk/tools/smart-build-interface/../arm-linux-gnueabi-gcc-4.9/ -ccc-gcc-name arm-linux-gnueabi-g++ -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 -mtune=cortex-a8 -Wno-gnu -fPIE --sysroot="/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core" -mthumb -Werror-implicit-function-declaration + +build src/tbt_hcetestappa.o: build_c ../src/tbt_hcetestappa.c +build src/tbt_hcetestappa.o.ast: build_c_fast_ast ../src/tbt_hcetestappa.c +build $sareportdir/src/tbt_hcetestappa.o.xml: build_c_fast_sa src/tbt_hcetestappa.o.ast || externalFnMap.txt +build src/tbt_hcetestappa.o.txt: build_c_api ../src/tbt_hcetestappa.c diff --git a/tbt_hcetestappA/Debug/src/tbt_hcetestappa.o b/tbt_hcetestappA/Debug/src/tbt_hcetestappa.o new file mode 100644 index 0000000..7fffce8 Binary files /dev/null and b/tbt_hcetestappA/Debug/src/tbt_hcetestappa.o differ diff --git a/tbt_hcetestappA/Debug/target.ninja b/tbt_hcetestappA/Debug/target.ninja new file mode 100644 index 0000000..5f9b933 --- /dev/null +++ b/tbt_hcetestappA/Debug/target.ninja @@ -0,0 +1,4 @@ +build main_build: phony tbt_hcetestappa +build all: phony main_build +default all +edje-cc-options = -deps diff --git a/tbt_hcetestappA/Debug/tbt_hcetestappa b/tbt_hcetestappA/Debug/tbt_hcetestappa new file mode 100755 index 0000000..c362ae0 Binary files /dev/null and b/tbt_hcetestappA/Debug/tbt_hcetestappa differ diff --git a/tbt_hcetestappA/inc/logger.h b/tbt_hcetestappA/inc/logger.h new file mode 100644 index 0000000..90badf5 --- /dev/null +++ b/tbt_hcetestappA/inc/logger.h @@ -0,0 +1,58 @@ +/******************************************************************************* + * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + *******************************************************************************/ + +/** + * @file logger.h + * @brief This file provide necessary macro for logging information. + * @since_tizen 2.3 + * @author Amlan Chowdhury (amlan.c@samsung.com) + * @date October, 2014 + * @bug + * @credit + */ +#ifndef __LOGGER_H__ +#define __LOGGER_H__ + +#include + +#define LOG_TAG_CORE "[TBT_HCETest]_" + +#define DLOG(prio, fmt, arg...) dlog_print(prio, LOG_TAG_CORE, "%s (Line: %d) > " fmt, __func__, __LINE__, ##arg) +#define DBG(fmt, arg...) DLOG(DLOG_DEBUG, fmt, ##arg) +#define ERR(fmt, arg...) DLOG(DLOG_ERROR, fmt, ##arg) + +#define RETM_IF(expr, fmt, arg...) \ +{ \ + if (expr) \ + { \ + ERR(fmt, ##arg); \ + return; \ + } \ +} + +#define RETVM_IF(expr, val, fmt, arg...) \ +{ \ + if (expr) \ + { \ + ERR(fmt, ##arg); \ + return (val); \ + } \ +} + +#define SAFE_DELETE(a) if( (a) != NULL ) free (a); (a) = NULL; + +#endif /* __LOGGER_H__ */ diff --git a/tbt_hcetestappA/inc/tbt_hcetestappa.h b/tbt_hcetestappA/inc/tbt_hcetestappa.h new file mode 100644 index 0000000..e6d3dd8 --- /dev/null +++ b/tbt_hcetestappA/inc/tbt_hcetestappa.h @@ -0,0 +1,23 @@ +#ifndef __hcetest_H__ +#define __hcetest_H__ + +#include +#include +#include +#include +#include "logger.h" +#include + +#ifdef LOG_TAG +#undef LOG_TAG +#endif +#define LOG_TAG "tbt_hcetestappa" + +#if !defined(PACKAGE) +#define PACKAGE "org.tizen.tbt_hcetestappa" +#endif + +#define NFC_APPCONTROL_STRING \ + "http://tizen.org/appcontrol/operation/nfc/card_emulation/host_apdu_service" + +#endif /* __hcetest_H__ */ diff --git a/tbt_hcetestappA/project_def.prop b/tbt_hcetestappA/project_def.prop new file mode 100644 index 0000000..6fb77d1 --- /dev/null +++ b/tbt_hcetestappA/project_def.prop @@ -0,0 +1,11 @@ +APPNAME = hcetest + +type = app +profile = wearable-3.0 + +USER_SRCS = src/hcetest.c +USER_DEFS = +USER_INC_DIRS = inc +USER_OBJS = +USER_LIBS = +USER_EDCS = diff --git a/tbt_hcetestappA/shared/res/hcetest.png b/tbt_hcetestappA/shared/res/hcetest.png new file mode 100644 index 0000000..9765b1b Binary files /dev/null and b/tbt_hcetestappA/shared/res/hcetest.png differ diff --git a/tbt_hcetestappA/shared/res/wallet.xml b/tbt_hcetestappA/shared/res/wallet.xml new file mode 100644 index 0000000..67899e3 --- /dev/null +++ b/tbt_hcetestappA/shared/res/wallet.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/tbt_hcetestappA/src/tbt_hcetestappa.c b/tbt_hcetestappA/src/tbt_hcetestappa.c new file mode 100644 index 0000000..6741a2e --- /dev/null +++ b/tbt_hcetestappA/src/tbt_hcetestappa.c @@ -0,0 +1,252 @@ +#include "tbt_hcetestappa.h" + +typedef struct appdata { + Evas_Object *win; + Evas_Object *conform; + Evas_Object *label; +} appdata_s; + +static void +win_delete_request_cb(void *data, Evas_Object *obj, void *event_info) +{ + ui_app_exit(); +} + +static void +win_back_cb(void *data, Evas_Object *obj, void *event_info) +{ + appdata_s *ad = data; + /* Let window go to hide state. */ + elm_win_lower(ad->win); +} + +static void +create_base_gui(appdata_s *ad) +{ + /* Window */ + /* Create and initialize elm_win. + elm_win is mandatory to manipulate window. */ + ad->win = elm_win_util_standard_add(PACKAGE, PACKAGE); + elm_win_autodel_set(ad->win, EINA_TRUE); + + if (elm_win_wm_rotation_supported_get(ad->win)) { + int rots[4] = { 0, 90, 180, 270 }; + elm_win_wm_rotation_available_rotations_set(ad->win, (const int *)(&rots), 4); + } + + evas_object_smart_callback_add(ad->win, "delete,request", win_delete_request_cb, NULL); + eext_object_event_callback_add(ad->win, EEXT_CALLBACK_BACK, win_back_cb, ad); + + /* Conformant */ + /* Create and initialize elm_conformant. + elm_conformant is mandatory for base gui to have proper size + when indicator or virtual keypad is visible. */ + ad->conform = elm_conformant_add(ad->win); + elm_win_indicator_mode_set(ad->win, ELM_WIN_INDICATOR_SHOW); + elm_win_indicator_opacity_set(ad->win, ELM_WIN_INDICATOR_OPAQUE); + evas_object_size_hint_weight_set(ad->conform, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + elm_win_resize_object_add(ad->win, ad->conform); + evas_object_show(ad->conform); + + /* Label */ + /* Create an actual view of the base gui. + Modify this part to change the view. */ + ad->label = elm_label_add(ad->conform); + elm_object_text_set(ad->label, "HCE test"); + evas_object_size_hint_weight_set(ad->label, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + elm_object_content_set(ad->conform, ad->label); + + /* Show window after base gui is set up */ + evas_object_show(ad->win); +} + +static void hce_event_cb(nfc_se_h handle, nfc_hce_event_type_e event, unsigned char *apdu, unsigned int apdu_len, void *user_data) +{ + + appdata_s *ad = user_data; + + nfc_error_e ret = NFC_ERROR_NONE; + unsigned char resp[] = {0x11, 0x12, 0x90, 0x00}; + char cmd_apdu[1024] = {0,}; + + switch(event) { + case NFC_HCE_EVENT_DEACTIVATED: + DBG("hce_event_cb() event type : NFC_HCE_EVENT_DEACTIVATED"); + break; + case NFC_HCE_EVENT_ACTIVATED: + DBG("hce_event_cb() event type : NFC_HCE_EVENT_ACTIVATED"); + break; + case NFC_HCE_EVENT_APDU_RECEIVED: + //hex to string + for (int i = 0; i < apdu_len; i++) { + sprintf(&(cmd_apdu[i*2]), "%02X", apdu[i]); + } + DBG("hce_event_cb() event type : NFC_HCE_EVENT_APDU_RECEIVED [%s]", cmd_apdu); + elm_object_text_set(ad->label, "Data Received"); + + ret = nfc_hce_send_apdu_response(handle, resp, sizeof(resp)); + DBG("nfc_hce_send_apdu_response() result : [%d]", ret); + + break; + default: + break; + } + + return; +} + +static bool +app_create(void *data) +{ + /* Hook to take necessary actions before main event loop starts + Initialize UI resources and application's data + If this function returns true, the main loop of application starts + If this function returns false, the application is terminated */ + + appdata_s *ad = data; + + create_base_gui(ad); + + return true; +} + +static void +app_control(app_control_h app_control, void *data) +{ + /* Handle the launch request. */ + + DBG("app_control enter"); + + int ret; + char *operation, *aid; + + app_control_get_operation(app_control, &operation); + if ((strncmp(operation, NFC_APPCONTROL_STRING, strlen(NFC_APPCONTROL_STRING)) == 0)) { + DBG("nfc appcontrol operation : [%s]", operation); + app_control_get_extra_data(app_control, "data", &aid); + DBG("nfc appcontrol uri : [%s]", aid); + } + + ret = nfc_manager_initialize(); + + if (ret == NFC_ERROR_NONE) { + nfc_se_card_emulation_mode_type_e type; + + ret = nfc_se_get_card_emulation_mode(&type); + + if (ret == NFC_ERROR_NONE) { + if (type == NFC_SE_CARD_EMULATION_MODE_OFF) + nfc_se_enable_card_emulation(); + + ret = nfc_manager_set_hce_event_cb(hce_event_cb, data); + if (ret != NFC_ERROR_NONE) + DBG("nfc_manager_set_hce_event_cb result : [%d]", ret); + + } else { + DBG("nfc_se_get_card_emulation_mode result : [%d]", ret); + } + } else { + DBG("nfc_manager_initialize result : [%d]", ret); + } + + DBG("nfc init start end"); + + DBG("app_control exit"); + +} + +static void +app_pause(void *data) +{ + /* Take necessary actions when application becomes invisible. */ + DBG("app_pause enter"); + nfc_manager_unset_hce_event_cb(); + DBG("app_pause exit"); +} + +static void +app_resume(void *data) +{ + /* Take necessary actions when application becomes visible. */ + DBG("app_resume enter"); + nfc_manager_set_hce_event_cb(hce_event_cb, data); + DBG("app_resume exit"); +} + +static void +app_terminate(void *data) +{ + /* Release all resources. */ + DBG("app_terminate enter"); + + nfc_manager_unset_hce_event_cb(); + nfc_manager_deinitialize(); + DBG("nfc_manager_deinitialize"); + + DBG("app_terminate exit"); +} + +static void +ui_app_lang_changed(app_event_info_h event_info, void *user_data) +{ + /*APP_EVENT_LANGUAGE_CHANGED*/ + char *locale = NULL; + system_settings_get_value_string(SYSTEM_SETTINGS_KEY_LOCALE_LANGUAGE, &locale); + elm_language_set(locale); + free(locale); + return; +} + +static void +ui_app_orient_changed(app_event_info_h event_info, void *user_data) +{ + /*APP_EVENT_DEVICE_ORIENTATION_CHANGED*/ + return; +} + +static void +ui_app_region_changed(app_event_info_h event_info, void *user_data) +{ + /*APP_EVENT_REGION_FORMAT_CHANGED*/ +} + +static void +ui_app_low_battery(app_event_info_h event_info, void *user_data) +{ + /*APP_EVENT_LOW_BATTERY*/ +} + +static void +ui_app_low_memory(app_event_info_h event_info, void *user_data) +{ + /*APP_EVENT_LOW_MEMORY*/ +} + +int +main(int argc, char *argv[]) +{ + appdata_s ad = {0,}; + int ret = 0; + + ui_app_lifecycle_callback_s event_callback = {0,}; + app_event_handler_h handlers[5] = {NULL, }; + + event_callback.create = app_create; + event_callback.terminate = app_terminate; + event_callback.pause = app_pause; + event_callback.resume = app_resume; + event_callback.app_control = app_control; + + ui_app_add_event_handler(&handlers[APP_EVENT_LOW_BATTERY], APP_EVENT_LOW_BATTERY, ui_app_low_battery, &ad); + ui_app_add_event_handler(&handlers[APP_EVENT_LOW_MEMORY], APP_EVENT_LOW_MEMORY, ui_app_low_memory, &ad); + ui_app_add_event_handler(&handlers[APP_EVENT_DEVICE_ORIENTATION_CHANGED], APP_EVENT_DEVICE_ORIENTATION_CHANGED, ui_app_orient_changed, &ad); + ui_app_add_event_handler(&handlers[APP_EVENT_LANGUAGE_CHANGED], APP_EVENT_LANGUAGE_CHANGED, ui_app_lang_changed, &ad); + ui_app_add_event_handler(&handlers[APP_EVENT_REGION_FORMAT_CHANGED], APP_EVENT_REGION_FORMAT_CHANGED, ui_app_region_changed, &ad); + + ret = ui_app_main(argc, argv, &event_callback, &ad); + if (ret != APP_ERROR_NONE) { + DBG("app_main() is failed. err = %d", ret); + } + + return ret; +} diff --git a/tbt_hcetestappA/tizen-manifest.xml b/tbt_hcetestappA/tizen-manifest.xml new file mode 100644 index 0000000..d5e519f --- /dev/null +++ b/tbt_hcetestappA/tizen-manifest.xml @@ -0,0 +1,18 @@ + + + + + + hcetest.png + + + + + + + + http://tizen.org/privilege/nfc + http://tizen.org/privilege/haptic + http://tizen.org/privilege/nfc.cardemulation + + diff --git a/tbt_hcetestappB/.cproject b/tbt_hcetestappB/.cproject new file mode 100644 index 0000000..4a91b7e --- /dev/null +++ b/tbt_hcetestappB/.cproject @@ -0,0 +1,547 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tbt_hcetestappB/.exportMap b/tbt_hcetestappB/.exportMap new file mode 100644 index 0000000..43e310e --- /dev/null +++ b/tbt_hcetestappB/.exportMap @@ -0,0 +1,4 @@ +{ + global: main; + local: *; +}; diff --git a/tbt_hcetestappB/.project b/tbt_hcetestappB/.project new file mode 100644 index 0000000..a2dbffb --- /dev/null +++ b/tbt_hcetestappB/.project @@ -0,0 +1,46 @@ + + + tbt_hcetestappB + + + + + + org.eclipse.cdt.managedbuilder.core.genmakebuilder + + + + + org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder + full,incremental, + + + + + + org.eclipse.cdt.core.cnature + org.eclipse.cdt.core.ccnature + org.eclipse.cdt.managedbuilder.core.managedBuildNature + org.eclipse.cdt.managedbuilder.core.ScannerConfigNature + + + + 0 + + 26 + + org.eclipse.ui.ide.multiFilter + 1.0-projectRelativePath-matches-false-false-*/.tpk + + + + 0 + + 6 + + org.eclipse.ui.ide.multiFilter + 1.0-name-matches-false-false-project_def.prop + + + + diff --git a/tbt_hcetestappB/.rds_delta b/tbt_hcetestappB/.rds_delta new file mode 100644 index 0000000..57335c7 --- /dev/null +++ b/tbt_hcetestappB/.rds_delta @@ -0,0 +1,6 @@ +#delete +#add +#modify +author-signature.xml +signature1.xml +shared/res/wallet.xml diff --git a/tbt_hcetestappB/.sdk_delta.info b/tbt_hcetestappB/.sdk_delta.info new file mode 100644 index 0000000..8924681 Binary files /dev/null and b/tbt_hcetestappB/.sdk_delta.info differ diff --git a/tbt_hcetestappB/.sign/.manifest.tmp b/tbt_hcetestappB/.sign/.manifest.tmp new file mode 100644 index 0000000..97bb3cb --- /dev/null +++ b/tbt_hcetestappB/.sign/.manifest.tmp @@ -0,0 +1,5 @@ +bin/tbt_hcetestappb__DEL__L8SfNZdZq+2bJzYPw4yQZHFt/m5AJRiBxvVH+8tiDSs= +shared/res/tbt_hcetestappb.png__DEL__1d0oEZHqPn+QzNzGIHwj9ODby6x9ggFs9uOsav6jPNs= +shared/res/wallet.xml__DEL__t7ey7VsDLoJ1OEzAxHKDZckOTJGErqz4Zi252DNqC4A= +tizen-manifest.xml__DEL__pUNWMStmxkDj63cVNuygp0C7/1KCyhqnjcKRduPuvMA= +author-signature.xml__DEL__F+kYFJfXeR5Mpbb/LPtNSAa3Z5Xu2WGSI4IPZUIKCyY= diff --git a/tbt_hcetestappB/.sign/author-signature.xml b/tbt_hcetestappB/.sign/author-signature.xml new file mode 100644 index 0000000..03f99a5 --- /dev/null +++ b/tbt_hcetestappB/.sign/author-signature.xml @@ -0,0 +1,70 @@ + + + + + + +L8SfNZdZq+2bJzYPw4yQZHFt/m5AJRiBxvVH+8tiDSs= + + + +1d0oEZHqPn+QzNzGIHwj9ODby6x9ggFs9uOsav6jPNs= + + + +t7ey7VsDLoJ1OEzAxHKDZckOTJGErqz4Zi252DNqC4A= + + + +pUNWMStmxkDj63cVNuygp0C7/1KCyhqnjcKRduPuvMA= + + + + + + +lpo8tUDs054eLlBQXiDPVDVKfw30ZZdtkRs1jd7H5K8= + + + +APztEJ5Ya3u0v8lxE2sYtAc0VzowSTg/NpUmTg9dql0agE6aOzyjLIvnu5MvPPCDu4hPptKcE7kn +KizsvAKqog8+W0mxWYkFbKVE7fLO/t87GScS4pCKE4GzKykFvnc+42M9D79nx5Z/putWOai1f981 +sbC/XgTASK9qHuyHVPw= + + + + +MIIClTCCAX2gAwIBAgIGAVVxvR2gMA0GCSqGSIb3DQEBBQUAMFYxGjAYBgNVBAoMEVRpemVuIEFz +c29jaWF0aW9uMRowGAYDVQQLDBFUaXplbiBBc3NvY2lhdGlvbjEcMBoGA1UEAwwTVGl6ZW4gRGV2 +ZWxvcGVycyBDQTAeFw0xMjExMDEwMDAwMDBaFw0xOTAxMDEwMDAwMDBaMBExDzANBgNVBAMMBmF1 +dGhvcjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAjthQAiStjKCq/RmRd4Whk1i1FL50jJw8 +5mPEp3okCuqI7sDrOuQpF4kAmmpkXKJ9GHuF0r2qh5Xc5cTg8iXFJkx72vXLkRo6FnyOIZAiaIl7 +z+McpJtH+MDkDC2RHkfEeyZgdE5WVnsWTEVEnY8TAjgSdI7DMrZWCJkN2YIRv1kCAwEAAaMyMDAw +DAYDVR0TAQH/BAIwADALBgNVHQ8EBAMCB4AwEwYDVR0lBAwwCgYIKwYBBQUHAwMwDQYJKoZIhvcN +AQEFBQADggEBANP1v+QVda62aYwoYUwIxY84f1jnxxz7PI6MGlvJ9/zjSOaFsuMm0nCvfoeR6bkc +gZO0ImrFS++AkD+efs/LGSe+WDgNqV+eCHBtpP+01jbsdrmNLF0mERxcfsleywQWj3THEnr59Av0 +CAZ/KdAMoSQ5qpQ5wxcWd6s2Ua2cgWk9ftEQMv/OnvDipYPp9HujiHvOjmfSZm3vw/UspW07CGTt +omHSdZIMKh7FqSKen0Ztcp/H3kBhzNDemyu7TpTVyVcsCKHirN4bztsOqClI5z7QqyKhPT0XUMTQ +AaHviQeBv6gF+10OK0iqBonqJ2RPPrGj/4SZI8ALGWa8YxoNqkU= + + +MIIDOTCCAiGgAwIBAgIBATANBgkqhkiG9w0BAQUFADBYMRowGAYDVQQKDBFUaXplbiBBc3NvY2lh +dGlvbjEaMBgGA1UECwwRVGl6ZW4gQXNzb2NpYXRpb24xHjAcBgNVBAMMFVRpemVuIERldmVsb3Bl +cnMgUm9vdDAeFw0xMjAxMDEwMDAwMDBaFw0yNzAxMDEwMDAwMDBaMFYxGjAYBgNVBAoMEVRpemVu +IEFzc29jaWF0aW9uMRowGAYDVQQLDBFUaXplbiBBc3NvY2lhdGlvbjEcMBoGA1UEAwwTVGl6ZW4g +RGV2ZWxvcGVycyBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANVGhRGmMIUyBA7o +PCz8Sxut6z6HNkF4oDIuzuKaMzRYPeWodwe9O0gmqAkToQHfwg2giRhE5GoPld0fq+OYMMwSasCu +g8dwODx1eDeSYVuOLWRxpAmbTXOsSFi6VoWeyaPEm18JBHvZBsU5YQtgZ6Kp7MqzvQg3pXOxtajj +vyHxiatJl+xXrHgcXC1wgyG3buty7u/Fi2mvKXJ0PRJcCjjK81dqe/Vr20sRUCrbk02zbm5ggFt/ +jIEhV8wbFRQpliobc7J4dSTKhFfrqGM8rdd54LYhD7gSI1CFSe16pUXfcVR7FhJztRaiGLnCrwBE +dyTZ248+D4L/qR/D0axb3jcCAwEAAaMQMA4wDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOC +AQEAnOXXQ/1O/QTDHyrmQDtFziqPY3xWlJBqJtEqXiT7Y+Ljpe66e+Ee/OjQMlZe8gu21/8cKklH +95RxjopMWCVedXDUbWdvS2+CdyvVW/quT2E0tjqIzXDekUTYwwhlPWlGxvfj3VsxqSFq3p8Brl04 +1Gx5RKAGyKVsMfTLhbbwSWwApuBUxYfcNpKwLWGPXkysu+HctY03OKv4/xKBnVWiN8ex/Sgesi0M ++OBAOMdZMPK32uJBTeKFx1xZgTLIhk45V0hPOomPjZloiv0LSS11eyd451ufjW0iHRE7WlpR6EvI +W6TFyZgMpQq+kg4hWl2SBTf3s2VI8Ygz7gj8TMlClg== + + + + + \ No newline at end of file diff --git a/tbt_hcetestappB/.sign/signature1.xml b/tbt_hcetestappB/.sign/signature1.xml new file mode 100644 index 0000000..32eb1f7 --- /dev/null +++ b/tbt_hcetestappB/.sign/signature1.xml @@ -0,0 +1,72 @@ + + + + + + +F+kYFJfXeR5Mpbb/LPtNSAa3Z5Xu2WGSI4IPZUIKCyY= + + + +L8SfNZdZq+2bJzYPw4yQZHFt/m5AJRiBxvVH+8tiDSs= + + + +1d0oEZHqPn+QzNzGIHwj9ODby6x9ggFs9uOsav6jPNs= + + + +t7ey7VsDLoJ1OEzAxHKDZckOTJGErqz4Zi252DNqC4A= + + + +pUNWMStmxkDj63cVNuygp0C7/1KCyhqnjcKRduPuvMA= + + + + + + +u/jU3U4Zm5ihTMSjKGlGYbWzDfRkGphPPHx3gJIYEJ4= + + + +qYz565060T18B2G5yw/gZYrJu5vPSw+wVGQpS4ai4T4EK2QLm/uiEX6Nc3UOMXhuRz1Nl3QT1w+z +LzPxwBEAyHVmgflkzW30PmpauSd6Ae9Zwl7SkDt81+I1VPwcaKxkTAwYX+pPP5C9IuhrBOf+aNZU +ETsELKBNaT7Zsrc929I= + + + + +MIICmzCCAgQCCQDXI7WLdVZwiTANBgkqhkiG9w0BAQUFADCBjzELMAkGA1UEBhMCS1IxDjAMBgNV +BAgMBVN1d29uMQ4wDAYDVQQHDAVTdXdvbjEWMBQGA1UECgwNVGl6ZW4gVGVzdCBDQTEiMCAGA1UE +CwwZVGl6ZW4gRGlzdHJpYnV0b3IgVGVzdCBDQTEkMCIGA1UEAwwbVGl6ZW4gUHVibGljIERpc3Ry +aWJ1dG9yIENBMB4XDTEyMTAyOTEzMDMwNFoXDTIyMTAyNzEzMDMwNFowgZMxCzAJBgNVBAYTAktS +MQ4wDAYDVQQIDAVTdXdvbjEOMAwGA1UEBwwFU3V3b24xFjAUBgNVBAoMDVRpemVuIFRlc3QgQ0Ex +IjAgBgNVBAsMGVRpemVuIERpc3RyaWJ1dG9yIFRlc3QgQ0ExKDAmBgNVBAMMH1RpemVuIFB1Ymxp +YyBEaXN0cmlidXRvciBTaWduZXIwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBALtMvlc5hENK +90ZdA+y66+Sy0enD1gpZDBh5T9RP0oRsptJv5jjNTseQbQi0SZOdOXb6J7iQdlBCtR343RpIEz8H +mrBy7mSY7mgwoU4EPpp4CTSUeAuKcmvrNOngTp5Hv7Ngf02TTHOLK3hZLpGayaDviyNZB5PdqQdB +hokKjzAzAgMBAAEwDQYJKoZIhvcNAQEFBQADgYEAvGp1gxxAIlFfhJH1efjb9BJK/rtRkbYn9+Ez +GEbEULg1svsgnyWisFimI3uFvgI/swzr1eKVY3Sc8MQ3+Fdy3EkbDZ2+WAubhcEkorTWjzWz2fL1 +vKaYjeIsuEX6TVRUugHWudPzcEuQRLQf8ibZWjbQdBmpeQYBMg5x+xKLCJc= + + +MIICtDCCAh2gAwIBAgIJAMDbehElPNKvMA0GCSqGSIb3DQEBBQUAMIGVMQswCQYDVQQGEwJLUjEO +MAwGA1UECAwFU3V3b24xDjAMBgNVBAcMBVN1d29uMRYwFAYDVQQKDA1UaXplbiBUZXN0IENBMSMw +IQYDVQQLDBpUVGl6ZW4gRGlzdHJpYnV0b3IgVGVzdCBDQTEpMCcGA1UEAwwgVGl6ZW4gUHVibGlj +IERpc3RyaWJ1dG9yIFJvb3QgQ0EwHhcNMTIxMDI5MTMwMjUwWhcNMjIxMDI3MTMwMjUwWjCBjzEL +MAkGA1UEBhMCS1IxDjAMBgNVBAgMBVN1d29uMQ4wDAYDVQQHDAVTdXdvbjEWMBQGA1UECgwNVGl6 +ZW4gVGVzdCBDQTEiMCAGA1UECwwZVGl6ZW4gRGlzdHJpYnV0b3IgVGVzdCBDQTEkMCIGA1UEAwwb +VGl6ZW4gUHVibGljIERpc3RyaWJ1dG9yIENBMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDe +OTS/3nXvkDEmsFCJIvRlQ3RKDcxdWJJp625pFqHdmoJBdV+x6jl1raGK2Y1sp2Gdvpjc/z92yzAp +bE/UVLPh/tRNZPeGhzU4ejDDm7kzdr2f7Ia0U98K+OoY12ucwg7TYNItj9is7Cj4blGfuMDzd2ah +2AgnCGlwNwV/pv+uVQIDAQABoxAwDjAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4GBACqJ +KO33YdoGudwanZIxMdXuxnnD9R6u72ltKk1S4zPfMJJv482CRGCI4FK6djhlsI4i0Lt1SVIJEed+ +yc3qckGm19dW+4xdlkekon7pViEBWuyHw8OWv3RXtTum1+PGHjBJ2eYY4ZKIpz73U/1NC16sTB/0 +VhfnkHwPltmrpYVe + + + + + \ No newline at end of file diff --git a/tbt_hcetestappB/.tproject b/tbt_hcetestappB/.tproject new file mode 100644 index 0000000..40cfb4c --- /dev/null +++ b/tbt_hcetestappB/.tproject @@ -0,0 +1,11 @@ + + + + + wearable-3.0 + + + + + + diff --git a/tbt_hcetestappB/Debug/.ninja_deps b/tbt_hcetestappB/Debug/.ninja_deps new file mode 100644 index 0000000..c321fd9 Binary files /dev/null and b/tbt_hcetestappB/Debug/.ninja_deps differ diff --git a/tbt_hcetestappB/Debug/.ninja_log b/tbt_hcetestappB/Debug/.ninja_log new file mode 100644 index 0000000..14aeec1 --- /dev/null +++ b/tbt_hcetestappB/Debug/.ninja_log @@ -0,0 +1,77 @@ +# ninja log v5 +0 339 0 src/hcetest_appb.o 9ece8ab86f4c69f +339 482 0 hcetest_appb e26959c10bcf56f3 +0 1 0 clean_sa b7acd3c680d5000e +1 5 0 clean d59b6dac04fa9b5d +3 305 0 src/hcetest_appb.o 9ece8ab86f4c69f +305 446 0 hcetest_appb e26959c10bcf56f3 +3 2957 0 src/hcetest_appb.o c27d6cc1cbedea49 +2957 5232 0 hcetest_appb 5540a0d9cc1dfd52 +2 319 0 src/hcetest_appb.o c27d6cc1cbedea49 +319 478 0 hcetest_appb 5540a0d9cc1dfd52 +2 322 0 src/hcetest_appb.o c27d6cc1cbedea49 +322 488 0 hcetest_appb 5540a0d9cc1dfd52 +1 279 0 src/hcetest_appb.o 4fb59182aab18cdb +279 457 0 hcetest_appb adccfdd10e2d3e52 +2 293 0 src/hcetest_appb.o 4fb59182aab18cdb +293 484 0 hcetest_appb adccfdd10e2d3e52 +1 283 0 src/hcetest_appb.o 4fb59182aab18cdb +283 446 0 hcetest_appb adccfdd10e2d3e52 +2 281 0 src/hcetest_appb.o 4fb59182aab18cdb +281 451 0 hcetest_appb adccfdd10e2d3e52 +1 281 0 src/hcetest_appb.o 4fb59182aab18cdb +282 450 0 hcetest_appb adccfdd10e2d3e52 +3 277 0 src/hcetest_appb.o 4fb59182aab18cdb +277 441 0 hcetest_appb adccfdd10e2d3e52 +1 304 0 src/hcetest_appb.o 4fb59182aab18cdb +304 469 0 hcetest_appb adccfdd10e2d3e52 +4 297 0 src/hcetest_appb.o 4fb59182aab18cdb +298 494 0 hcetest_appb adccfdd10e2d3e52 +2 276 0 src/hcetest_appb.o 4fb59182aab18cdb +276 445 0 hcetest_appb adccfdd10e2d3e52 +3 337 0 src/hcetest_appb.o 4fb59182aab18cdb +337 504 0 hcetest_appb adccfdd10e2d3e52 +2 303 0 src/hcetest_appb.o 4fb59182aab18cdb +303 474 0 hcetest_appb adccfdd10e2d3e52 +1 291 0 src/hcetest_appb.o 4fb59182aab18cdb +291 469 0 hcetest_appb adccfdd10e2d3e52 +2 370 0 src/hcetest_appb.o 4fb59182aab18cdb +370 551 0 hcetest_appb adccfdd10e2d3e52 +2 297 0 src/hcetest_appb.o 4fb59182aab18cdb +297 464 0 hcetest_appb adccfdd10e2d3e52 +2 292 0 src/hcetest_appb.o 4fb59182aab18cdb +292 471 0 hcetest_appb adccfdd10e2d3e52 +2 284 0 src/hcetest_appb.o 4fb59182aab18cdb +285 451 0 hcetest_appb adccfdd10e2d3e52 +1 342 0 src/hcetest_appb.o 4fb59182aab18cdb +342 508 0 hcetest_appb adccfdd10e2d3e52 +3 288 0 src/hcetest_appb.o 4fb59182aab18cdb +288 453 0 hcetest_appb adccfdd10e2d3e52 +1 289 0 src/hcetest_appb.o 4fb59182aab18cdb +289 468 0 hcetest_appb adccfdd10e2d3e52 +1 400 0 src/hcetest_appb.o 4fb59182aab18cdb +400 577 0 hcetest_appb adccfdd10e2d3e52 +2 361 0 src/hcetest_appb.o 4fb59182aab18cdb +361 540 0 hcetest_appb adccfdd10e2d3e52 +2 283 0 src/hcetest_appb.o 4fb59182aab18cdb +283 445 0 hcetest_appb adccfdd10e2d3e52 +2 284 0 src/hcetest_appb.o 4fb59182aab18cdb +284 446 0 hcetest_appb adccfdd10e2d3e52 +0 353 0 src/tbt_hcetestappb.o 3c11ef84a23171fc +353 515 0 tbt_hcetestappb e33ad095e6d3473c +0 3 0 clean_sa 86eb31658fb0742e +3 6 0 clean d59b6dac04fa9b5d +1 408 0 src/tbt_hcetestappb.o 3c11ef84a23171fc +408 571 0 tbt_hcetestappb e33ad095e6d3473c +2 292 0 src/tbt_hcetestappb.o 3c11ef84a23171fc +293 456 0 tbt_hcetestappb e33ad095e6d3473c +2 287 0 src/tbt_hcetestappb.o 3c11ef84a23171fc +287 449 0 tbt_hcetestappb e33ad095e6d3473c +2 340 0 src/tbt_hcetestappb.o 3c11ef84a23171fc +340 507 0 tbt_hcetestappb e33ad095e6d3473c +2 343 0 src/tbt_hcetestappb.o 3c11ef84a23171fc +343 512 0 tbt_hcetestappb e33ad095e6d3473c +0 4 0 clean_sa 86eb31658fb0742e +4 7 0 clean d59b6dac04fa9b5d +2 289 0 src/tbt_hcetestappb.o 3c11ef84a23171fc +290 455 0 tbt_hcetestappb e33ad095e6d3473c diff --git a/tbt_hcetestappB/Debug/build.ninja b/tbt_hcetestappB/Debug/build.ninja new file mode 100644 index 0000000..b9281cb --- /dev/null +++ b/tbt_hcetestappB/Debug/build.ninja @@ -0,0 +1,24 @@ +################################################################################ +# Automatically-generated file. Do not edit! +################################################################################ + +ninja_required_version = 1.5 +include rules.ninja +include target.ninja + +shell = +builddir = /home/nazib/workspace_TBT_wearable/tbt_hcetestappB/Debug +sareportdir = /home/nazib/workspace_TBT_wearable/tbt_hcetestappB/SA_Report +sa_checkers = alpha,cplusplus,core,deadcode,resourceLeak,security,unix + +subninja ../Debug/src/subdir.ninja + +targettool = clang++ +targetflags = -L"/home/nazib/workspace_TBT_wearable/tbt_hcetestappB/lib" -target arm-tizen-linux-gnueabi -gcc-toolchain /home/nazib/tizen-sdk/tools/smart-build-interface/../arm-linux-gnueabi-gcc-4.9/ -ccc-gcc-name arm-linux-gnueabi-g++ -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 -mtune=cortex-a8 -Xlinker --as-needed -pie -lpthread -Xlinker -rpath="/home/developer/sdk_tools/lib" --sysroot="/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core" -Xlinker --version-script="/home/nazib/workspace_TBT_wearable/tbt_hcetestappB/.exportMap" -L"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/lib" -lBrokenLocale -laccounts-svc -lanl -lappcore-agent -lappcore-watch -lbadge -lbase-utils-i18n -lbundle -lcairo -lcapi-appfw-alarm -lcapi-appfw-app-common -lcapi-appfw-app-control -lcapi-appfw-application -lcapi-appfw-app-manager -lcapi-appfw-event -lcapi-appfw-package-manager -lcapi-appfw-preference -lcapi-appfw-widget-application -lcapi-base-common -lcapi-content-media-content -lcapi-content-mime-type -lcapi-location-manager -lcapi-maps-service -lcapi-media-audio-io -lcapi-media-camera -lcapi-media-codec -lcapi-media-controller -lcapi-mediademuxer -lcapi-media-image-util -lcapi-media-metadata-editor -lcapi-media-metadata-extractor -lcapi-mediamuxer -lcapi-media-player -lcapi-media-radio -lcapi-media-recorder -lcapi-media-sound-manager -lcapi-media-streamer -lcapi-media-streamrecorder -lcapi-media-thumbnail-util -lcapi-media-tone-player -lcapi-media-tool -lcapi-media-vision -lcapi-media-wav-player -lcapi-messaging-email -lcapi-messaging-messages -lcapi-network-bluetooth -lcapi-network-connection -lcapi-network-http -lcapi-network-mtp -lcapi-network-nfc -lcapi-network-smartcard -lcapi-network-wifi -lcapi-system-device -lcapi-system-info -lcapi-system-media-key -lcapi-system-runtime-info -lcapi-system-sensor -lcapi-system-system-settings -lcapi-telephony -lcapi-ui-efl-util -lcapi-ui-inputmethod-manager -lcapi-ui-inputmethod -lcapi-vpnsvc -lchromium-ewk -lcidn -lcontacts-service2 -lcore-context-manager -lcore-sync-client -lcrypto -lcrypt -lc -lcsr-client -lcurl -ld2d-conv-manager -ldali-adaptor -ldali-core -ldali-toolkit -ldata-control -ldlog -ldl -lebluez -leconnman0_7x -lecore_buffer -lecore_con -lecore_evas -lecore_file -lecore_imf_evas -lecore_imf -lecore_input_evas -lecore_input -lecore_ipc -lecore -ledbus -ledje -leet -lefl-extension -lefreet_mime -lefreet -lefreet_trash -lehal -leina -leio -lelementary -lembryo -lenotify -leofono -leom -leo -lethumb_client -lethumb -leukit -levas -lexif -lfeedback -lfido-client -lfontconfig -lfreetype -lgio-2.0 -lglib-2.0 -lgmodule-2.0 -lgobject-2.0 -lgthread-2.0 -lharfbuzz-icu -lharfbuzz -liotcon -ljson-glib-1.0 -lkey-manager-client -lmessage-port -lminizip -lm -lnotification -lnsd-dns-sd -lnsd-ssdp -lnsl -lnss_compat -lnss_dns -lnss_files -lnss_hesiod -lnss_nisplus -lnss_nis -loauth2 -loauth -lopenal -lphonenumber-utils -lprivilege-info -lpthread -lpush -lresolv -lrt -lsqlite3 -lssl -lstorage -lstt -ltbm -lthread_db -lttrace -ltts -lutil -lvc-elm -lvc -lwidget_service -lwidget_viewer_evas -lxml2 -lz -Xlinker -rpath="/opt/usr/apps/org.tizen.tbt_hcetestappb/lib" -Werror-implicit-function-declaration + +build tbt_hcetestappb: build_target src/tbt_hcetestappb.o +build ast: phony src/tbt_hcetestappb.o.ast +build externalFnMap.txt: fast_ext_fn src/tbt_hcetestappb.o.ast +build sa: phony $sareportdir/src/tbt_hcetestappb.o.xml +build apichecker: unusedapi_rule src/tbt_hcetestappb.o.txt + diff --git a/tbt_hcetestappB/Debug/compile_commands.json b/tbt_hcetestappB/Debug/compile_commands.json new file mode 100644 index 0000000..337899b --- /dev/null +++ b/tbt_hcetestappB/Debug/compile_commands.json @@ -0,0 +1,5 @@ +[ + { "directory": "/home/nazib/workspace_TBT_wearable/tbt_hcetestappB/Debug", + "command": "clang -I\"/home/nazib/workspace_TBT_wearable/tbt_hcetestappB/inc\" -O0 -g3 -Wall -c -fmessage-length=0 -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/libxml2\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/appcore-agent\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/appcore-watch\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/appfw\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/badge\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/base\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/cairo\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/chromium-ewk\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/ckm\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/contacts-svc\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/content\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/context-service\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/csr\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/dali\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/dali-toolkit\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/dbus-1.0\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/device\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/dlog\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/ecore-1\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/ecore-buffer-1\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/ecore-con-1\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/ecore-evas-1\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/ecore-file-1\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/ecore-imf-1\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/ecore-imf-evas-1\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/ecore-input-1\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/ecore-input-evas-1\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/ecore-ipc-1\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/ector-1\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/e_dbus-1\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/edje-1\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/eet-1\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/efl-1\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/efl-extension\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/efreet-1\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/eina-1\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/eina-1/eina\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/eio-1\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/eldbus-1\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/elementary-1\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/embryo-1\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/emile-1\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/eo-1\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/eom\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/ethumb-1\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/ethumb-client-1\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/evas-1\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/feedback\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/fontconfig\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/freetype2\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/gio-unix-2.0\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/glib-2.0\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/harfbuzz\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/iotcon\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/json-glib-1.0\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/location\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/maps\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/media\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/media-content\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/messaging\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/metadata-editor\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/minizip\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/network\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/notification\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/nsd/\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/phonenumber-utils\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/sensor\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/storage\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/system\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/telephony\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/ui\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/widget_service\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/widget_viewer_evas\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/lib/dbus-1.0/include\" -I\"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/lib/glib-2.0/include\" $(TC_COMPILER_MISC) $(RS_COMPILER_MISC) -fPIE --sysroot=\"$(SBI_SYSROOT)\" -mthumb -Werror-implicit-function-declaration \"../src/tbt_hcetestappb.c\"", + "file": "../src/tbt_hcetestappb.c" }, +] diff --git a/tbt_hcetestappB/Debug/rules.ninja b/tbt_hcetestappB/Debug/rules.ninja new file mode 100644 index 0000000..07581eb --- /dev/null +++ b/tbt_hcetestappB/Debug/rules.ninja @@ -0,0 +1,288 @@ +################################################################################# +# C/ CPP Compilation Rules +################################################################################# + +rule build_c + command = $ctool -MMD -MT $out -MF $out.d $pchInc $cflags -c $in -o $out + description = Building $out + depfile = $out.d + deps = gcc + +rule build_long_c + command = $ctool -MMD -MT $out -MF $out.d @$out.rsp -c $in -o $out + description = Building $out + depfile = $out.d + deps = gcc + rspfile = $out.rsp + rspfile_content = $pchInc $cflags + +rule build_cpp + command = $cpptool -MMD -MT $out -MF $out.d $pchInc $cppflags -c $in -o $out + description = Building $out + depfile = $out.d + +rule build_long_cpp + command = $cpptool -MMD -MT $out -MF $out.d @$out.rsp -c $in -o $out + description = Building $out + depfile = $out.d + rspfile = $out.rsp + rspfile_content = $pchInc $cppflags + +################################################################################# +# Link Rules +################################################################################# + +rule build_target + command = $targettool -o $out $in $userobj $libs $targetflags + description = Linking $out + +rule build_long_target + command = $targettool -o $out @$out.rsp + description = Linking $out + rspfile = $out.rsp + rspfile_content = $in $userobj $libs $targetflags + +build main-build: phony all + +################################################################################# +# Prebuild/ Postbuild Rules +################################################################################# + +rule pre_build + command = $bashshell $prebuildcmd + description = Executing Prebuild Steps + pool = console + +rule post_build + command = $bashshell $postbuildcmd + description = Executing Postbuild Steps + pool = console + +rule build_pch + command = $pchtool -x c-header -MMD -MT $out -MF $out.d $pchflags -c $in -o $out + description = Building $out + depfile = $out.d + +rule build_long_pch + command = $pchtool -x c-header -MMD -MT $out -MF $out.d $pchflags -c $in -o $out + description = Building $out + depfile = $out.d + rspfile = $out.rsp + rspfile_content = $pchflags + +build pre-build: pre_build +build post-build: post_build | main_build + +################################################################################# +# Secondary Output Rules +################################################################################# + +rule build_edc + command = $edctool $edje-cc-options $out.d $edcflags $in $out + description = Building $out + depfile = $out.d + deps = gcc + +rule build_long_edc + command = $edctool $edje-cc-options $out.d @$out.rsp $in $out + description = Building $out + depfile = $out.d + deps = gcc + rspfile = $out.rsp + rspfile_content = $edcflags + +rule build_po + command = $potool -o $out $in + description = Building $out + +rule build_long_po + command = $potool -o $out @$out.rsp + description = Building $out + rspfile = $out.rsp + rspfile_content = $in + + +################################################################################# +# APIChecker Rules +################################################################################# + +rule build_c_api + command = APIChecker $apichecker-options $in -o $out -- $pchInc $cflags -w -fretain-comments-from-system-headers + description = Building $out + +rule build_long_c_api + command = APIChecker $apichecker-options $in -o $out -- @$out.rsp -w -fretain-comments-from-system-headers + description = Building $out + rspfile = $out.rsp + rspfile_content = $pchInc $cflags + +rule build_cpp_api + command = APIChecker $apichecker-options $in -o $out -- $pchInc $cppflags -w -fretain-comments-from-system-headers + description = Building $out + +rule build_long_cpp_api + command = APIChecker $apichecker-options $in -o $out -- @$out.rsp -w -fretain-comments-from-system-headers + description = Building $out + rspfile = $out.rsp + rspfile_content = $pchInc $cppflags + +################################################################################# +# APIChecker Unused Privilege Rules +################################################################################# + +rule unusedapi_rule + command = APIChecker -o $out $in $apichecker-misc-options $apichecker-options -- + description = Running Unused Privilege Check $out + +################################################################################# +# AST Rules +################################################################################# + +rule build_c_ast + command = $ctool -emit-ast -c $in -o $out $pchInc $cflags + description = Building $out + +rule build_long_c_ast + command = $ctool -emit-ast -c $in -o $out @$out.rsp + description = Building $out + rspfile = $out.rsp + rspfile_content = $pchInc $cflags + +rule build_cpp_ast + command = $cpptool -emit-ast -c $in -o $out $pchInc $cppflags + description = Building $out + +rule build_long_cpp_ast + command = $cpptool -emit-ast -c $in -o $out @$out.rsp + description = Building $out + rspfile = $out.rsp + rspfile_content = $pchInc $cppflags + +################################################################################# +# FN Map Rules +################################################################################# + +rule build_c_fn + command = clangFnMapGen -o $out -ast $in $in -- + description = Building $out + +rule build_long_c_fn + command = clangFnMapGen -o $out -ast $in $in -- + description = Building $out + +rule build_cpp_fn + command = clangFnMapGen -o $out -ast $in $in -- + description = Building $out + +rule build_long_cpp_fn + command = clangFnMapGen -o $out -ast $in $in -- + description = Building $out + +rule ext_fn + command = $shell cat $in > $sareportdir/externalFnMap.txt + description = Generating External Function Map + pool = console + +rule fast_ext_fn + command = clangFnMapGen -o $out $in -- + description = Generating External Function Map + pool = console + +################################################################################# +# SA Rules +################################################################################# + +rule build_c_sa + command = $ctool --analyze --analyzer-no-default-checks $in -Xclang -analyzer-purge=block -Xclang -analyzer-checker=$sa_checkers -o $sareportdir $pchInc $cflags + description = Building $out + +rule build_long_c_sa + command = $ctool --analyze --analyzer-no-default-checks $in -Xclang -analyzer-purge=block -Xclang -analyzer-checker=$sa_checkers -o $sareportdir @$out.rsp + description = Building $out + rspfile = $out.rsp + rspfile_content = $pchInc $cflags + +rule build_cpp_sa + command = $cpptool --analyze --analyzer-no-default-checks $in -Xclang -analyzer-purge=block -Xclang -analyzer-checker=$sa_checkers -o $sareportdir $pchInc $cppflags + description = Building $out + +rule build_long_cpp_sa + command = $cpptool --analyze --analyzer-no-default-checks $in -Xclang -analyzer-purge=block -Xclang -analyzer-checker=$sa_checkers -o $sareportdir @$out.rsp + description = Building $out + rspfile = $out.rsp + rspfile_content = $pchInc $cppflags + +################################################################################# +# FAST AST Rules +################################################################################# + +rule build_c_fast_ast + command = $ctool -emit-ast -Xclang -fmust-emit-func-decls -c $in -o $out $pchInc $cflags + description = Building $out + +rule build_long_c_fast_ast + command = $ctool -emit-ast -Xclang -fmust-emit-func-decls -c $in -o $out @$out.rsp + description = Building $out + rspfile = $out.rsp + rspfile_content = $pchInc $cflags + +rule build_cpp_fast_ast + command = $cpptool -emit-ast -Xclang -fmust-emit-func-decls -c $in -o $out $pchInc $cppflags + description = Building $out + +rule build_long_cpp_fast_ast + command = $cpptool -emit-ast -Xclang -fmust-emit-func-decls -c $in -o $out @$out.rsp + description = Building $out + rspfile = $out.rsp + rspfile_content = $pchInc $cppflags + +################################################################################# +# FAST SA Rules +################################################################################# + +ast_deps_prefix = Importing AST for File: +rule build_c_fast_sa + command = $ctool --analyze --analyzer-no-default-checks $in -Xanalyzer -analyzer-purge=block -Xanalyzer -analyzer-checker=$sa_checkers -Xanalyzer -emit-ast-deps -o $out + description = Analyzing $in + deps = ast + +rule build_long_c_fast_sa + command = $ctool --analyze --analyzer-no-default-checks $in -Xanalyzer -analyzer-purge=block -Xanalyzer -analyzer-checker=$sa_checkers -Xanalyzer -emit-ast-deps -o $out + description = Analyzing $in + deps = ast + +rule build_cpp_fast_sa + command = $cpptool --analyze --analyzer-no-default-checks $in -Xanalyzer -analyzer-purge=block -Xanalyzer -analyzer-checker=$sa_checkers -Xanalyzer -emit-ast-deps -o $out + description = Analyzing $in + deps = ast + +rule build_long_cpp_fast_sa + command = $cpptool --analyze --analyzer-no-default-checks $in -Xanalyzer -analyzer-purge=block -Xanalyzer -analyzer-checker=$sa_checkers -Xanalyzer -emit-ast-deps -o $out + description = Analyzing $in + deps = ast + +################################################################################# +# Clean Rules +################################################################################# + +rule clean_all + command = ninja -t clean + description = Cleaning build files ... +build clean: clean_all || clean_sa + +rule sa_report_clean + command = rm -rf $sareportdir/*.xml rm -rf $sareportdir/src + description = Cleaning SA Report files .. +build clean_sa: sa_report_clean + +################################################################################# +# Compilation DB Step +################################################################################# + +rule compdb_json + command = $shell ninja -t compdb cc cxx > $out + description = Generating $out +build $builddir/compile_commands.json: compdb_json +build compdb: phony $builddir/compile_commands.json + + diff --git a/tbt_hcetestappB/Debug/src/hcetest_appb.o b/tbt_hcetestappB/Debug/src/hcetest_appb.o new file mode 100644 index 0000000..9263b1f Binary files /dev/null and b/tbt_hcetestappB/Debug/src/hcetest_appb.o differ diff --git a/tbt_hcetestappB/Debug/src/subdir.ninja b/tbt_hcetestappB/Debug/src/subdir.ninja new file mode 100644 index 0000000..23fa586 --- /dev/null +++ b/tbt_hcetestappB/Debug/src/subdir.ninja @@ -0,0 +1,12 @@ +################################################################################ +# Automatically-generated file. Do not edit! +################################################################################ + + +ctool = clang +cflags = -I"/home/nazib/workspace_TBT_wearable/tbt_hcetestappB/inc" -O0 -g3 -Wall -c -fmessage-length=0 -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/libxml2" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/appcore-agent" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/appcore-watch" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/appfw" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/badge" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/base" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/cairo" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/chromium-ewk" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/ckm" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/contacts-svc" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/content" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/context-service" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/csr" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/dali" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/dali-toolkit" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/dbus-1.0" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/device" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/dlog" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/ecore-1" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/ecore-buffer-1" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/ecore-con-1" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/ecore-evas-1" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/ecore-file-1" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/ecore-imf-1" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/ecore-imf-evas-1" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/ecore-input-1" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/ecore-input-evas-1" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/ecore-ipc-1" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/ector-1" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/e_dbus-1" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/edje-1" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/eet-1" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/efl-1" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/efl-extension" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/efreet-1" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/eina-1" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/eina-1/eina" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/eio-1" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/eldbus-1" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/elementary-1" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/embryo-1" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/emile-1" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/eo-1" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/eom" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/ethumb-1" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/ethumb-client-1" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/evas-1" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/feedback" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/fontconfig" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/freetype2" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/gio-unix-2.0" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/glib-2.0" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/harfbuzz" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/iotcon" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/json-glib-1.0" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/location" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/maps" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/media" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/media-content" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/messaging" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/metadata-editor" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/minizip" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/network" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/notification" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/nsd/" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/phonenumber-utils" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/sensor" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/storage" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/system" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/telephony" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/ui" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/widget_service" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/include/widget_viewer_evas" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/lib/dbus-1.0/include" -I"/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core/usr/lib/glib-2.0/include" -target arm-tizen-linux-gnueabi -gcc-toolchain /home/nazib/tizen-sdk/tools/smart-build-interface/../arm-linux-gnueabi-gcc-4.9/ -ccc-gcc-name arm-linux-gnueabi-g++ -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 -mtune=cortex-a8 -Wno-gnu -fPIE --sysroot="/home/nazib/tizen-sdk/tools/smart-build-interface/../../platforms/tizen-3.0/wearable/rootstraps/wearable-3.0-device.core" -mthumb -Werror-implicit-function-declaration + +build src/tbt_hcetestappb.o: build_c ../src/tbt_hcetestappb.c +build src/tbt_hcetestappb.o.ast: build_c_fast_ast ../src/tbt_hcetestappb.c +build $sareportdir/src/tbt_hcetestappb.o.xml: build_c_fast_sa src/tbt_hcetestappb.o.ast || externalFnMap.txt +build src/tbt_hcetestappb.o.txt: build_c_api ../src/tbt_hcetestappb.c diff --git a/tbt_hcetestappB/Debug/src/tbt_hcetestappb.o b/tbt_hcetestappB/Debug/src/tbt_hcetestappb.o new file mode 100644 index 0000000..e5207fd Binary files /dev/null and b/tbt_hcetestappB/Debug/src/tbt_hcetestappb.o differ diff --git a/tbt_hcetestappB/Debug/target.ninja b/tbt_hcetestappB/Debug/target.ninja new file mode 100644 index 0000000..ee7c814 --- /dev/null +++ b/tbt_hcetestappB/Debug/target.ninja @@ -0,0 +1,4 @@ +build main_build: phony tbt_hcetestappb +build all: phony main_build +default all +edje-cc-options = -deps diff --git a/tbt_hcetestappB/Debug/tbt_hcetestappb b/tbt_hcetestappB/Debug/tbt_hcetestappb new file mode 100755 index 0000000..9e80145 Binary files /dev/null and b/tbt_hcetestappB/Debug/tbt_hcetestappb differ diff --git a/tbt_hcetestappB/inc/logger.h b/tbt_hcetestappB/inc/logger.h new file mode 100644 index 0000000..90badf5 --- /dev/null +++ b/tbt_hcetestappB/inc/logger.h @@ -0,0 +1,58 @@ +/******************************************************************************* + * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + *******************************************************************************/ + +/** + * @file logger.h + * @brief This file provide necessary macro for logging information. + * @since_tizen 2.3 + * @author Amlan Chowdhury (amlan.c@samsung.com) + * @date October, 2014 + * @bug + * @credit + */ +#ifndef __LOGGER_H__ +#define __LOGGER_H__ + +#include + +#define LOG_TAG_CORE "[TBT_HCETest]_" + +#define DLOG(prio, fmt, arg...) dlog_print(prio, LOG_TAG_CORE, "%s (Line: %d) > " fmt, __func__, __LINE__, ##arg) +#define DBG(fmt, arg...) DLOG(DLOG_DEBUG, fmt, ##arg) +#define ERR(fmt, arg...) DLOG(DLOG_ERROR, fmt, ##arg) + +#define RETM_IF(expr, fmt, arg...) \ +{ \ + if (expr) \ + { \ + ERR(fmt, ##arg); \ + return; \ + } \ +} + +#define RETVM_IF(expr, val, fmt, arg...) \ +{ \ + if (expr) \ + { \ + ERR(fmt, ##arg); \ + return (val); \ + } \ +} + +#define SAFE_DELETE(a) if( (a) != NULL ) free (a); (a) = NULL; + +#endif /* __LOGGER_H__ */ diff --git a/tbt_hcetestappB/inc/tbt_hcetestappb.h b/tbt_hcetestappB/inc/tbt_hcetestappb.h new file mode 100644 index 0000000..e653b1b --- /dev/null +++ b/tbt_hcetestappB/inc/tbt_hcetestappb.h @@ -0,0 +1,23 @@ +#ifndef __hcetest_appb_H__ +#define __hcetest_appb_H__ + +#include +#include +#include +#include +#include "logger.h" +#include + +#ifdef LOG_TAG +#undef LOG_TAG +#endif +#define LOG_TAG "[TBT_hcetest_appb]" + +#if !defined(PACKAGE) +#define PACKAGE "org.tizen.tbt_hcetestappb" +#endif + + +#define NFC_APPCONTROL_STRING \ + "http://tizen.org/appcontrol/operation/nfc/card_emulation/host_apdu_service" +#endif /* __hcetest_appb_H__ */ diff --git a/tbt_hcetestappB/project_def.prop b/tbt_hcetestappB/project_def.prop new file mode 100644 index 0000000..8ed6ebe --- /dev/null +++ b/tbt_hcetestappB/project_def.prop @@ -0,0 +1,11 @@ +APPNAME = hcetest_appb + +type = app +profile = wearable-3.0 + +USER_SRCS = src/hcetest_appb.c +USER_DEFS = +USER_INC_DIRS = inc +USER_OBJS = +USER_LIBS = +USER_EDCS = diff --git a/tbt_hcetestappB/shared/res/tbt_hcetestappb.png b/tbt_hcetestappB/shared/res/tbt_hcetestappb.png new file mode 100644 index 0000000..9765b1b Binary files /dev/null and b/tbt_hcetestappB/shared/res/tbt_hcetestappb.png differ diff --git a/tbt_hcetestappB/shared/res/wallet.xml b/tbt_hcetestappB/shared/res/wallet.xml new file mode 100644 index 0000000..5dc2c78 --- /dev/null +++ b/tbt_hcetestappB/shared/res/wallet.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/tbt_hcetestappB/src/tbt_hcetestappb.c b/tbt_hcetestappB/src/tbt_hcetestappb.c new file mode 100644 index 0000000..a049da8 --- /dev/null +++ b/tbt_hcetestappB/src/tbt_hcetestappb.c @@ -0,0 +1,409 @@ +#include "tbt_hcetestappb.h" + +typedef struct hcedata { + Evas_Object *win; + Evas_Object *conform; + Evas_Object *label; +} hcedata_s; + +static char* get_nfc_error(nfc_error_e error_code); +static int nfc_onoff_operation(void); +static void do_nfc_operation(void* data); + +static char* g_aid; + +static void win_delete_request_cb(void *data, Evas_Object *obj, void *event_info) +{ + ui_app_exit(); +} + +static void win_back_cb(void *data, Evas_Object *obj, void *event_info) +{ + hcedata_s *ad = data; + /* Let window go to hide state. */ + elm_win_lower(ad->win); +} + +static void create_base_gui(hcedata_s *ad) +{ + /* Window */ + /* Create and initialize elm_win. + elm_win is mandatory to manipulate window. */ + ad->win = elm_win_util_standard_add(PACKAGE, PACKAGE); + elm_win_autodel_set(ad->win, EINA_TRUE); + + if (elm_win_wm_rotation_supported_get(ad->win)) { + int rots[4] = { 0, 90, 180, 270 }; + elm_win_wm_rotation_available_rotations_set(ad->win, (const int *)(&rots), 4); + } + + evas_object_smart_callback_add(ad->win, "delete,request", win_delete_request_cb, NULL); + eext_object_event_callback_add(ad->win, EEXT_CALLBACK_BACK, win_back_cb, ad); + + /* Conformant */ + /* Create and initialize elm_conformant. + elm_conformant is mandatory for base gui to have proper size + when indicator or virtual keypad is visible. */ + ad->conform = elm_conformant_add(ad->win); + elm_win_indicator_mode_set(ad->win, ELM_WIN_INDICATOR_SHOW); + elm_win_indicator_opacity_set(ad->win, ELM_WIN_INDICATOR_OPAQUE); + evas_object_size_hint_weight_set(ad->conform, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + elm_win_resize_object_add(ad->win, ad->conform); + evas_object_show(ad->conform); + + /* Label */ + /* Create an actual view of the base gui. + Modify this part to change the view. */ + ad->label = elm_label_add(ad->conform); + elm_object_text_set(ad->label, "HCE pref. app"); + evas_object_size_hint_weight_set(ad->label, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + elm_object_content_set(ad->conform, ad->label); + + /* Show window after base gui is set up */ + evas_object_show(ad->win); +} + +static void hce_event_cb(nfc_se_h handle, nfc_hce_event_type_e event, unsigned char *apdu, unsigned int apdu_len, void *user_data) +{ + DBG("hce_event_cb"); + hcedata_s *ad = user_data; + + bool is_activated_handler = false; + nfc_error_e ret = NFC_ERROR_NONE; + unsigned char resp[] = {0x11, 0x12, 0x90, 0x00}; + char cmd_apdu[1024] = {0,}; + + switch(event) { + case NFC_HCE_EVENT_DEACTIVATED: + DBG("hce_event_cb() event type : NFC_HCE_EVENT_DEACTIVATED"); + break; + case NFC_HCE_EVENT_ACTIVATED: + DBG("hce_event_cb() event type : NFC_HCE_EVENT_ACTIVATED"); + ret = nfc_se_is_activated_handler_for_aid(NFC_SE_TYPE_HCE, g_aid, &is_activated_handler); + RETM_IF(ret != NFC_ERROR_NONE, "nfc_se_is_activated_handler_for_aid failed %s",get_nfc_error(ret)); + if(is_activated_handler) + { + DBG("Activated for AID %s", g_aid); + } + is_activated_handler = false; + ret = nfc_se_is_activated_handler_for_category(NFC_SE_TYPE_HCE, NFC_CARD_EMULATION_CATEGORY_PAYMENT, &is_activated_handler); + RETM_IF(ret != NFC_ERROR_NONE, "nfc_se_is_activated_handler_for_aid failed %s",get_nfc_error(ret)); + if(is_activated_handler) + { + DBG("Activated for PAYMENT catagory"); + } + break; + case NFC_HCE_EVENT_APDU_RECEIVED: + //hex to string + for (int i = 0; i < apdu_len; i++) { + sprintf(&(cmd_apdu[i*2]), "%02X", apdu[i]); + } + DBG("hce_event_cb() event type : NFC_HCE_EVENT_APDU_RECEIVED [%s]", cmd_apdu); + elm_object_text_set(ad->label, "Data Received"); + + ret = nfc_hce_send_apdu_response(handle, resp, sizeof(resp)); + DBG("nfc_hce_send_apdu_response() result : [%d]", ret); + + break; + default: + break; + } + + return; +} + +static bool app_create(void *data) +{ + /* Hook to take necessary actions before main event loop starts + Initialize UI resources and application's data + If this function returns true, the main loop of application starts + If this function returns false, the application is terminated */ + + hcedata_s *ad = data; + + create_base_gui(ad); + + do_nfc_operation(ad); + return true; +} + +static void do_nfc_operation(void* data) +{ + int ret; + + if(nfc_manager_is_activated() == false) + { + ret = nfc_onoff_operation(); + RETM_IF(ret != 0, "nfc_onoff_operation failed %d", ret); + } + + nfc_manager_deinitialize(); + + ret = nfc_manager_initialize(); + RETM_IF(ret != NFC_ERROR_NONE, "nfc_manager_initialize failed %s",get_nfc_error(ret)); + + nfc_se_card_emulation_mode_type_e type; + + ret = nfc_se_get_card_emulation_mode(&type); + RETM_IF(ret != NFC_ERROR_NONE, "nfc_se_get_card_emulation_mode failed %s",get_nfc_error(ret)); + + if (type == NFC_SE_CARD_EMULATION_MODE_OFF) + { + ret = nfc_se_enable_card_emulation(); + RETM_IF(ret != NFC_ERROR_NONE, "nfc_se_enable_card_emulation failed %s",get_nfc_error(ret)); + + } + + ret = nfc_manager_set_hce_event_cb(hce_event_cb, data); + RETM_IF(ret != NFC_ERROR_NONE, "nfc_manager_set_hce_event_cb failed %s",get_nfc_error(ret)); + +// ret = nfc_manager_set_se_transaction_event_cb(NFC_SE_TYPE_HCE, _nfc_se_transaction_event_cb, data); +// RETM_IF(ret != NFC_ERROR_NONE, "nfc_manager_set_se_transaction_event_cb failed with: %s", get_nfc_error(ret)); + +} + +static void +app_control(app_control_h app_control, void *data) +{ + /* Handle the launch request. */ + + DBG("app_control enter"); + + char *operation, *aid; + app_control_get_operation(app_control, &operation); + DBG("nfc appcontrol operation : [%s]", operation); + + if ((strncmp(operation, NFC_APPCONTROL_STRING, strlen(NFC_APPCONTROL_STRING)) == 0)) + { + DBG("nfc appcontrol operation : [%s]", operation); + app_control_get_extra_data(app_control, "data", &aid); + DBG("nfc appcontrol uri : [%s]", aid); + + g_aid = aid; + do_nfc_operation(data); + } + + + DBG("app_control exit"); + +} + +static void app_pause(void *data) +{ + /* Take necessary actions when application becomes invisible. */ + int ret; + DBG("app_pause enter"); + nfc_manager_unset_hce_event_cb(); + ret = nfc_se_set_preferred_handler(); + RETM_IF(ret != NFC_ERROR_NONE, "nfc_se_set_preferred_handler failed with: %s", get_nfc_error(ret)); + DBG("app_pause exit"); +} + +static void app_resume(void *data) +{ + + DBG("app_resume enter"); + + int ret; + ret = nfc_se_set_preferred_handler(); + DBG("nfc_se_set_preferred_handler failed with: %s", get_nfc_error(ret)); + + ret = nfc_manager_set_hce_event_cb(hce_event_cb, data); + DBG("nfc_manager_set_hce_event_cb failed with: %s", get_nfc_error(ret)); + + DBG("app_resume exit"); +} + +static void +app_terminate(void *data) +{ + /* Release all resources. */ + DBG("app_terminate enter"); + int ret; + nfc_manager_unset_hce_event_cb(); + nfc_se_card_emulation_mode_type_e type; + nfc_se_get_card_emulation_mode(&type); + if (type == NFC_SE_CARD_EMULATION_MODE_ON) + { + ret = nfc_se_disable_card_emulation(); + RETM_IF(ret != NFC_ERROR_NONE, "nfc_se_enable_card_emulation failed %s",get_nfc_error(ret)); + + } + ret = nfc_manager_deinitialize(); + DBG("nfc_manager_deinitialize: %s", get_nfc_error(ret)); + DBG("app_terminate exit"); +} + +static void +ui_app_lang_changed(app_event_info_h event_info, void *user_data) +{ + /*APP_EVENT_LANGUAGE_CHANGED*/ + char *locale = NULL; + system_settings_get_value_string(SYSTEM_SETTINGS_KEY_LOCALE_LANGUAGE, &locale); + elm_language_set(locale); + free(locale); + return; +} + +static void +ui_app_orient_changed(app_event_info_h event_info, void *user_data) +{ + /*APP_EVENT_DEVICE_ORIENTATION_CHANGED*/ + return; +} + +static void +ui_app_region_changed(app_event_info_h event_info, void *user_data) +{ + /*APP_EVENT_REGION_FORMAT_CHANGED*/ +} + +static void +ui_app_low_battery(app_event_info_h event_info, void *user_data) +{ + /*APP_EVENT_LOW_BATTERY*/ +} + +static void +ui_app_low_memory(app_event_info_h event_info, void *user_data) +{ + /*APP_EVENT_LOW_MEMORY*/ +} + +int +main(int argc, char *argv[]) +{ + hcedata_s ad = {0,}; + int ret = 0; + + ui_app_lifecycle_callback_s event_callback = {0,}; + app_event_handler_h handlers[5] = {NULL, }; + + event_callback.create = app_create; + event_callback.terminate = app_terminate; + event_callback.pause = app_pause; + event_callback.resume = app_resume; + event_callback.app_control = app_control; + + ui_app_add_event_handler(&handlers[APP_EVENT_LOW_BATTERY], APP_EVENT_LOW_BATTERY, ui_app_low_battery, &ad); + ui_app_add_event_handler(&handlers[APP_EVENT_LOW_MEMORY], APP_EVENT_LOW_MEMORY, ui_app_low_memory, &ad); + ui_app_add_event_handler(&handlers[APP_EVENT_DEVICE_ORIENTATION_CHANGED], APP_EVENT_DEVICE_ORIENTATION_CHANGED, ui_app_orient_changed, &ad); + ui_app_add_event_handler(&handlers[APP_EVENT_LANGUAGE_CHANGED], APP_EVENT_LANGUAGE_CHANGED, ui_app_lang_changed, &ad); + ui_app_add_event_handler(&handlers[APP_EVENT_REGION_FORMAT_CHANGED], APP_EVENT_REGION_FORMAT_CHANGED, ui_app_region_changed, &ad); + + ret = ui_app_main(argc, argv, &event_callback, &ad); + if (ret != APP_ERROR_NONE) + { + DBG("app_main() is failed. err = %d", ret); + } + + return ret; +} + + +static char* get_nfc_error(nfc_error_e error_code) +{ +char* error; +switch(error_code) +{ + case NFC_ERROR_NONE: + error = "NFC_ERROR_NONE"; + break; + case NFC_ERROR_OUT_OF_MEMORY: + error = "NFC_ERROR_OUT_OF_MEMORY"; + break; + case NFC_ERROR_OPERATION_FAILED: + error = "NFC_ERROR_OPERATION_FAILED"; + break; + case NFC_ERROR_INVALID_PARAMETER: + error = "NFC_ERROR_INVALID_PARAMETER"; + break; + case NFC_ERROR_INVALID_NDEF_MESSAGE: + error = "NFC_ERROR_INVALID_NDEF_MESSAGE"; + break; + case NFC_ERROR_INVALID_RECORD_TYPE: + error = "NFC_ERROR_INVALID_RECORD_TYPE"; + break; + case NFC_ERROR_TIMED_OUT: + error = "NFC_ERROR_TIMED_OUT"; + break; + case NFC_ERROR_DEVICE_BUSY: + error = "NFC_ERROR_DEVICE_BUSY"; + break; + case NFC_ERROR_NO_DEVICE: + error = "NFC_ERROR_NO_DEVICE"; + break; + case NFC_ERROR_NOT_ACTIVATED: + error = "NFC_ERROR_NOT_ACTIVATED"; + break; + case NFC_ERROR_NOT_SUPPORTED: + error = "NFC_ERROR_NOT_SUPPORTED"; + break; + case NFC_ERROR_ALREADY_ACTIVATED: + error = "NFC_ERROR_ALREADY_ACTIVATED"; + break; + case NFC_ERROR_ALREADY_DEACTIVATED: + error = "NFC_ERROR_ALREADY_DEACTIVATED"; + break; + case NFC_ERROR_READ_ONLY_NDEF: + error = "NFC_ERROR_READ_ONLY_NDEF"; + break; + case NFC_ERROR_NO_SPACE_ON_NDEF: + error = "NFC_ERROR_NO_SPACE_ON_NDEF"; + break; + case NFC_ERROR_NO_NDEF_MESSAGE: + error = "NFC_ERROR_NO_NDEF_MESSAGE"; + break; + case NFC_ERROR_NOT_NDEF_FORMAT: + error = "NFC_ERROR_NOT_NDEF_FORMAT"; + break; + case NFC_ERROR_SECURITY_RESTRICTED: + error = "NFC_ERROR_SECURITY_RESTRICTED"; + break; + case NFC_ERROR_PERMISSION_DENIED: + error = "NFC_ERROR_PERMISSION_DENIED"; + break; + case NFC_ERROR_ILLEGAL_STATE: + error = "NFC_ERROR_ILLEGAL_STATE"; + break; + case NFC_ERROR_NOT_INITIALIZED: + error = "NFC_ERROR_NOT_INITIALIZED"; + break; + case NFC_ERROR_TAG_NOT_SUPPORTED: + error = "NFC_ERROR_TAG_NOT_SUPPORTED"; + break; + case NFC_ERROR_AID_ALREADY_REGISTERED: + error = "NFC_ERROR_AID_ALREADY_REGISTERED"; + } + + return error; +} + +static int nfc_onoff_operation(void) +{ + int ret = 0; + app_control_h service = NULL; + app_control_create(&service); + if (service == NULL) + { + DBG("service_create failed!"); + return 0; + } + app_control_set_operation(service, "http://tizen.org/appcontrol/operation/setting/nfc"); + app_control_add_extra_data(service, "type", "nfc"); + ret = app_control_send_launch_request(service, NULL, NULL); + + app_control_destroy(service); + if (ret == APP_CONTROL_ERROR_NONE) + { + DBG("Succeeded to NFC On/Off app!"); + return 0; + } + else + { + DBG("Failed to relaunch NFC On/Off app!"); + return -1; + } + return 0; +} + diff --git a/tbt_hcetestappB/tizen-manifest.xml b/tbt_hcetestappB/tizen-manifest.xml new file mode 100644 index 0000000..4a985e1 --- /dev/null +++ b/tbt_hcetestappB/tizen-manifest.xml @@ -0,0 +1,17 @@ + + + + + + tbt_hcetestappb.png + + + + + + + http://tizen.org/privilege/nfc + http://tizen.org/privilege/nfc.cardemulation + http://tizen.org/privilege/haptic + + diff --git a/tbtcoreapp/inc/model/tbt-info.h b/tbtcoreapp/inc/model/tbt-info.h index b39dbce..726ffa2 100644 --- a/tbtcoreapp/inc/model/tbt-info.h +++ b/tbtcoreapp/inc/model/tbt-info.h @@ -89,6 +89,7 @@ typedef enum { TBT_APP_NFC_P2P, TBT_APP_NFC_TAG, + TBT_APP_NFC_HCE_PREFERRED, TBT_APP_DISPLAY_DISPLAY, @@ -210,7 +211,17 @@ typedef enum { TBT_APP_SYSTEM_SETTINGS_SCREENROTATION, TBT_APP_SYSTEM_SETTINGS_MOTION, TBT_APP_SYSTEM_SETTINGS_FILGHTMODE, - TBT_APP_SYSTEM_SETTINGS_LOCKSTATE + TBT_APP_SYSTEM_SETTINGS_LOCKSTATE, + + TBT_APP_MTP, + + TBT_APP_NSD_DNS_SD_LOCAL, + + TBT_APP_NSD_DNS_SD_REMOTE, + + TBT_APP_NSD_SSDP_LOCAL, + + TBT_APP_NSD_SSDP_REMOTE //TBT_APP_CONTACTS diff --git a/tbtcoreapp/inc/utils/app_module_config.h b/tbtcoreapp/inc/utils/app_module_config.h index 4bb4834..4494fad 100644 --- a/tbtcoreapp/inc/utils/app_module_config.h +++ b/tbtcoreapp/inc/utils/app_module_config.h @@ -64,6 +64,7 @@ #define TBT_MODULE_NFC #define TBT_MODULE_APP_NFC_TAG #define TBT_MODULE_APP_NFC_P2P +#define TBT_MODULE_APP_NFC_HCE_PREFERRED #define TBT_MODULE_DISPLAY #define TBT_MODULE_APP_DISPLAY_DISPLAY @@ -207,5 +208,14 @@ //#define TBT_MODULE_CONTACTS //#define TBT_MODULE_APP_CONTACTS +//#define TBT_MODULE_MTP +//#define TBT_MODULE_APP_MTP + +#define TBT_MODULE_NSD +#define TBT_MODULE_APP_NSD_DNS_SD_LOCAL +#define TBT_MODULE_APP_NSD_DNS_SD_REMOTE +#define TBT_MODULE_APP_NSD_SSDP_LOCAL +#define TBT_MODULE_APP_NSD_SSDP_REMOTE + #endif diff --git a/tbtcoreapp/inc/view/tbt-mtp-view.h b/tbtcoreapp/inc/view/tbt-mtp-view.h new file mode 100644 index 0000000..7c2935a --- /dev/null +++ b/tbtcoreapp/inc/view/tbt-mtp-view.h @@ -0,0 +1,54 @@ +/******************************************************************************* + * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + *******************************************************************************/ +/** + * @file tbt-mtp-view.h + * @brief Get File information over MTP + * @since_tizen 3.0 + * @author A. B. M. Nazibullah(nazib.ullah@samsung.com) + * @date May, 2016 + * @bug NA + * @credit + * + */ + +#ifndef __TBT_MTP_VIEW_H__ +#define __TBT_MTP_VIEW_H__ + +#include "utils/app_module_config.h" +#ifdef TBT_MODULE_MTP + +#include +#include "model/tbt-list.h" + +/** + * @typedef mtp_view + * @since_tizen 3.0 + * @brief A mtp viewer view handle. + */ +typedef struct _mtp_view mtp_view; + +/** + * @brief Add mtp view + * @since_tizen 3.0 + * @param[in] app The pointer to _app_data instance + * @param[in] navi The naviframe object + * @return mtp viewer view data + */ +mtp_view *mtp_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Item *item); + +#endif +#endif // __TBT_MTP_VIEW_H__ diff --git a/tbtcoreapp/inc/view/tbt-nfc-hce-preferred-view.h b/tbtcoreapp/inc/view/tbt-nfc-hce-preferred-view.h new file mode 100644 index 0000000..af87db4 --- /dev/null +++ b/tbtcoreapp/inc/view/tbt-nfc-hce-preferred-view.h @@ -0,0 +1,55 @@ +/******************************************************************************* + * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + *******************************************************************************/ +/** + * @file tbt-nfc_hce_preferred-view.h + * @brief nfc_hce_preferred app test. + * + * @author A. B. M. Nazibullah (nazib.ullah@samsung.com) + * @date June, 2016 + * @bug no known bug + * @credit + * + */ + +#ifndef __TBT_NFC_HCE_PREFERRED_VIEW_H__ +#define __TBT_NFC_HCE_PREFERRED_VIEW_H__ + +#include "utils/app_module_config.h" +#ifdef TBT_MODULE_APP + +#include +#include "model/tbt-list.h" + + +/** + * @typedef nfc_hce_preferred_view + * @since_tizen 2.3 + * @brief A nfc_hce_preferred viewer view handle. + */ +typedef struct _nfc_hce_preferred_view nfc_hce_preferred_view; + +/** + * @brief Add nfc_hce_preferred view + * @since_tizen 2.3 + * @param[in] app The pointer to _app_data instance + * @param[in] navi The naviframe object + * @return nfc_hce_preferred view data + */ +nfc_hce_preferred_view *nfc_hce_preferred_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Item *item); + +#endif +#endif // __TBT_NFC_HCE_PREFERRED_VIEW_H__ diff --git a/tbtcoreapp/inc/view/tbt-nsd-dns-sd-view.h b/tbtcoreapp/inc/view/tbt-nsd-dns-sd-view.h new file mode 100644 index 0000000..e2025cf --- /dev/null +++ b/tbtcoreapp/inc/view/tbt-nsd-dns-sd-view.h @@ -0,0 +1,53 @@ +/******************************************************************************* + * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + *******************************************************************************/ +/** + * @file tbt-nsd_dnssd-view.h + * @brief checks availability of nsd_dnssds in device + * @since_tizen 2.3 + * @author A B M Nazibullah(nazib.ullah@samsung.com) + * @date October, 2014 + * @bug NA + * @credit Tizen SDK Version 2.3.0 Sample Example + * + */ + +#ifndef __TBT_NSD_DNS_SD_VIEW_H__ +#define __TBT_NSD_DNS_SD_VIEW_H__ + +#include "utils/app_module_config.h" +#ifdef TBT_MODULE_NSD +#include +#include "model/tbt-list.h" + +/** + * @typedef nsd_dnssd_view + * @since_tizen 3.0 + * @brief A nsd_dnssd viewer view handle. + */ +typedef struct _nsd_dnssd_view nsd_dnssd_view; + +/** + * @brief Add nsd_dnssd view + * @since_tizen 2.3 + * @param[in] app The pointer to _app_data instance + * @param[in] navi The naviframe object + * @return nsd_dnssd viewer view data + */ +nsd_dnssd_view *nsd_dnssd_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Item *item); + +#endif +#endif // __TBT_NSD_DNS_SD_VIEW_H__ diff --git a/tbtcoreapp/inc/view/tbt-nsd-ssdp-view.h b/tbtcoreapp/inc/view/tbt-nsd-ssdp-view.h new file mode 100644 index 0000000..3d74479 --- /dev/null +++ b/tbtcoreapp/inc/view/tbt-nsd-ssdp-view.h @@ -0,0 +1,53 @@ +/******************************************************************************* + * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + *******************************************************************************/ +/** + * @file tbt-nsd_ssdp-view.h + * @brief checks availability of nsd_ssdps in device + * @since_tizen 2.3 + * @author A B M Nazibullah(nazib.ullah@samsung.com) + * @date October, 2014 + * @bug NA + * @credit Tizen SDK Version 2.3.0 Sample Example + * + */ + +#ifndef __TBT_NSD_SSDP_VIEW_H__ +#define __TBT_NSD_SSDP_VIEW_H__ + +#include "utils/app_module_config.h" +#ifdef TBT_MODULE_NSD +#include +#include "model/tbt-list.h" + +/** + * @typedef nsd_ssdp_view + * @since_tizen 3.0 + * @brief A nsd_ssdp viewer view handle. + */ +typedef struct _nsd_ssdp_view nsd_ssdp_view; + +/** + * @brief Add nsd_ssdp view + * @since_tizen 2.3 + * @param[in] app The pointer to _app_data instance + * @param[in] navi The naviframe object + * @return nsd_ssdp viewer view data + */ +nsd_ssdp_view *nsd_ssdp_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Item *item); + +#endif +#endif // __TBT_NSD_SSDP_VIEW_H__ diff --git a/tbtcoreapp/res/edje/2.3.1/wearable_360_360/mtp_viewer.edc b/tbtcoreapp/res/edje/2.3.1/wearable_360_360/mtp_viewer.edc new file mode 100644 index 0000000..12c1f2a --- /dev/null +++ b/tbtcoreapp/res/edje/2.3.1/wearable_360_360/mtp_viewer.edc @@ -0,0 +1,83 @@ +/* + * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved + * + * Licensed under the Apache License, Version 2.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#define TEXT_HEIGHT 0.08 + +collections +{ + base_scale: 1.8; + group + { + name: "mtp_viewer"; + parts{ + part{ + name: "mtp_view"; + type: SWALLOW; + description{ + state: "default" 0.0; + align: 0.0 0.0; + visible: 1; + rel1 {relative: 0.0 0.0; } + rel2 {relative: 1.0 0.4; } + } + } + + part{ + name: "mtp_image_view"; + type: SWALLOW; + description{ + state: "default" 0.0; + align: 0.0 0.0; + visible: 1; + rel1{ + relative: 0.0 0.4; + } + rel2{ + relative:1.0 0.6; + } + } + } + + part{ + name: "mtp_info_view"; + type: SWALLOW; + description{ + state: "default" 0.0; + align: 0.0 0.0; + visible: 1; + rel1 {relative: 0.0 0.6; } + rel2 {relative: 1.0 1.0; } + } + } + + part { name: "wearable_toolbar"; + type: SWALLOW; + description { + state: "default" 0.0; + rel1 { + relative: 0.0 1.0; + } + rel2 { + relative: 1.0 1.0; + } + visible: 1; + } + } + } + } +} + + diff --git a/tbtcoreapp/res/edje/2.3.1/wearable_360_360/nsd_viewer.edc b/tbtcoreapp/res/edje/2.3.1/wearable_360_360/nsd_viewer.edc new file mode 100644 index 0000000..653f3e7 --- /dev/null +++ b/tbtcoreapp/res/edje/2.3.1/wearable_360_360/nsd_viewer.edc @@ -0,0 +1,136 @@ +/* + * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved + * + * Licensed under the Apache License, Version 2.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#define TEXT_HEIGHT 0.08 + +collections +{ + base_scale: 1.8; + group + { + name: "nsd_dnssd_viewer"; + parts{ + part{ + name: "nsd_dnssd_view"; + type: SWALLOW; + description{ + state: "default" 0.0; + align: 0.0 0.0; + visible: 1; + rel1 {relative: 0.0 0.0; } + rel2 {relative: 1.0 0.3; } + } + } + + part{ + name: "nsd_dnssd_info_view"; + type: SWALLOW; + description{ + state: "default" 0.0; + align: 0.0 0.0; + visible: 1; + rel1 {relative: 0.0 0.3; } + rel2 {relative: 1.0 0.6; } + } + } + + part{ + name: "nsd_dnssd_btn_view"; + type: SWALLOW; + description{ + state: "default" 0.0; + align: 0.0 0.0; + visible: 1; + rel1 {relative: 0.0 0.6; } + rel2 {relative: 1.0 0.8; } + } + } + + part { name: "wearable_toolbar"; + type: SWALLOW; + description { + state: "default" 0.0; + rel1 { + relative: 0.0 1.0; + } + rel2 { + relative: 1.0 1.0; + } + visible: 1; + } + } + + } + } + + + group + { + name: "nsd_ssdp_viewer"; + parts{ + part{ + name: "nsd_ssdp_view"; + type: SWALLOW; + description{ + state: "default" 0.0; + align: 0.0 0.0; + visible: 1; + rel1 {relative: 0.0 0.0; } + rel2 {relative: 1.0 0.3; } + } + } + + part{ + name: "nsd_ssdp_info_view"; + type: SWALLOW; + description{ + state: "default" 0.0; + align: 0.0 0.0; + visible: 1; + rel1 {relative: 0.0 0.3; } + rel2 {relative: 1.0 0.6; } + } + } + + part{ + name: "nsd_ssdp_btn_view"; + type: SWALLOW; + description{ + state: "default" 0.0; + align: 0.0 0.0; + visible: 1; + rel1 {relative: 0.0 0.6; } + rel2 {relative: 1.0 0.8; } + } + } + + part { name: "wearable_toolbar"; + type: SWALLOW; + description { + state: "default" 0.0; + rel1 { + relative: 0.0 1.0; + } + rel2 { + relative: 1.0 1.0; + } + visible: 1; + } + } + + } + } +} diff --git a/tbtcoreapp/src/model/tbt-list.c b/tbtcoreapp/src/model/tbt-list.c index 8044443..0a13f63 100644 --- a/tbtcoreapp/src/model/tbt-list.c +++ b/tbtcoreapp/src/model/tbt-list.c @@ -618,6 +618,20 @@ static tbt_info tbtapps[] = .features_required = {17,76} }, #endif + + #ifdef TBT_MODULE_APP_NFC_HCE_PREFERRED + + + // NFC HCE_PREFERRED Test + { + .name = "NFC HCE Preferred", + .parent = "NFC", + .apptype = TBT_APP_NFC_HCE_PREFERRED, + .icon_name = "dummy", + .info = "Test NFC HCE Preferred card emulation", + .result = 0 + }, + #endif #endif #ifdef TBT_MODULE_DISPLAY @@ -1800,7 +1814,7 @@ static tbt_info tbtapps[] = .icon_name = "dummy", .info = "Instructions:

1.Manually change settings for each item through device Settings.
2. Verify all the items' values.", .result = 0 - } + }, #endif #endif @@ -1821,6 +1835,70 @@ static tbt_info tbtapps[] = //#endif //#endif +#ifdef TBT_MODULE_MTP + #ifdef TBT_MODULE_APP_MTP + + //MTP + { + .name = "MTP", + .parent = "MTP", + .apptype = TBT_APP_MTP, + .icon_name = "dummy", + .info = "View MTP
feature's of the phone", + .result = 0 + }, + #endif +#endif + +#ifdef TBT_MODULE_NSD + #ifdef TBT_MODULE_APP_NSD_DNS_SD_LOCAL + + //NSD DNSSD LOCAL + { + .name = "DNS-SD Local", + .parent = "NSD", + .apptype = TBT_APP_NSD_DNS_SD_LOCAL, + .icon_name = "dummy", + .info = "Check NSD DNS-SD
", + .result = 0 + }, + #endif + #ifdef TBT_MODULE_APP_NSD_DNS_SD_REMOTE + + //NSD DNSSD REMOTE + { + .name = "DNS-SD Remote", + .parent = "NSD", + .apptype = TBT_APP_NSD_DNS_SD_REMOTE, + .icon_name = "dummy", + .info = "Check NSD DNS-SD
", + .result = 0 + }, + #endif + #ifdef TBT_MODULE_APP_NSD_SSDP_LOCAL + { + .name = "SSDP Local", + .parent = "NSD", + .apptype = TBT_APP_NSD_SSDP_LOCAL, + .icon_name = "dummy", + .info = "Check NSD SSDP
", + .result = 0 + }, + #endif + + #ifdef TBT_MODULE_APP_NSD_SSDP_REMOTE + { + .name = "SSDP Remote", + .parent = "NSD", + .apptype = TBT_APP_NSD_SSDP_REMOTE, + .icon_name = "dummy", + .info = "Check NSD SSDP
", + .result = 0 + }, + #endif +#endif + + }; #ifdef TBT_MODULE_SENSOR diff --git a/tbtcoreapp/src/view/tbt-common-view.c b/tbtcoreapp/src/view/tbt-common-view.c index 81f949c..db8b015 100644 --- a/tbtcoreapp/src/view/tbt-common-view.c +++ b/tbtcoreapp/src/view/tbt-common-view.c @@ -205,28 +205,33 @@ static void wearable_circle_action(void *data, Evas_Object *obj, void *event_inf common_view *view =(common_view*) data; - //Evas_Object *img = NULL; + Evas_Object* image; + const char *file_path; Evas_Object *parent = eext_more_option_add(view->navi); Eext_Object_Item *item = NULL; printf("item is created!!! [%p]\n", item); item = eext_more_option_item_append(parent); eext_more_option_item_part_text_set(item, "selector,main_text", "Pass"); -// img = elm_image_add(parent); -// eext_more_option_item_part_content_set(item, "item,icon", img); -// elm_image_file_set(img, "images/pass.png", NULL); + + file_path = get_resource_path("images/pass.png"); + image = ui_utils_create_image(parent, file_path); + eext_more_option_item_part_content_set(item, "item,icon", image); item = eext_more_option_item_append(parent); eext_more_option_item_part_text_set(item, "selector,main_text", "Fail"); -// img = elm_image_add(parent); -// eext_more_option_item_part_content_set(item, "item,icon", img); -// elm_image_file_set(img, "images/fail.png", NULL); + + file_path = get_resource_path("images/fail.png"); + image = ui_utils_create_image(parent, file_path); + eext_more_option_item_part_content_set(item, "item,icon", image); item = eext_more_option_item_append(parent); eext_more_option_item_part_text_set(item, "selector,main_text", "Info"); -// img = elm_image_add(parent); -// eext_more_option_item_part_content_set(item, "item,icon", img); -// elm_image_file_set(img, "images/info.png", NULL); + + file_path = get_resource_path("images/info.png"); + image = ui_utils_create_image(parent, file_path); + eext_more_option_item_part_content_set(item, "item,icon", image); + evas_object_smart_callback_add(parent, "more,option,opened", _more_option_opened, NULL); evas_object_smart_callback_add(parent, "more,option,closed", _more_option_closed, NULL); diff --git a/tbtcoreapp/src/view/tbt-genlist-view.c b/tbtcoreapp/src/view/tbt-genlist-view.c index 309abbf..da5b6e2 100644 --- a/tbtcoreapp/src/view/tbt-genlist-view.c +++ b/tbtcoreapp/src/view/tbt-genlist-view.c @@ -89,6 +89,10 @@ #include "view/tbt-connection-view.h" #include "view/tbt-systemsettings-view.h" //#include "view/tbt-contacts-view.h" +#include "view/tbt-mtp-view.h" +#include "view/tbt-nsd-dns-sd-view.h" +#include "view/tbt-nsd-ssdp-view.h" +#include "view/tbt-nfc-hce-preferred-view.h" typedef struct @@ -789,6 +793,9 @@ static void _gl_item_selected_cb(void *data, Evas_Object *obj EINA_UNUSED, void case TBT_APP_NFC_TAG: nfc_view_add(view->navi, info, it); break; + case TBT_APP_NFC_HCE_PREFERRED: + nfc_hce_preferred_view_add(view->navi, info, it); + break; #endif #ifdef TBT_MODULE_DISPLAY @@ -1121,6 +1128,26 @@ static void _gl_item_selected_cb(void *data, Evas_Object *obj EINA_UNUSED, void //contacts_view_add(view->navi, info, it); //break; //#endif + #ifdef TBT_MODULE_MTP + case TBT_APP_MTP: + mtp_view_add(view->navi, info, it); + break; + #endif + + #ifdef TBT_MODULE_NSD + case TBT_APP_NSD_DNS_SD_LOCAL: + nsd_dnssd_view_add(view->navi, info, it); + break; + case TBT_APP_NSD_DNS_SD_REMOTE: + nsd_dnssd_view_add(view->navi, info, it); + break; + case TBT_APP_NSD_SSDP_LOCAL: + nsd_ssdp_view_add(view->navi, info, it); + break; + case TBT_APP_NSD_SSDP_REMOTE: + nsd_ssdp_view_add(view->navi, info, it); + break; + #endif default: assert(false); diff --git a/tbtcoreapp/src/view/tbt-mtp-view.c b/tbtcoreapp/src/view/tbt-mtp-view.c new file mode 100644 index 0000000..450447b --- /dev/null +++ b/tbtcoreapp/src/view/tbt-mtp-view.c @@ -0,0 +1,697 @@ +/******************************************************************************* + * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + *******************************************************************************/ +/** + * @file tbt-mtp-view.h + * @brief Get File information over MTP + * + * @author A. B. M. Nazibullah(nazib.ullah@samsung.com) + * @date May, 2016 + * @bug NA + * @credit + * + */ + +#include "utils/app_module_config.h" +#ifdef TBT_MODULE_MTP + +#include +#include + +#include "utils/logger.h" +#include "utils/config.h" +#include "utils/ui-utils.h" +#include "view/tbt-mtp-view.h" +#include "view/tbt-common-view.h" + +struct _mtp_view +{ + common_view* view; + + Evas_Object *list; + Evas_Object* info_list; + + mtp_device_h *mtp_devices; + mtp_object_h *file_list; + int device_count; + + mtp_storage_h *mtp_storages; + int storage_count; +}; + +typedef struct _mtp_data{ + mtp_view* mtp_view; + mtp_object_h file_handle; + mtp_device_h device_handle; +}mtp_data; + +static int count = 0; +static mtp_data* deallocate_me[MAX_LENGTH]={NULL,}; + +static char* get_mtp_info_error(mtp_error_e err_code); +static char* get_mtp_storage_type(mtp_storage_type_e type_e); +static char* get_mtp_file_type_str(mtp_filetype_e file_type); +static void _app_destroy_cb(void* this); +static void _image_file_list_item_clicked(void *data, Evas_Object *obj, void *event_info); + + +static void _mtp_event_cb(mtp_event_e event, int event_parameter, void *user_data); + +static void mtp_functions(mtp_view *this); + + +/** + * @function mtp_view_add + * @since_tizen 3.0 + * @description mtp View Add + * @parameter Evas_Object*: Evas Object Pointer, tbt_info*: Tbt Info Pointer, Elm_Object_Item*: Elm Object Item Pointer + * @return mtp_view* + */ +mtp_view *mtp_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Item *item) +{ + RETVM_IF(NULL == navi, NULL, "navi is null"); + + mtp_view *this = NULL; + this = calloc(1, sizeof(mtp_view)); + RETVM_IF(!this, NULL, "calloc failed"); + this->view = calloc(1, sizeof(common_view)); + RETVM_IF(!this->view, NULL, "calloc failed"); + + tbt_info->layout_group = "mtp_viewer"; + tbt_info->layout_file = get_edje_path("mtp_viewer.edj"); + + common_view_add(navi, tbt_info, item, this->view, _app_destroy_cb, this); + + RETVM_IF(NULL == this->view, NULL, "navi is null"); + + this->list = elm_list_add(this->view->layout); + RETVM_IF(!this->list, NULL, "elm_list_add failed"); + evas_object_data_set(this->list, "view_data", this); + elm_object_part_content_set(this->view->layout, "mtp_view", this->list); + + this->info_list = elm_list_add(this->view->layout); + RETVM_IF(!this->info_list, NULL, "elm_list_add failed"); + evas_object_data_set(this->info_list, "view_data", this); + elm_object_part_content_set(this->view->layout, "mtp_info_view", this->info_list); + + mtp_functions(this); + + return this; +} + +static void _mtp_event_cb(mtp_event_e event, int event_parameter, void *user_data) +{ + mtp_view *this = NULL; + this = (mtp_view*)user_data; + RETM_IF(NULL == this, "view is NULL"); + + elm_list_item_append(this->list, "MTP Callback called", NULL, NULL, NULL, NULL); +} + +static void mtp_functions(mtp_view *this) +{ + int res = MTP_ERROR_NONE; + char buf[MAX_LENGTH] = {'\0'}; + + res = mtp_initialize(); + RETM_IF(res != MTP_ERROR_NONE, "mtp_initialize fail > Error = %s", get_mtp_info_error(res)); + elm_list_item_append(this->info_list, "MTP Initialized", NULL, NULL, NULL, NULL); + + res = mtp_add_mtp_event_cb(_mtp_event_cb, this); + RETM_IF(res != MTP_ERROR_NONE, "mtp_add_mtp_event_cb fail > Error = %s", get_mtp_info_error(res)); + elm_list_item_append(this->info_list, "MTP Callback added", NULL, NULL, NULL, NULL); + + res = mtp_get_devices(&this->mtp_devices, &this->device_count); + + RETM_IF(res != MTP_ERROR_NONE, "mtp_get_devices fail > Error = %s", get_mtp_info_error(res)); + snprintf(buf, MAX_LENGTH, "%d MTP Devices found",this->device_count); + elm_list_item_append(this->info_list, buf, NULL, NULL, NULL, NULL); + + int i; + for(i=0; idevice_count;i++) + { + snprintf(buf, MAX_LENGTH, "Device %d's Info: ",i); + elm_list_item_append(this->info_list, buf, NULL, NULL, NULL, NULL); + + char* manufacturer_name; + res = mtp_deviceinfo_get_manufacturer_name(this->mtp_devices[i], &manufacturer_name); + RETM_IF(res != MTP_ERROR_NONE, "mtp_deviceinfo_get_manufacturer_name fail > Error = %s", get_mtp_info_error(res)); + snprintf(buf, MAX_LENGTH, "Manufacturer: %s ",manufacturer_name); + elm_list_item_append(this->info_list, buf, NULL, NULL, NULL, NULL); + + char* model_name; + res = mtp_deviceinfo_get_model_name(this->mtp_devices[i], &model_name); + RETM_IF(res != MTP_ERROR_NONE, "mtp_deviceinfo_get_model_name fail > Error = %s", get_mtp_info_error(res)); + snprintf(buf, MAX_LENGTH, "Model_name: %s ", model_name); + elm_list_item_append(this->info_list, buf, NULL, NULL, NULL, NULL); + + char* serial_number; + res = mtp_deviceinfo_get_serial_number(this->mtp_devices[i], &serial_number); + RETM_IF(res != MTP_ERROR_NONE, "mtp_deviceinfo_get_serial_number fail > Error = %s", get_mtp_info_error(res)); + snprintf(buf, MAX_LENGTH, "Serial_number: %s ", serial_number); + elm_list_item_append(this->info_list, buf, NULL, NULL, NULL, NULL); + + char* device_version; + res = mtp_deviceinfo_get_device_version(this->mtp_devices[i], &device_version); + RETM_IF(res != MTP_ERROR_NONE, "mtp_deviceinfo_get_device_version fail > Error = %s", get_mtp_info_error(res)); + snprintf(buf, MAX_LENGTH, "Device_version: %s ", device_version); + elm_list_item_append(this->info_list, buf, NULL, NULL, NULL, NULL); + + + res = mtp_get_storages(this->mtp_devices[i], &this->mtp_storages, &this->storage_count); + RETM_IF(res != MTP_ERROR_NONE, "mtp_get_storages fail > Error = %s", get_mtp_info_error(res)); + snprintf(buf, MAX_LENGTH, "Storage_Count: %d ", this->storage_count); + elm_list_item_append(this->info_list, buf, NULL, NULL, NULL, NULL); + + + int j; + for(j=0; jstorage_count;j++) + { + + snprintf(buf, MAX_LENGTH, "Device %d's Storage %d's Info: ", i, j); + elm_list_item_append(this->info_list, buf, NULL, NULL, NULL, NULL); + + char* description; + res = mtp_storageinfo_get_description(this->mtp_devices[i], this->mtp_storages[j], &description); + RETM_IF(res != MTP_ERROR_NONE, "mtp_storageinfo_get_description fail > Error = %s", get_mtp_info_error(res)); + snprintf(buf, MAX_LENGTH, "Description: %s", description); + elm_list_item_append(this->info_list, buf, NULL, NULL, NULL, NULL); + + unsigned long long free_space; + res = mtp_storageinfo_get_free_space(this->mtp_devices[i], this->mtp_storages[j], &free_space); + RETM_IF(res != MTP_ERROR_NONE, "mtp_storageinfo_get_free_space fail > Error = %s", get_mtp_info_error(res)); + snprintf(buf, MAX_LENGTH, "Free space: %llu", free_space); + elm_list_item_append(this->info_list, buf, NULL, NULL, NULL, NULL); + + unsigned long long max_capacity; + res = mtp_storageinfo_get_max_capacity(this->mtp_devices[i], this->mtp_storages[j], &max_capacity); + RETM_IF(res != MTP_ERROR_NONE, "mtp_storageinfo_get_max_capacity fail > Error = %s", get_mtp_info_error(res)); + snprintf(buf, MAX_LENGTH, "Max capacity: %llu", max_capacity); + elm_list_item_append(this->info_list, buf, NULL, NULL, NULL, NULL); + + mtp_storage_type_e storage_type; + res = mtp_storageinfo_get_storage_type(this->mtp_devices[i], this->mtp_storages[j], &storage_type); + RETM_IF(res != MTP_ERROR_NONE, "mtp_storageinfo_get_storage_type fail > Error = %s", get_mtp_info_error(res)); + snprintf(buf, MAX_LENGTH, "Type: %s", get_mtp_storage_type(storage_type)); + elm_list_item_append(this->info_list, buf, NULL, NULL, NULL, NULL); + + char* volume_identifier; + res = mtp_storageinfo_get_volume_identifier(this->mtp_devices[i], this->mtp_storages[j], &volume_identifier); + RETM_IF(res != MTP_ERROR_NONE, "mtp_storageinfo_get_volume_identifier fail > Error = %s", get_mtp_info_error(res)); + snprintf(buf, MAX_LENGTH, "Volume_identifier: %s", volume_identifier); + elm_list_item_append(this->info_list, buf, NULL, NULL, NULL, NULL); + + + mtp_object_h *folder_list; + int folder_count; + int file_count; + + res = mtp_get_object_handles(this->mtp_devices[i], this->mtp_storages[j], MTP_FILETYPE_FOLDER, 0, &folder_list, &folder_count); + RETM_IF(res != MTP_ERROR_NONE, "mtp_get_object_handles fail > Error = %s", get_mtp_info_error(res)); + + snprintf(buf, MAX_LENGTH, "MTP Folders: "); + elm_list_item_append(this->info_list, buf, NULL, NULL, NULL, NULL); + + int k; + for (k = 0; k < folder_count; k++) + { + char* folder_name; + res = mtp_objectinfo_get_file_name(this->mtp_devices[i], folder_list[k], &folder_name); + RETM_IF(res != MTP_ERROR_NONE, "mtp_objectinfo_get_file_name fail > Error = %s", get_mtp_info_error(res)); + snprintf(buf, MAX_LENGTH, "%s",folder_name); + elm_list_item_append(this->info_list, buf, NULL, NULL, NULL, NULL); + + mtp_filetype_e file_type; + mtp_objectinfo_get_file_type(this->mtp_devices[i], folder_list[k], &file_type); + + if(file_type == MTP_FILETYPE_FOLDER) + { + mtp_object_h *folder_list2; + int folder_count2; + res = mtp_get_object_handles(this->mtp_devices[i], this->mtp_storages[j], MTP_FILETYPE_FOLDER, folder_list[k], &folder_list2, &folder_count2); + res = mtp_get_object_handles(this->mtp_devices[i], this->mtp_storages[j], MTP_FILETYPE_JPEG, folder_list2[folder_count2 >0 ? folder_count2-1:0], &this->file_list, &file_count); + + char* folder_name2; + mtp_objectinfo_get_file_name(this->mtp_devices[i], folder_list2[folder_count2 >0 ? folder_count2-1:0], &folder_name2); + + snprintf(buf, MAX_LENGTH, "Image Files Inside %s > %s",folder_name, folder_name2); + elm_list_item_append(this->list, buf, NULL, NULL, NULL, NULL); + + } + else + { + mtp_get_object_handles(this->mtp_devices[i], this->mtp_storages[j], MTP_FILETYPE_JPEG, folder_list[k], &this->file_list, &file_count); + } + + snprintf(buf, MAX_LENGTH, "File count: %d", file_count); + elm_list_item_append(this->list, buf, NULL, NULL, NULL, NULL); + + int k; + for (k = 0; k < file_count; k++) + { + mtp_data *data = (mtp_data*) malloc(sizeof(mtp_data)); + + deallocate_me[count++] = data; + + char* file_name; + res = mtp_objectinfo_get_file_name(this->mtp_devices[i], this->file_list[k], &file_name); + RETM_IF(res != MTP_ERROR_NONE, "mtp_objectinfo_get_file_name fail > Error = %s", get_mtp_info_error(res)); + + data->file_handle = this->file_list[k]; + data->mtp_view = this; + data->device_handle = this->mtp_devices[i]; + + DBG("file handle %d , Device handle %d", this->file_list[k], this->mtp_devices[i]); + + snprintf(buf, MAX_LENGTH, "%s",file_name); + elm_list_item_append(this->list, buf, NULL, NULL, _image_file_list_item_clicked, data); + + + /* + * FIXME: Following code has permission related issue + char file_path[128] = {'\0'}; + char* shared_res_path = app_get_shared_resource_path(); + snprintf(file_path, MAX_LENGTH, "%sthumb_%s", shared_res_path, file_name); + res = mtp_get_thumbnail(this->mtp_devices[i], this->file_list[k], file_path); + RETM_IF(res != MTP_ERROR_NONE, "mtp_get_thumbnail fail > Error = %s", get_mtp_info_error(res)); + + Evas_Object* thumb_image = ui_utils_create_image(this->view->layout, file_path); + snprintf(buf, MAX_LENGTH, "%s",file_name); + elm_list_item_append(this->list, buf, thumb_image, NULL, _image_file_list_item_clicked, data); + */ + + /* + * FIXME: These api will be covered after permission issue solved + mtp_objectinfo_get_thumbnail_size + mtp_objectinfo_get_thumbnail_file_type + mtp_objectinfo_get_thumbnail_pix_height + mtp_objectinfo_get_thumbnail_pix_width + */ + } + } + } + } + + evas_object_show(this->list); +} + +/** + * @function _app_destroy_cb + * @since_tizen 3.0 + * @description App Destroy Cb + * @parameter void*: Void Pointer + * @return static void + */ +static void _app_destroy_cb(void* this) +{ + RETM_IF(NULL == this, "data is NULL"); + + mtp_view *view = NULL; + view = (mtp_view*)this; + RETM_IF(NULL == view, "view is NULL"); + + int res = MTP_ERROR_NONE; + + DBG("Count %d", count); + int i; + for(i=0; i Error = %s", get_mtp_info_error(res)); + + res = mtp_deinitialize(); + RETM_IF(res != MTP_ERROR_NONE, "mtp_deinitialize fail > Error = %s", get_mtp_info_error(res)); + + SAFE_DELETE(view->view); + SAFE_DELETE(view); +} + +static char* get_mtp_info_error(mtp_error_e err_code) +{ + char* err_msg; + + switch (err_code) { + case MTP_ERROR_NONE: + err_msg = "MTP_ERROR_NONE"; + break; + case MTP_ERROR_IO_ERROR: + err_msg = "MTP_ERROR_IO_ERROR"; + break; + case MTP_ERROR_INVALID_PARAMETER: + err_msg = "MTP_ERROR_INVALID_PARAMETER"; + break; + case MTP_ERROR_OUT_OF_MEMORY: + err_msg = "MTP_ERROR_OUT_OF_MEMORY"; + break; + case MTP_ERROR_PERMISSION_DENIED: + err_msg = "MTP_ERROR_PERMISSION_DENIED"; + break; + case MTP_ERROR_NOT_SUPPORTED: + err_msg = "MTP_ERROR_NOT_SUPPORTED"; + break; + case MTP_ERROR_COMM_ERROR: + err_msg = "MTP_ERROR_COMM_ERROR"; + break; + case MTP_ERROR_CONTROLLER: + err_msg = "MTP_ERROR_CONTROLLER"; + break; + case MTP_ERROR_NO_DEVICE: + err_msg = "MTP_ERROR_NO_DEVICE"; + break; + case MTP_ERROR_NOT_INITIALIZED: + err_msg = "MTP_ERROR_NOT_INITIALIZED"; + break; + case MTP_ERROR_NOT_ACTIVATED: + err_msg = "MTP_ERROR_NOT_ACTIVATED"; + break; + case MTP_ERROR_NOT_COMM_INITIALIZED: + err_msg = "MTP_ERROR_NOT_COMM_INITIALIZED"; + break; + case MTP_ERROR_PLUGIN_FAIL: + err_msg = "MTP_ERROR_PLUGIN_FAIL"; + break; + default: + err_msg = "Unknown Error"; + break; + + } + return err_msg; +} + + +static char* get_mtp_storage_type(mtp_storage_type_e type_e) +{ + char* type_str; + switch(type_e){ + case MTP_STORAGE_TYPE_UNDEFINED: + type_str = "MTP_STORAGE_TYPE_UNDEFINED"; + break; + + case MTP_STORAGE_TYPE_FIXED_ROM: + type_str = "MTP_STORAGE_TYPE_FIXED_ROM"; + break; + + case MTP_STORAGE_TYPE_REMOVABLE_ROM: + type_str = "MTP_STORAGE_TYPE_REMOVABLE_ROM"; + break; + + case MTP_STORAGE_TYPE_FIXED_RAM: + type_str = "MTP_STORAGE_TYPE_FIXED_RAM"; + break; + + case MTP_STORAGE_TYPE_REMOVABLE_RAM: + type_str = "MTP_STORAGE_TYPE_REMOVABLE_RAM"; + break; + + default: + type_str = "Unknown Type"; + break; + } + + return type_str; + +} + +static void _image_file_list_item_clicked(void *data, Evas_Object *obj, void *event_info) +{ + + DBG("_image_file_list_item_clicked"); + + RETM_IF(NULL == data, "Data is NULL"); + + mtp_data *mt = (mtp_data*) data; + mtp_view* this = (mtp_view*) mt->mtp_view; + + RETM_IF(NULL == this, "mtp_view is NULL"); + + mtp_object_h file_handle = mt->file_handle; + mtp_device_h device_handle = mt->device_handle; + + DBG("File Handle %d", file_handle); + DBG("Device Handle %d", device_handle); + + DBG("before elm_list_clear"); + + elm_list_clear(this->info_list); + int res = MTP_ERROR_NONE; + char buf[MAX_LENGTH] = {'\0'}; + + char* keywords; + res = mtp_objectinfo_get_keywords(device_handle, file_handle, &keywords); + RETM_IF(res != MTP_ERROR_NONE, "mtp_objectinfo_get_keywords fail > Error = %s", get_mtp_info_error(res)); + snprintf(buf, MAX_LENGTH, "Keyword: %s" ,keywords); + elm_list_item_append(this->info_list, buf, NULL, NULL, NULL, NULL); + + int asso_desc; + res = mtp_objectinfo_get_association_desc(device_handle, file_handle, &asso_desc); + RETM_IF(res != MTP_ERROR_NONE, "mtp_objectinfo_get_association_desc fail > Error = %s", get_mtp_info_error(res)); + snprintf(buf, MAX_LENGTH, "Asso_desc: %d",asso_desc); + elm_list_item_append(this->info_list, buf, NULL, NULL, NULL, NULL); + + int asso_type; + res = mtp_objectinfo_get_association_type(device_handle, file_handle, &asso_type); + RETM_IF(res != MTP_ERROR_NONE, "mtp_objectinfo_get_association_type fail > Error = %s", get_mtp_info_error(res)); + snprintf(buf, MAX_LENGTH, "Asso_type: %d", asso_type); + elm_list_item_append(this->info_list, buf, NULL, NULL, NULL, NULL); + + int size; + res = mtp_objectinfo_get_size(device_handle, file_handle, &size); + RETM_IF(res != MTP_ERROR_NONE, "mtp_objectinfo_get_size fail > Error = %s", get_mtp_info_error(res)); + snprintf(buf, MAX_LENGTH, "Size: %d", size); + elm_list_item_append(this->info_list, buf, NULL, NULL, NULL, NULL); + + //TODO: Following two should be fixed later + mtp_object_h parent_object_handle; + res = mtp_objectinfo_get_parent_object_handle(device_handle, file_handle, &parent_object_handle); + RETM_IF(res != MTP_ERROR_NONE, "mtp_objectinfo_get_parent_object_handle fail > Error = %s", get_mtp_info_error(res)); + + res = mtp_objectinfo_get_storage(device_handle, file_handle, &parent_object_handle); + RETM_IF(res != MTP_ERROR_NONE, "mtp_objectinfo_get_storage fail > Error = %s", get_mtp_info_error(res)); + + // + + int date_created; + res = mtp_objectinfo_get_date_created(device_handle, file_handle, &date_created); + RETM_IF(res != MTP_ERROR_NONE, "mtp_objectinfo_get_date_created fail > Error = %s", get_mtp_info_error(res)); + snprintf(buf, MAX_LENGTH, "date_created: %d", date_created); + elm_list_item_append(this->info_list, buf, NULL, NULL, NULL, NULL); + + int date_modified; + res = mtp_objectinfo_get_date_modified(device_handle, file_handle, &date_modified); + RETM_IF(res != MTP_ERROR_NONE, "mtp_objectinfo_get_date_modified fail > Error = %s", get_mtp_info_error(res)); + snprintf(buf, MAX_LENGTH, "date_modified: %d", date_modified); + elm_list_item_append(this->info_list, buf, NULL, NULL, NULL, NULL); + + mtp_filetype_e file_type; + res = mtp_objectinfo_get_file_type(device_handle, file_handle, &file_type); + RETM_IF(res != MTP_ERROR_NONE, "mtp_objectinfo_get_file_type fail > Error = %s", get_mtp_info_error(res)); + snprintf(buf, MAX_LENGTH, "file_type: %s", get_mtp_file_type_str(file_type)); + elm_list_item_append(this->info_list, buf, NULL, NULL, NULL, NULL); + + int depth; + res = mtp_objectinfo_get_image_bit_depth(device_handle, file_handle, &depth); + RETM_IF(res != MTP_ERROR_NONE, "mtp_objectinfo_get_image_bit_depth fail > Error = %s", get_mtp_info_error(res)); + snprintf(buf, MAX_LENGTH, "image bit depth: %d", depth); + elm_list_item_append(this->info_list, buf, NULL, NULL, NULL, NULL); + + int width; + res = mtp_objectinfo_get_image_pix_width(device_handle, file_handle, &width); + RETM_IF(res != MTP_ERROR_NONE, "mtp_objectinfo_get_image_pix_width fail > Error = %s", get_mtp_info_error(res)); + snprintf(buf, MAX_LENGTH, "image pix width: %d", width); + elm_list_item_append(this->info_list, buf, NULL, NULL, NULL, NULL); + + int height; + res = mtp_objectinfo_get_image_pix_height(device_handle, file_handle, &height); + RETM_IF(res != MTP_ERROR_NONE, "mtp_objectinfo_get_image_pix_height fail > Error = %s", get_mtp_info_error(res)); + snprintf(buf, MAX_LENGTH, "image pix height: %d", height); + elm_list_item_append(this->info_list, buf, NULL, NULL, NULL, NULL); + + char* file_name; + res = mtp_objectinfo_get_file_name(device_handle, file_handle, &file_name); + RETM_IF(res != MTP_ERROR_NONE, "mtp_objectinfo_get_file_name fail > Error = %s", get_mtp_info_error(res)); + + +//FIXME: Following code has permission related issue + char* shared_res_path = app_get_shared_resource_path(); + char* image_path = format_string("%simages/%s",shared_res_path,file_name); + DBG("Image Path %s", image_path); + + res = mtp_get_object(device_handle, file_handle, image_path); + RETM_IF(res != MTP_ERROR_NONE, "mtp_get_object fail > Error = %s", get_mtp_info_error(res)); + + Evas_Object* image = ui_utils_create_image(this->view->layout, image_path); + elm_object_part_content_set(this->view->layout, "mtp_image_view", image); + + +} + +static char* get_mtp_file_type_str(mtp_filetype_e file_type){ + char* type_str; + switch (file_type) { + case MTP_FILETYPE_FOLDER: + type_str = "MTP_FILETYPE_FOLDER"; + break; + case MTP_FILETYPE_WAV: + type_str = "MTP_FILETYPE_WAV"; + break; + case MTP_FILETYPE_MP3: + type_str = "MTP_FILETYPE_MP3"; + break; + case MTP_FILETYPE_WMA: + type_str = "MTP_FILETYPE_WMA"; + break; + case MTP_FILETYPE_OGG: + type_str = "MTP_FILETYPE_OGG"; + break; + case MTP_FILETYPE_AUDIBLE: + type_str = "MTP_FILETYPE_AUDIBLE"; + break; + case MTP_FILETYPE_MP4: + type_str = "MTP_FILETYPE_MP4"; + break; + case MTP_FILETYPE_UNDEF_AUDIO: + type_str = "MTP_FILETYPE_UNDEF_AUDIO"; + break; + case MTP_FILETYPE_WMV: + type_str = "MTP_FILETYPE_WMV"; + break; + case MTP_FILETYPE_AVI: + type_str = "MTP_FILETYPE_AVI"; + break; + case MTP_FILETYPE_MPEG: + type_str = "MTP_FILETYPE_MPEG"; + break; + case MTP_FILETYPE_ASF: + type_str = "MTP_FILETYPE_ASF"; + break; + case MTP_FILETYPE_QT: + type_str = "MTP_FILETYPE_QT"; + break; + case MTP_FILETYPE_UNDEF_VIDEO: + type_str = "MTP_FILETYPE_UNDEF_VIDEO"; + break; + case MTP_FILETYPE_JPEG: + type_str = "MTP_FILETYPE_JPEG"; + break; + case MTP_FILETYPE_JFIF: + type_str = "MTP_FILETYPE_JFIF"; + break; + case MTP_FILETYPE_TIFF: + type_str = "MTP_FILETYPE_TIFF"; + break; + case MTP_FILETYPE_BMP: + type_str = "MTP_FILETYPE_BMP"; + break; + case MTP_FILETYPE_GIF: + type_str = "MTP_FILETYPE_GIF"; + break; + case MTP_FILETYPE_PICT: + type_str = "MTP_FILETYPE_PICT"; + break; + case MTP_FILETYPE_PNG: + type_str = "MTP_FILETYPE_PNG"; + break; + case MTP_FILETYPE_VCALENDAR1: + type_str = "MTP_FILETYPE_VCALENDAR1"; + break; + case MTP_FILETYPE_VCALENDAR2: + type_str = "MTP_FILETYPE_VCALENDAR2"; + break; + case MTP_FILETYPE_VCARD2: + type_str = "MTP_FILETYPE_VCARD2"; + break; + case MTP_FILETYPE_VCARD3: + type_str = "MTP_FILETYPE_VCARD3"; + break; + case MTP_FILETYPE_WINDOWSIMAGEFORMAT: + type_str = "MTP_FILETYPE_WINDOWSIMAGEFORMAT"; + break; + case MTP_FILETYPE_WINEXEC: + type_str = "MTP_FILETYPE_WINEXEC"; + break; + case MTP_FILETYPE_TEXT: + type_str = "MTP_FILETYPE_TEXT"; + break; + case MTP_FILETYPE_HTML: + type_str = "MTP_FILETYPE_HTML"; + break; + case MTP_FILETYPE_FIRMWARE: + type_str = "MTP_FILETYPE_FIRMWARE"; + break; + case MTP_FILETYPE_AAC: + type_str = "MTP_FILETYPE_AAC"; + break; + case MTP_FILETYPE_MEDIACARD: + type_str = "MTP_FILETYPE_MEDIACARD"; + break; + case MTP_FILETYPE_FLAC: + type_str = "MTP_FILETYPE_FLAC"; + break; + case MTP_FILETYPE_MP2: + type_str = "MTP_FILETYPE_MP2"; + break; + case MTP_FILETYPE_M4A: + type_str = "MTP_FILETYPE_M4A"; + break; + case MTP_FILETYPE_DOC: + type_str = "MTP_FILETYPE_DOC"; + break; + case MTP_FILETYPE_XML: + type_str = "MTP_FILETYPE_XML"; + break; + case MTP_FILETYPE_XLS: + type_str = "MTP_FILETYPE_XLS"; + break; + case MTP_FILETYPE_PPT: + type_str = "MTP_FILETYPE_PPT"; + break; + case MTP_FILETYPE_MHT: + type_str = "MTP_FILETYPE_MHT"; + break; + case MTP_FILETYPE_JP2: + type_str = "MTP_FILETYPE_JP2"; + break; + case MTP_FILETYPE_JPX: + type_str = "MTP_FILETYPE_JPX"; + break; + case MTP_FILETYPE_ALBUM: + type_str = "MTP_FILETYPE_ALBUM"; + break; + case MTP_FILETYPE_PLAYLIST: + type_str = "MTP_FILETYPE_PLAYLIST"; + break; + case MTP_FILETYPE_UNKNOWN: + type_str = "MTP_FILETYPE_UNKNOWN"; + break; + case MTP_FILETYPE_ALL: + type_str = "MTP_FILETYPE_ALL"; + break; + case MTP_FILETYPE_ALL_IMAGE: + type_str = "MTP_FILETYPE_ALL_IMAGE"; + break; + default: + type_str = "Unknown Type"; + break; + } + + return type_str; +} + + +#endif diff --git a/tbtcoreapp/src/view/tbt-nfc-hce-preferred-view.c b/tbtcoreapp/src/view/tbt-nfc-hce-preferred-view.c new file mode 100644 index 0000000..66d524c --- /dev/null +++ b/tbtcoreapp/src/view/tbt-nfc-hce-preferred-view.c @@ -0,0 +1,262 @@ +/******************************************************************************* + * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + *******************************************************************************/ +/** + * @file tbt-nfc_hce_preferred-view.c + * @brief nfc_hce_preferred app test. + * + * @author A. B. M. Nazibullah (nazib.ullah@samsung.com) + * @date June, 2016 + * @bug no known bug + * @credit + * + */ + +#include "utils/app_module_config.h" +#ifdef TBT_MODULE_APP_NFC_HCE_PREFERRED + +#include + +#include "utils/logger.h" +#include "utils/config.h" +#include "utils/ui-utils.h" +#include "view/tbt-nfc-hce-preferred-view.h" +#include "view/tbt-common-view.h" + +#define NFC_HCE_PREFERRED_APP_PACKAGE_NAME "org.tizen.tbt_hcetestappb" + +struct _nfc_hce_preferred_view +{ + common_view* view; + + Evas_Object *label; + Evas_Object *data_list; + Evas_Object* single_btn; + Evas_Object* multiple_btn; + + app_control_h service; +}; + +static Evas_Object *add_control_layout(nfc_hce_preferred_view *this, Evas_Object *parent); + +static void _app_destroy_cb(void* this); +static void _view_button_pressed_cb(void *data, Evas_Object *obj, void *event_info); +static void app_control_view_reply_cb(app_control_h request, app_control_h reply, app_control_result_e result, void *data); + + +/** + * @function get_app_control_error + * @since_tizen 2.3 + * @description Get App Control Error + * @parameter int: Int + * @return static char* + */ +static char* get_app_control_error(int ret) +{ + char* error = NULL; + + switch (ret) { + case APP_CONTROL_ERROR_NONE: + error = "APP_CONTROL_ERROR_NONE"; + break; + case APP_CONTROL_ERROR_INVALID_PARAMETER: + error = "APP_CONTROL_ERROR_INVALID_PARAMETER"; + break; + case APP_CONTROL_ERROR_OUT_OF_MEMORY: + error = "APP_CONTROL_ERROR_OUT_OF_MEMORY"; + break; + case APP_CONTROL_ERROR_APP_NOT_FOUND: + error = "APP_CONTROL_ERROR_APP_NOT_FOUND"; + break; + case APP_CONTROL_ERROR_KEY_NOT_FOUND: + error = "APP_CONTROL_ERROR_KEY_NOT_FOUND"; + break; + case APP_CONTROL_ERROR_KEY_REJECTED: + error = "APP_CONTROL_ERROR_KEY_REJECTED"; + break; + case APP_CONTROL_ERROR_INVALID_DATA_TYPE: + error = "APP_CONTROL_ERROR_INVALID_DATA_TYPE"; + break; + case APP_CONTROL_ERROR_LAUNCH_REJECTED: + error = "APP_CONTROL_ERROR_LAUNCH_REJECTED"; + break; + case APP_CONTROL_ERROR_PERMISSION_DENIED: + error = "APP_CONTROL_ERROR_PERMISSION_DENIED"; + break; + case APP_CONTROL_ERROR_LAUNCH_FAILED: + error = "APP_CONTROL_ERROR_LAUNCH_FAILED"; + break; + case APP_CONTROL_ERROR_TIMED_OUT: + error = "APP_CONTROL_ERROR_TIMED_OUT"; + break; +#ifdef TIZEN_3_0 + case APP_CONTROL_ERROR_IO_ERROR: + error = "APP_CONTROL_ERROR_IO_ERROR"; + break; +#endif +#ifdef TIZEN_2_4 + case APP_CONTROL_ERROR_IO_ERROR: + error = "APP_CONTROL_ERROR_IO_ERROR"; + break; +#endif + default: + error = "Unknown Error"; + break; + } + return error; +} + + +/** + * @function nfc_hce_preferred_view_add + * @since_tizen 2.3 + * @description Pick View Add + * @parameter Evas_Object*: Evas Object Pointer, tbt_info*: Tbt Info Pointer, Elm_Object_Item*: Elm Object Item Pointer + * @return nfc_hce_preferred_view* + */ +nfc_hce_preferred_view *nfc_hce_preferred_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Item *item) +{ + RETVM_IF(NULL == navi, NULL, "navi is null"); + + nfc_hce_preferred_view *this = NULL; + this = calloc(1, sizeof(nfc_hce_preferred_view)); + RETVM_IF(!this, NULL, "calloc failed"); + + this->view = calloc(1, sizeof(common_view)); + RETVM_IF(!this->view, NULL, "calloc failed"); + + tbt_info->layout_group = "4_part_txt_cnt_btn_btn"; + tbt_info->layout_file = get_edje_path("4_part_txt_cnt2_btn_btn.edj"); + + common_view_add(navi, tbt_info, item, this->view, _app_destroy_cb, this); + RETVM_IF(NULL == this->view, NULL, "navi is null"); + + this->label = ui_utils_label_add(this->view->layout, ""); + RETVM_IF(!this->label, NULL, "elm_list_add failed"); + ui_utils_label_set_text(this->label, "Launch nfc hce pref app.", "left"); + elm_object_part_content_set(this->view->layout, "1txt", this->label); + + Evas_Object *control = add_control_layout(this, this->view->layout); + elm_object_part_content_set(this->view->layout, "1txt_2cnt_3btn", control); + + return this; +} + + +/** + * @function add_control_layout + * @since_tizen 2.3 + * @description Add Control Layout + * @parameter nfc_hce_preferred_view*: Pick View Pointer, Evas_Object*: Evas Object Pointer + * @return static Evas_Object* + */ +static Evas_Object *add_control_layout(nfc_hce_preferred_view *this, Evas_Object *parent) +{ + RETVM_IF(NULL == this, NULL, "view is NULL"); + + Evas_Object *table = elm_table_add(parent); + + evas_object_size_hint_weight_set(table, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + evas_object_size_hint_align_set(table, EVAS_HINT_FILL, EVAS_HINT_FILL); + evas_object_show(table); + + elm_table_padding_set(table, 0, 0); + this->single_btn = ui_utils_push_button_add(this, table, "Launch App", _view_button_pressed_cb); + elm_table_pack(table, this->single_btn, 0, 0, 1, 1); + + return table; +} + +/** + * @function _view_button_pressed_cb + * @since_tizen 2.3 + * @description View Button Pressed Cb + * @parameter void*: Void Pointer, Evas_Object*: Evas Object Pointer, void*: Void Pointer + * @return static void + */ +static void _view_button_pressed_cb(void *data, Evas_Object *obj, void *event_info) +{ + RETM_IF(NULL == data, "data is NULL"); + + nfc_hce_preferred_view *view = NULL; + view = (nfc_hce_preferred_view*)data; + RETM_IF(NULL == view, "view is NULL"); + + char *appid = NFC_HCE_PREFERRED_APP_PACKAGE_NAME; + int ret = app_control_create(&view->service); + RETM_IF(APP_CONTROL_ERROR_NONE != ret, "app_control_create failed :%s", get_app_control_error(ret)); + RETM_IF(NULL == view->service, "Service NULL! "); + ret = app_control_set_app_id(view->service, appid); + RETM_IF(APP_CONTROL_ERROR_NONE != ret, "app_control_set_app_id failed :%s", get_app_control_error(ret)); + ret = app_control_send_launch_request(view->service , app_control_view_reply_cb, view); + RETM_IF(APP_CONTROL_ERROR_NONE != ret, "app_control_send_launch_request failed :%s", get_app_control_error(ret)); + ui_utils_label_set_text(view->label, "App launch requested.", "left"); +} + + + +/** + * @function app_control_view_reply_cb + * @since_tizen 2.3 + * @description App Control View Reply Cb + * @parameter app_control_h: App Control H, void*: Void Pointer + * @return static void + */ +static void app_control_view_reply_cb(app_control_h request, app_control_h reply, app_control_result_e result, void *data) +{ + RETM_IF(NULL == data, "data is NULL"); + + nfc_hce_preferred_view *view = NULL; + view = (nfc_hce_preferred_view*)data; + RETM_IF(NULL == view, "view is NULL"); + + if(result == APP_CONTROL_RESULT_SUCCEEDED) + { + int result; + char *app_id; + + if(reply != NULL) + { + result = app_control_get_app_id(reply, &app_id); + RETM_IF(APP_CONTROL_ERROR_NONE != result, "app_control_create failed :%s", get_app_control_error(result)); + DBG("app_id is %s", app_id); + + ui_utils_label_set_text(view->label, "App launched successfully.", "left"); + } + } +} + + + +/** + * @function _app_destroy_cb + * @since_tizen 2.3 + * @description App Destroy Cb + * @parameter void*: Void Pointer + * @return static void + */ +static void _app_destroy_cb(void* this) +{ + RETM_IF(NULL == this, "data is NULL"); + + nfc_hce_preferred_view *view = NULL; + view = (nfc_hce_preferred_view*)this; + RETM_IF(NULL == view, "view is NULL"); + + SAFE_DELETE(view->view); + SAFE_DELETE(view); +} + +#endif diff --git a/tbtcoreapp/src/view/tbt-nsd-dns-sd-view.c b/tbtcoreapp/src/view/tbt-nsd-dns-sd-view.c new file mode 100644 index 0000000..84bd216 --- /dev/null +++ b/tbtcoreapp/src/view/tbt-nsd-dns-sd-view.c @@ -0,0 +1,682 @@ +/******************************************************************************* + * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + *******************************************************************************/ +/** + * @file tbt-nsd_dnssd-view.h + * @brief checks required nsd_dnssds are available or not + * + * @author A B M Nazibullah(nazib.ullah@samsung.com) + * @date October, 2014 + * @bug NA + * @credit Tizen SDK Version 2.3.0 Sample Example + * + */ + +#include "utils/app_module_config.h" +#ifdef TBT_MODULE_NSD + +#include +#include + +#include "utils/logger.h" +#include "utils/config.h" +#include "utils/ui-utils.h" +#include "view/tbt-nsd-dns-sd-view.h" +#include "view/tbt-common-view.h" + +struct _nsd_dnssd_view +{ + common_view* view; + + Evas_Object* list; + Evas_Object* info_list; + + dnssd_service_h dnssd_local_service; + dnssd_service_h dnssd_remote_service; + + Evas_Object* btn_browse_service; + Evas_Object* btn_add_text_record; + + char* txt_record_key; + + bool is_btn_add_text_clicked; + bool is_btn_browse_clicked; +}; + + +static void _app_destroy_cb(void* this); +static char* get_dns_sd_error(dnssd_error_e error); +static void dns_sd_api(void* data); +static void _dnssd_registered_cb(dnssd_error_e result, dnssd_service_h local_service, void *user_data); +static void _on_browse_btn_clickded_cb(void *data, Evas_Object *obj, void *event_info); +static void _on_add_record_btn_clickded_cb(void *data, Evas_Object *obj, void *event_info); +static void _dnssd_found_cb(dnssd_service_state_e service_state, dnssd_service_h remote_service, void *user_data); +static char** str_split(char* a_str, const char a_delim); + + +#ifdef USE_GENLIST +typedef struct +{ + int index; + Elm_Object_Item *item; + char* text; +}item_data; + +static void _gl_del_cb(void *data, Evas_Object *obj EINA_UNUSED); +static char *_gl_text_get_cb(void *data, Evas_Object *obj, const char *part); +Elm_Object_Item* _nsd_dnssd_elm_genlist_item_append(Evas_Object *this, char *item_text, void* data); +#endif + + + +#ifdef USE_GENLIST +static void _gl_del_cb(void *data, Evas_Object *obj EINA_UNUSED) +{ + DBG("_gl_del_cb"); + item_data *id = data; + RETM_IF(!id, "item is NULL"); + SAFE_DELETE(id); +} + +static char *_gl_text_get_cb(void *data, Evas_Object *obj, const char *part) +{ + DBG("_gl_text_get_cb"); + item_data *id = data; + //const Elm_Genlist_Item_Class *itc = elm_genlist_item_item_class_get(id->item); + + //if(itc->item_style && !strcmp(itc->item_style, "default")) + { + + if(part && !strcmp(part, "elm.text")) + { + char buf[1024]; + snprintf(buf, 1023, id->text); + return strdup(buf); + } + } + return NULL; +} + +Elm_Object_Item* _nsd_dnssd_elm_genlist_item_append(Evas_Object* list, char *item_text, void* data) +{ + + DBG("_pick_elm_genlist_item_append%s:", item_text); + static int index = 1; + Elm_Genlist_Item_Class *itc = elm_genlist_item_class_new(); + + itc->item_style = "default"; + itc->func.text_get = _gl_text_get_cb; + itc->func.content_get = NULL; + itc->func.del = _gl_del_cb; + + item_data *id = calloc(sizeof(item_data), 1); + id->index = index++; + id->text = strdup(item_text); + + elm_scroller_single_direction_set(list, ELM_SCROLLER_SINGLE_DIRECTION_HARD); + + //HOMOGENEOUS MODE + //If item height is same when each style name is same, Use homogeneous mode. + elm_genlist_homogeneous_set(list, EINA_TRUE); + + //COMPRESS MODE + //For the Mobile view, because it has full window, compresse mode should be used. + elm_genlist_mode_set(list, ELM_LIST_COMPRESS); + + Elm_Object_Item *item = elm_genlist_item_append(list, itc,id, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL); + id->item = item; + + elm_genlist_item_class_free(itc); + + return item; +} +#endif + +/** + * @function nsd_dnssd_view_add + * @since_tizen 3.0 + * @description nsd_dnssd View Add + * @parameter Evas_Object*: Evas Object Pointer, tbt_info*: Tbt Info Pointer, Elm_Object_Item*: Elm Object Item Pointer + * @return nsd_dnssd_view* + */ +nsd_dnssd_view *nsd_dnssd_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Item *item) +{ + RETVM_IF(NULL == navi, NULL, "navi is null"); + + nsd_dnssd_view *this = NULL; + this = calloc(1, sizeof(nsd_dnssd_view)); + RETVM_IF(!this, NULL, "calloc failed"); + this->view = calloc(1, sizeof(common_view)); + RETVM_IF(!this->view, NULL, "calloc failed"); + + tbt_info->layout_group = "nsd_dnssd_viewer"; + tbt_info->layout_file = get_edje_path("nsd_viewer.edj"); + + common_view_add(navi, tbt_info, item, this->view, _app_destroy_cb, this); + + RETVM_IF(NULL == this->view, NULL, "navi is null"); + + +#ifdef USE_GENLIST + this->list = elm_genlist_add(this->view->layout); + RETVM_IF(!this->list, NULL, "elm_genlist_add failed"); +#else + this->list = elm_list_add(this->view->layout); + RETVM_IF(!this->list, NULL, "elm_list_add failed"); +#endif + + evas_object_data_set(this->list, "view_data", this); + elm_object_part_content_set(this->view->layout, "nsd_dnssd_view", this->list); + +#ifdef USE_GENLIST + this->info_list = elm_genlist_add(this->view->layout); + RETVM_IF(!this->info_list, NULL, "elm_genlist_add failed"); +#else + this->info_list = elm_list_add(this->view->layout); + RETVM_IF(!this->info_list, NULL, "elm_list_add failed"); +#endif + + evas_object_data_set(this->info_list, "view_data", this); + elm_object_part_content_set(this->view->layout, "nsd_dnssd_info_view", this->info_list); + + + if(this->view->tbt_info->apptype == TBT_APP_NSD_DNS_SD_LOCAL) + { + this->btn_browse_service = ui_utils_push_button_add(this, this->view->layout, "Browse Service", _on_browse_btn_clickded_cb); + elm_object_part_content_set(this->view->layout, "nsd_dnssd_btn_view", this->btn_browse_service); + } + else if(this->view->tbt_info->apptype == TBT_APP_NSD_DNS_SD_REMOTE) + { + this->btn_add_text_record = ui_utils_push_button_add(this, this->view->layout, "Add Record", _on_add_record_btn_clickded_cb); + elm_object_part_content_set(this->view->layout, "nsd_dnssd_btn_view", this->btn_add_text_record); + } + + evas_object_show(this->list); + evas_object_show(this->info_list); + + dns_sd_api(this); + + + return this; +} + + +static void dns_sd_api(void* data) +{ + DBG("dns_sd_api"); + + RETM_IF(NULL == data, "data is NULL"); + nsd_dnssd_view *this = (nsd_dnssd_view*) data; + + int res = DNSSD_ERROR_NONE; + + res = dnssd_initialize(); + RETM_IF(res != DNSSD_ERROR_NONE, "dnssd_initialize fail > Error = %s", get_dns_sd_error(res)); + + char* str = format_string("%s", "dnssd initialized"); +#ifdef USE_GENLIST + _nsd_dnssd_elm_genlist_item_append(this->info_list, str,NULL); +#else + elm_list_item_append(this->info_list, str, NULL, NULL, NULL, NULL); +#endif + SAFE_DELETE(str); + +} + + +static void _dnssd_registered_cb(dnssd_error_e result, dnssd_service_h local_service, void *data) +{ + DBG("_dnssd_registered_cb"); + RETM_IF(NULL == data, "data is NULL"); + nsd_dnssd_view *this = (nsd_dnssd_view*) data; + + char* str = format_string("%s", "local service registered"); +#ifdef USE_GENLIST + _nsd_dnssd_elm_genlist_item_append(this->info_list, str,NULL); +#else + elm_list_item_append(this->info_list, str, NULL, NULL, NULL, NULL); +#endif + SAFE_DELETE(str); + + str = format_string("registered service: %u", local_service); +#ifdef USE_GENLIST + _nsd_dnssd_elm_genlist_item_append(this->list, str,NULL); +#else + elm_list_item_append(this->list, str, NULL, NULL, NULL, NULL); +#endif + SAFE_DELETE(str); +#ifndef USE_GENLIST + elm_list_go(this->list); + elm_list_go(this->info_list); +#endif +} + +static void _dnssd_found_cb(dnssd_service_state_e service_state, dnssd_service_h remote_service, void *data) +{ + DBG("_dnssd_found_cb"); + RETM_IF(NULL == data, "data is NULL"); + nsd_dnssd_view *this = (nsd_dnssd_view*) data; + + unsigned short length; + char* value; + + char* ipv4; + char* ipv6; + int port; + char* service_name; + char* service_type; + char* str; + + if(service_state == DNSSD_SERVICE_STATE_AVAILABLE) + { + str = format_string("remote service %u", remote_service); +#ifdef USE_GENLIST + _nsd_dnssd_elm_genlist_item_append(this->list, str,NULL); +#else + elm_list_item_append(this->list, str, NULL, NULL, NULL, NULL); +#endif + SAFE_DELETE(str); + + str = format_string("found remote service"); +#ifdef USE_GENLIST + _nsd_dnssd_elm_genlist_item_append(this->info_list, str,NULL); +#else + elm_list_item_append(this->info_list, str, NULL, NULL, NULL, NULL); +#endif + SAFE_DELETE(str); + + int res = dnssd_service_get_all_txt_record(remote_service, &length, (void*)&value); + RETM_IF(res != DNSSD_ERROR_NONE, "dnssd_service_get_all_txt_record fail > Error = %s", get_dns_sd_error(res)); + + res = dnssd_service_get_name(remote_service, &service_name); + RETM_IF(res != DNSSD_ERROR_NONE, "dnssd_service_get_name fail > Error = %s", get_dns_sd_error(res)); + if(service_name != NULL && sizeof(service_name) >0) + { + str = format_string("service name: %s", service_name); +#ifdef USE_GENLIST + _nsd_dnssd_elm_genlist_item_append(this->list, str,NULL); +#else + elm_list_item_append(this->list, str, NULL, NULL, NULL, NULL); +#endif + SAFE_DELETE(str); + } + + res = dnssd_service_get_type(remote_service, &service_type); + RETM_IF(res != DNSSD_ERROR_NONE, "dnssd_service_get_type fail > Error = %s", get_dns_sd_error(res)); + + if(service_type != NULL && sizeof(service_type) >0) + { + str = format_string("service type: %s", service_type); +#ifdef USE_GENLIST + _nsd_dnssd_elm_genlist_item_append(this->list, str,NULL); +#else + elm_list_item_append(this->list, str, NULL, NULL, NULL, NULL); +#endif + SAFE_DELETE(str); + } + + res = dnssd_service_get_ip(remote_service, &ipv4, &ipv6); + RETM_IF(res != DNSSD_ERROR_NONE, "dnssd_service_get_ip fail > Error = %s", get_dns_sd_error(res)); + + if(ipv4 != NULL && sizeof(ipv4) >0) + { + str = format_string("ipv4: %s", ipv4); +#ifdef USE_GENLIST + _nsd_dnssd_elm_genlist_item_append(this->list, str,NULL); +#else + elm_list_item_append(this->list, str, NULL, NULL, NULL, NULL); +#endif + SAFE_DELETE(str); + } + if(ipv6 != NULL && sizeof(ipv6) >0) + { + str = format_string("ipv6: %s", ipv6); +#ifdef USE_GENLIST + _nsd_dnssd_elm_genlist_item_append(this->list, str,NULL); +#else + elm_list_item_append(this->list, str, NULL, NULL, NULL, NULL); +#endif + SAFE_DELETE(str); + } + + res = dnssd_service_get_port(remote_service, &port); + RETM_IF(res != DNSSD_ERROR_NONE, "dnssd_service_get_port fail > Error = %s", get_dns_sd_error(res)); + + str = format_string("port: %d", port); +#ifdef USE_GENLIST + _nsd_dnssd_elm_genlist_item_append(this->list, str,NULL); +#else + elm_list_item_append(this->list, str, NULL, NULL, NULL, NULL); +#endif + SAFE_DELETE(str); + + + memmove(value, value+1, strlen(value)); + + char** tokens = str_split(value, '='); + + + + + if (tokens) + { + + if(tokens[0] != NULL && strlen(tokens[0])>0) + { + str = format_string("key: %s", tokens[0]); +#ifdef USE_GENLIST + _nsd_dnssd_elm_genlist_item_append(this->list, str,NULL); +#else + elm_list_item_append(this->list, str, NULL, NULL, NULL, NULL); +#endif + SAFE_DELETE(str); + } + if(tokens[1] != NULL && strlen(tokens[1])>0) + { + str = format_string("value: %s", tokens[1]); +#ifdef USE_GENLIST + _nsd_dnssd_elm_genlist_item_append(this->list, str,NULL); +#else + elm_list_item_append(this->list, str, NULL, NULL, NULL, NULL); +#endif + SAFE_DELETE(str); + } + + int i; + for (i = 0; *(tokens + i); i++) + { + SAFE_DELETE(*(tokens + i)); + } + + SAFE_DELETE(tokens); + } + +#ifndef USE_GENLIST + elm_list_go(this->list); + elm_list_go(this->info_list); +#endif + } +} + +static void _on_add_record_btn_clickded_cb(void *data, Evas_Object *obj, void *event_info) +{ + + RETM_IF(NULL == data, "data is NULL"); + nsd_dnssd_view *this = (nsd_dnssd_view*) data; + + this->is_btn_add_text_clicked = true; + + char* str; + + DBG("_on_add_record_btn_clickded_cb"); + + int res = DNSSD_ERROR_NONE; + + res = dnssd_create_local_service("_http._tcp", &this->dnssd_local_service); + RETM_IF(res != DNSSD_ERROR_NONE, "dnssd_create_local_service fail > Error = %s", get_dns_sd_error(res)); + + str = format_string("local service created: %u", this->dnssd_local_service); +#ifdef USE_GENLIST + _nsd_dnssd_elm_genlist_item_append(this->list, str,NULL); +#else + elm_list_item_append(this->list, str, NULL, NULL, NULL, NULL); +#endif + SAFE_DELETE(str); + + char* service_name = "NsdDnsChat"; + res = dnssd_service_set_name(this->dnssd_local_service, service_name); + RETM_IF(res != DNSSD_ERROR_NONE, "dnssd_service_set_name fail > Error = %s", get_dns_sd_error(res)); + + str = format_string("%s%s", "service name: ", service_name); +#ifdef USE_GENLIST + _nsd_dnssd_elm_genlist_item_append(this->info_list, str,NULL); +#else + elm_list_item_append(this->info_list, str, NULL, NULL, NULL, NULL); +#endif + SAFE_DELETE(str); + + int port = 12684; + res = dnssd_service_set_port(this->dnssd_local_service, port); + RETM_IF(res != DNSSD_ERROR_NONE, "dnssd_service_set_port fail > Error = %s", get_dns_sd_error(res)); + + str = format_string("%s%d", "port: ", port); +#ifdef USE_GENLIST + _nsd_dnssd_elm_genlist_item_append(this->info_list, str,NULL); +#else + elm_list_item_append(this->info_list, str, NULL, NULL, NULL, NULL); +#endif + SAFE_DELETE(str); + + res = dnssd_register_local_service(this->dnssd_local_service, _dnssd_registered_cb, this); + RETM_IF(res != DNSSD_ERROR_NONE, "dnssd_register_local_service fail > Error = %s", get_dns_sd_error(res)); + + str = format_string("%s", "register local service invoked"); +#ifdef USE_GENLIST + _nsd_dnssd_elm_genlist_item_append(this->info_list, str,NULL); +#else + elm_list_item_append(this->info_list, str, NULL, NULL, NULL, NULL); +#endif + SAFE_DELETE(str); + + this->txt_record_key = "kk"; + unsigned short txt_length = 10; + char* text_value = "Hello"; + res = dnssd_service_add_txt_record(this->dnssd_local_service, this->txt_record_key, txt_length, text_value); + RETM_IF(res != DNSSD_ERROR_NONE, "dnssd_service_add_txt_record fail > Error = %s", get_dns_sd_error(res)); + + void* val; + unsigned short buf_len, type; + dnssd_service_get_all_txt_record(this->dnssd_local_service, &buf_len, &val); + + //DBG("length %d value %s", l, (char*)val); + + type = 16; //16 for TXT type + res = dnssd_service_set_record(this->dnssd_local_service, type, buf_len, val); + RETM_IF(res != DNSSD_ERROR_NONE, "dnssd_service_set_record fail > Error = %s", get_dns_sd_error(res)); + + str = format_string("%s", "Text added successfully"); +#ifdef USE_GENLIST + _nsd_dnssd_elm_genlist_item_append(this->info_list, str,NULL); +#else + elm_list_item_append(this->info_list, str, NULL, NULL, NULL, NULL); +#endif + SAFE_DELETE(str); + str = format_string("%s%s", "key: ",this->txt_record_key); +#ifdef USE_GENLIST + _nsd_dnssd_elm_genlist_item_append(this->list, str,NULL); +#else + elm_list_item_append(this->list, str, NULL, NULL, NULL, NULL); +#endif + SAFE_DELETE(str); + + str = format_string("%s%s", "value: ", text_value); +#ifdef USE_GENLIST + _nsd_dnssd_elm_genlist_item_append(this->list, str,NULL); +#else + elm_list_item_append(this->list, str, NULL, NULL, NULL, NULL); +#endif + SAFE_DELETE(str); + +#ifndef USE_GENLIST + elm_list_go(this->list); + elm_list_go(this->info_list); + evas_object_show(this->list); + evas_object_show(this->info_list); +#endif + +} + +static void _on_browse_btn_clickded_cb(void *data, Evas_Object *obj, void *event_info) +{ + DBG("_on_browse_btn_clickded_cb"); + + RETM_IF(NULL == data, "data is NULL"); + nsd_dnssd_view *this = (nsd_dnssd_view*) data; + + this->is_btn_browse_clicked = true; + + int res; + + res = dnssd_start_browsing_service("_http._tcp", &this->dnssd_remote_service, _dnssd_found_cb, this); + char* str = format_string("Remote service browsing started"); +#ifdef USE_GENLIST + _nsd_dnssd_elm_genlist_item_append(this->info_list, str,NULL); +#else + elm_list_item_append(this->info_list, str, NULL, NULL, NULL, NULL); +#endif + SAFE_DELETE(str); +#ifndef USE_GENLIST + elm_list_go(this->info_list); +#endif +} + + +/** + * @function _app_destroy_cb + * @since_tizen 2.3 + * @description App Destroy Cb + * @parameter void*: Void Pointer + * @return static void + */ +static void _app_destroy_cb(void* this) +{ + RETM_IF(NULL == this, "data is NULL"); + + int res = DNSSD_ERROR_NONE; + + nsd_dnssd_view *view = NULL; + view = (nsd_dnssd_view*)this; + + if(view->is_btn_add_text_clicked == true) + { + res = dnssd_service_remove_txt_record(view->dnssd_local_service, view->txt_record_key); + RETM_IF(res != DNSSD_ERROR_NONE, "dnssd_service_remove_txt_record fail > Error = %s", get_dns_sd_error(res)); + + res = dnssd_deregister_local_service(view->dnssd_local_service); + RETM_IF(res != DNSSD_ERROR_NONE, "dnssd_deregister_local_service fail > Error = %s", get_dns_sd_error(res)); + + res = dnssd_destroy_local_service(view->dnssd_local_service); + RETM_IF(res != DNSSD_ERROR_NONE, "dnssd_destroy_local_service fail > Error = %s", get_dns_sd_error(res)); + + res = dnssd_service_unset_record(view->dnssd_local_service, 16); + } + + if(view->is_btn_browse_clicked == true) + { + res = dnssd_stop_browsing_service(view->dnssd_remote_service); + RETM_IF(res != DNSSD_ERROR_NONE, "dnssd_stop_browsing_service fail > Error = %s", get_dns_sd_error(res)); + } + + res = dnssd_deinitialize(); + RETM_IF(res != DNSSD_ERROR_NONE, "dnssd_deinitialize fail > Error = %s", get_dns_sd_error(res)); + + RETM_IF(NULL == view, "view is NULL"); + + SAFE_DELETE(view->view); + SAFE_DELETE(view); +} + +static char* get_dns_sd_error(dnssd_error_e error) +{ + + char* error_msg; + switch(error) + { + case DNSSD_ERROR_NONE: + error_msg = "DNSSD_ERROR_NONE"; + break; + case DNSSD_ERROR_OUT_OF_MEMORY: + error_msg = "DNSSD_ERROR_OUT_OF_MEMORY"; + break; + case DNSSD_ERROR_INVALID_OPERATION: + error_msg = "DNSSD_ERROR_INVALID_OPERATION"; + break; + case DNSSD_ERROR_INVALID_PARAMETER: + error_msg = "DNSSD_ERROR_INVALID_PARAMETER"; + break; + case DNSSD_ERROR_NOT_SUPPORTED: + error_msg = "DNSSD_ERROR_NOT_SUPPORTED"; + break; + case DNSSD_ERROR_NOT_INITIALIZED: + error_msg = "DNSSD_ERROR_NOT_INITIALIZED"; + break; + case DNSSD_ERROR_ALREADY_REGISTERED: + error_msg = "DNSSD_ERROR_ALREADY_REGISTERED"; + break; + case DNSSD_ERROR_NAME_CONFLICT: + error_msg = "DNSSD_ERROR_NAME_CONFLICT"; + break; + case DNSSD_ERROR_SERVICE_NOT_RUNNING: + error_msg = "DNSSD_ERROR_SERVICE_NOT_RUNNING"; + break; + case DNSSD_ERROR_SERVICE_NOT_FOUND: + error_msg = "DNSSD_ERROR_SERVICE_NOT_FOUND"; + break; + case DNSSD_ERROR_OPERATION_FAILED: + error_msg = "DNSSD_ERROR_OPERATION_FAILED"; + break; + default: + error_msg = "UNSUPPORTED_ERROR"; + break; + } + + return error_msg; +} + +static char** str_split(char* a_str, const char a_delim) +{ + char** result = 0; + size_t count = 0; + char* tmp = a_str; + char* last_comma = 0; + char delim[2]; + delim[0] = a_delim; + delim[1] = 0; + + while (*tmp) + { + + if (a_delim == *tmp) + { + count++; + last_comma = tmp; + } + tmp++; + } + + count += last_comma < (a_str + strlen(a_str) - 1); + count++; + + result = malloc(sizeof(char*) * count); + + if (result) + { + size_t idx = 0; + char* token = strtok(a_str, delim); + + while (token) + { + RETVM_IF(idx >= count, NULL, "idx >= count"); + *(result + idx++) = strdup(token); + token = strtok(0, delim); + } + *(result + idx) = 0; + } + + return result; +} + + +#endif diff --git a/tbtcoreapp/src/view/tbt-nsd-ssdp-view.c b/tbtcoreapp/src/view/tbt-nsd-ssdp-view.c new file mode 100644 index 0000000..5c1cfa7 --- /dev/null +++ b/tbtcoreapp/src/view/tbt-nsd-ssdp-view.c @@ -0,0 +1,369 @@ +/******************************************************************************* + * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + *******************************************************************************/ +/** + * @file tbt-nsd_ssdp-view.h + * @brief checks required nsd_ssdps are available or not + * + * @author A B M Nazibullah(nazib.ullah@samsung.com) + * @date October, 2014 + * @bug NA + * @credit Tizen SDK Version 2.3.0 Sample Example + * + */ + +#include "utils/app_module_config.h" +#ifdef TBT_MODULE_NSD + +#include +#include + +#include "utils/logger.h" +#include "utils/config.h" +#include "utils/ui-utils.h" +#include "view/tbt-nsd-ssdp-view.h" +#include "view/tbt-common-view.h" + +struct _nsd_ssdp_view +{ + common_view* view; + + Evas_Object* list; + Evas_Object* info_list; + + ssdp_service_h ssdp_local_service; + ssdp_service_h ssdp_remote_service; + ssdp_browser_h ssdp_browser; + + Evas_Object* btn_browse_service; + Evas_Object* btn_add_text_record; + + char* txt_record_key; + char* ssdp_target; + char* usn; + char* url; + + bool is_btn_add_text_clicked; + bool is_btn_browse_clicked; +}; + + +static void _app_destroy_cb(void* this); +static char* get_ssdp_error(ssdp_error_e error); +static void ssdp_api(void* data); +static void _ssdp_registered_cb(ssdp_error_e result, ssdp_service_h local_service, void *user_data); +static void _on_browse_btn_clickded_cb(void *data, Evas_Object *obj, void *event_info); +static void _on_add_record_btn_clickded_cb(void *data, Evas_Object *obj, void *event_info); +static void _ssdp_found_cb(ssdp_service_state_e service_state, ssdp_service_h remote_service, void *user_data); + + + +/** + * @function nsd_ssdp_view_add + * @since_tizen 3.0 + * @description nsd_ssdp View Add + * @parameter Evas_Object*: Evas Object Pointer, tbt_info*: Tbt Info Pointer, Elm_Object_Item*: Elm Object Item Pointer + * @return nsd_ssdp_view* + */ +nsd_ssdp_view *nsd_ssdp_view_add(Evas_Object *navi, tbt_info *tbt_info, Elm_Object_Item *item) +{ + RETVM_IF(NULL == navi, NULL, "navi is null"); + + nsd_ssdp_view *this = NULL; + this = calloc(1, sizeof(nsd_ssdp_view)); + RETVM_IF(!this, NULL, "calloc failed"); + this->view = calloc(1, sizeof(common_view)); + RETVM_IF(!this->view, NULL, "calloc failed"); + + tbt_info->layout_group = "nsd_ssdp_viewer"; + tbt_info->layout_file = get_edje_path("nsd_viewer.edj"); + + common_view_add(navi, tbt_info, item, this->view, _app_destroy_cb, this); + + RETVM_IF(NULL == this->view, NULL, "navi is null"); + + this->list = elm_list_add(this->view->layout); + RETVM_IF(!this->list, NULL, "elm_list_add failed"); + evas_object_data_set(this->list, "view_data", this); + elm_object_part_content_set(this->view->layout, "nsd_ssdp_view", this->list); + + this->info_list = elm_list_add(this->view->layout); + RETVM_IF(!this->info_list, NULL, "elm_list_add failed"); + evas_object_data_set(this->info_list, "view_data", this); + elm_object_part_content_set(this->view->layout, "nsd_ssdp_info_view", this->info_list); + + + if(this->view->tbt_info->apptype == TBT_APP_NSD_SSDP_LOCAL) + { + this->btn_browse_service = ui_utils_push_button_add(this, this->view->layout, "Browse Service", _on_browse_btn_clickded_cb); + elm_object_part_content_set(this->view->layout, "nsd_ssdp_btn_view", this->btn_browse_service); + } + else if(this->view->tbt_info->apptype == TBT_APP_NSD_SSDP_REMOTE) + { + this->btn_add_text_record = ui_utils_push_button_add(this, this->view->layout, "Add Service", _on_add_record_btn_clickded_cb); + elm_object_part_content_set(this->view->layout, "nsd_ssdp_btn_view", this->btn_add_text_record); + } + + evas_object_show(this->list); + evas_object_show(this->info_list); + + ssdp_api(this); + + + return this; +} + + +static void ssdp_api(void* data) +{ + DBG("ssdp_api"); + + RETM_IF(NULL == data, "data is NULL"); + nsd_ssdp_view *this = (nsd_ssdp_view*) data; + + int res = SSDP_ERROR_NONE; + + res = ssdp_initialize(); + RETM_IF(res != SSDP_ERROR_NONE, "ssdp_initialize fail > Error = %s", get_ssdp_error(res)); + + char* str = format_string("%s", "ssdp initialized"); + elm_list_item_append(this->info_list, str, NULL, NULL, NULL, NULL); + SAFE_DELETE(str); + +} + + +static void _ssdp_registered_cb(ssdp_error_e result, ssdp_service_h local_service, void *user_data) +{ + DBG("_ssdp_registered_cb"); + + RETM_IF(NULL == user_data, "data is NULL"); + nsd_ssdp_view *this = (nsd_ssdp_view*) user_data; + + char* str = format_string("service registered"); + elm_list_item_append(this->list, str, NULL, NULL, NULL, NULL); + SAFE_DELETE(str); +} + +static void _ssdp_found_cb(ssdp_service_state_e service_state, ssdp_service_h remote_service, void *user_data) +{ + DBG("_ssdp_found_cb"); + RETM_IF(NULL == user_data, "data is NULL"); + nsd_ssdp_view *this = (nsd_ssdp_view*) user_data; + int res = SSDP_ERROR_NONE; + + char* str; + str = format_string("Found remote service"); + elm_list_item_append(this->info_list, str, NULL, NULL, NULL, NULL); + SAFE_DELETE(str); + + if(service_state == SSDP_SERVICE_STATE_AVAILABLE) + { + char* usn; + char* url; + + DBG("remote service %u", remote_service); + str = format_string("remote service %u", remote_service); + elm_list_item_append(this->list, str, NULL, NULL, NULL, NULL); + SAFE_DELETE(str); + + res = ssdp_service_get_usn(remote_service, &usn); + RETM_IF(res != SSDP_ERROR_NONE, "ssdp_service_get_usn fail > Error = %s", get_ssdp_error(res)); + + str = format_string("usn: %s", usn); + elm_list_item_append(this->list, str, NULL, NULL, NULL, NULL); + SAFE_DELETE(str); + + res = ssdp_service_get_url(remote_service, &url); + RETM_IF(res != SSDP_ERROR_NONE, "ssdp_service_get_url fail > Error = %s", get_ssdp_error(res)); + + str = format_string("url: %s", url); + elm_list_item_append(this->list, str, NULL, NULL, NULL, NULL); + SAFE_DELETE(str); + + DBG("usn: %s, url: %s", usn, url); + + } + + elm_list_go(this->list); + elm_list_go(this->info_list); + +} + +static void _on_add_record_btn_clickded_cb(void *data, Evas_Object *obj, void *event_info) +{ + DBG("_on_add_record_btn_clickded_cb"); + + RETM_IF(NULL == data, "data is NULL"); + nsd_ssdp_view *this = (nsd_ssdp_view*) data; + + this->is_btn_add_text_clicked = true; + + int res = SSDP_ERROR_NONE; + char* str; + + char* target; + + this->ssdp_target="upnp:rootdevice"; + res = ssdp_create_local_service(this->ssdp_target, &this->ssdp_local_service); + RETM_IF(res != SSDP_ERROR_NONE, "ssdp_create_local_service fail > Error = %s", get_ssdp_error(res)); + + str = format_string("service created"); + elm_list_item_append(this->info_list, str, NULL, NULL, NULL, NULL); + SAFE_DELETE(str); + + str = format_string("service: %u", this->ssdp_local_service); + elm_list_item_append(this->list, str, NULL, NULL, NULL, NULL); + SAFE_DELETE(str); + + this->usn = "uuid:1234abcd-12ab-12ab-12ab-1234567abc12::upnp:rootdevice"; + res = ssdp_service_set_usn(this->ssdp_local_service, this->usn); + RETM_IF(res != SSDP_ERROR_NONE, "ssdp_service_set_usn fail > Error = %s", get_ssdp_error(res)); + + str = format_string("usn: %s", this->usn); + elm_list_item_append(this->list, str, NULL, NULL, NULL, NULL); + SAFE_DELETE(str); + + this->url = "http://192.168.0.111"; + res = ssdp_service_set_url(this->ssdp_local_service, this->url); + RETM_IF(res != SSDP_ERROR_NONE, "ssdp_service_set_url fail > Error = %s", get_ssdp_error(res)); + + str = format_string("url: %s", this->url); + elm_list_item_append(this->list, str, NULL, NULL, NULL, NULL); + SAFE_DELETE(str); + + res = ssdp_service_get_target(this->ssdp_local_service, &target); + RETM_IF(res != SSDP_ERROR_NONE, "ssdp_service_get_target fail > Error = %s", get_ssdp_error(res)); + + str = format_string("target: %s", target); + elm_list_item_append(this->list, str, NULL, NULL, NULL, NULL); + SAFE_DELETE(str); + + res = ssdp_register_local_service(this->ssdp_local_service, _ssdp_registered_cb, this); + RETM_IF(res != SSDP_ERROR_NONE, "ssdp_register_local_service fail > Error = %s", get_ssdp_error(res)); + + str = format_string("service register called"); + elm_list_item_append(this->list, str, NULL, NULL, NULL, NULL); + SAFE_DELETE(str); + + DBG("_on_add_record_btn_clickded_cb finished"); + + elm_list_go(this->list); + elm_list_go(this->info_list); +} + +static void _on_browse_btn_clickded_cb(void *data, Evas_Object *obj, void *event_info) +{ + DBG("_on_browse_btn_clickded_cb"); + + RETM_IF(NULL == data, "data is NULL"); + nsd_ssdp_view *this = (nsd_ssdp_view*) data; + + char* str; + + this->is_btn_browse_clicked = true; + + int res = SSDP_ERROR_NONE; + + this->ssdp_target="upnp:rootdevice"; + res = ssdp_start_browsing_service(this->ssdp_target, &this->ssdp_browser,_ssdp_found_cb, this); + RETM_IF(res != SSDP_ERROR_NONE, "ssdp_start_browsing_service fail > Error = %s", get_ssdp_error(res)); + + str = format_string("Service browsing started"); + elm_list_item_append(this->info_list, str, NULL, NULL, NULL, NULL); + SAFE_DELETE(str); + + elm_list_go(this->info_list); +} + + + +/** + * @function _app_destroy_cb + * @since_tizen 2.3 + * @description App Destroy Cb + * @parameter void*: Void Pointer + * @return static void + */ +static void _app_destroy_cb(void* this) +{ + RETM_IF(NULL == this, "data is NULL"); + + int res = SSDP_ERROR_NONE; + + nsd_ssdp_view *view = NULL; + view = (nsd_ssdp_view*)this; + RETM_IF(NULL == view, "view is NULL"); + + if(view->is_btn_add_text_clicked == true) + { + res = ssdp_deregister_local_service(view->ssdp_local_service); + RETM_IF(res != SSDP_ERROR_NONE, "ssdp_deregister_local_service fail > Error = %s", get_ssdp_error(res)); + } + + if(view->is_btn_browse_clicked == true) + { + res = ssdp_stop_browsing_service(view->ssdp_browser); + RETM_IF(res != SSDP_ERROR_NONE, "ssdp_stop_browsing_service fail > Error = %s", get_ssdp_error(res)); + } + + res = ssdp_deinitialize(); + RETM_IF(res != SSDP_ERROR_NONE, "ssdp_deinitialize fail > Error = %s", get_ssdp_error(res)); + + SAFE_DELETE(view->view); + SAFE_DELETE(view); +} + +static char* get_ssdp_error(ssdp_error_e error) +{ + + char* error_msg; + switch(error) + { + case SSDP_ERROR_NONE: + error_msg = "SSDP_ERROR_NONE"; + break; + case SSDP_ERROR_OUT_OF_MEMORY: + error_msg = "SSDP_ERROR_OUT_OF_MEMORY"; + break; + case SSDP_ERROR_INVALID_PARAMETER: + error_msg = "SSDP_ERROR_INVALID_PARAMETER"; + break; + case SSDP_ERROR_NOT_SUPPORTED: + error_msg = "SSDP_ERROR_NOT_SUPPORTED"; + break; + case SSDP_ERROR_NOT_INITIALIZED: + error_msg = "SSDP_ERROR_NOT_INITIALIZED"; + break; + + case SSDP_ERROR_OPERATION_FAILED: + error_msg = "SSDP_ERROR_OPERATION_FAILED"; + break; + case SSDP_ERROR_SERVICE_NOT_FOUND: + error_msg = "SSDP_ERROR_SERVICE_NOT_FOUND"; + break; + case SSDP_ERROR_SERVICE_ALREADY_REGISTERED: + error_msg = "SSDP_ERROR_SERVICE_ALREADY_REGISTERED"; + break; + default: + error_msg = "UNSUPPORTED_ERROR"; + break; + } + + return error_msg; +} + + +#endif