diff -r 000000000000 -r 509e4801c378 srcanamdw/appdep/src/appdep_analysis.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/srcanamdw/appdep/src/appdep_analysis.cpp Sat Jan 09 10:04:12 2010 +0530 @@ -0,0 +1,277 @@ +/* +* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Functionality of analysis +* +*/ + + +#include "appdep.hpp" + + +// ---------------------------------------------------------------------------------------------------------- + +void DisplayProperties(const string& binary_name) +{ + bool match_found = false; + + for (unsigned int i=0; i<_all_binary_infos.size(); i++) + { + if (StringICmp(_all_binary_infos.at(i).filename.c_str(), binary_name.c_str()) == 0) + { + binary_info b_info = _all_binary_infos.at(i); + + PrintOutputLn("Directory: " + b_info.directory); + PrintOutputLn("Filename: " + b_info.filename); + PrintOutputLn("Binary format: " + b_info.binary_format); + PrintOutputLn("UID1: " + b_info.uid1); + PrintOutputLn("UID2: " + b_info.uid2); + PrintOutputLn("UID3: " + b_info.uid3); + + if (b_info.secureid.length() > 2 && b_info.secureid.at(0)=='0' && b_info.secureid.at(1)=='x') + { + PrintOutputLn("Secure ID: " + b_info.secureid); + PrintOutputLn("Vendor ID: " + b_info.vendorid); + + vector symbian_caps; + symbian_caps.push_back("TCB"); + symbian_caps.push_back("CommDD"); + symbian_caps.push_back("PowerMgmt"); + symbian_caps.push_back("MultimediaDD"); + symbian_caps.push_back("ReadDeviceData"); + symbian_caps.push_back("WriteDeviceData"); + symbian_caps.push_back("DRM"); + symbian_caps.push_back("TrustedUI"); + symbian_caps.push_back("ProtServ"); + symbian_caps.push_back("DiskAdmin"); + symbian_caps.push_back("NetworkControl"); + symbian_caps.push_back("AllFiles"); + symbian_caps.push_back("SwEvent"); + symbian_caps.push_back("NetworkServices"); + symbian_caps.push_back("LocalServices"); + symbian_caps.push_back("ReadUserData"); + symbian_caps.push_back("WriteUserData"); + symbian_caps.push_back("Location"); + symbian_caps.push_back("SurroundingsDD"); + symbian_caps.push_back("UserEnvironment"); + + PrintOutputLn("Capabilities:"); + for (unsigned int x=0; x deps = _all_binary_infos.at(i).dependencies; + + for (unsigned int j=0; j deps = _all_binary_infos.at(i).dependencies; + + for (unsigned int j=0; j deps = _all_binary_infos.at(i).dependencies; + + for (unsigned int j=0; j imps = deps.at(j).imports; + + for (unsigned int k=0; k deps = _all_binary_infos.at(i).dependencies; + + for (unsigned int j=0; j imps = deps.at(j).imports; + + for (unsigned int k=0; k 27500) + { + cerr << "Uses function: Given ordinal number is invalid: " << ordinal_number << endl; + exit(EXIT_INVALID_ORDINAL); + } + + PrintOutputLn(function_name + " - is used by:"); + + for (unsigned int i=0; i<_all_binary_infos.size(); i++) + { + string component_name = _all_binary_infos.at(i).filename; + + vector deps = _all_binary_infos.at(i).dependencies; + + for (unsigned int j=0; j imps = deps.at(j).imports; + + for (unsigned int k=0; k