tizenmanager.h 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. /**************************************************************************
  2. **
  3. ** Copyright (c) 2014 Tomasz Olszak <olszak.tomasz@gmail.com>
  4. ** Contact: http://www.qt-project.org/legal
  5. **
  6. ** This file is part of Qt Creator.
  7. **
  8. ** Commercial License Usage
  9. ** Licensees holding valid commercial Qt licenses may use this file in
  10. ** accordance with the commercial license agreement provided with the
  11. ** Software or, alternatively, in accordance with the terms contained in
  12. ** a written agreement between you and Digia. For licensing terms and
  13. ** conditions see http://qt.digia.com/licensing. For further information
  14. ** use the contact form at http://qt.digia.com/contact-us.
  15. **
  16. ** GNU Lesser General Public License Usage
  17. ** Alternatively, this file may be used under the terms of the GNU Lesser
  18. ** General Public License version 2.1 as published by the Free Software
  19. ** Foundation and appearing in the file LICENSE.LGPL included in the
  20. ** packaging of this file. Please review the following information to
  21. ** ensure the GNU Lesser General Public License version 2.1 requirements
  22. ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
  23. **
  24. ** In addition, as a special exception, Digia gives you certain additional
  25. ** rights. These rights are described in the Digia Qt LGPL Exception
  26. ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
  27. **
  28. ****************************************************************************/
  29. #ifndef TIZENMANAGER_H
  30. #define TIZENMANAGER_H
  31. #include <utils/fileutils.h>
  32. #include <QDomDocument>
  33. #include <QObject>
  34. #include <QStringList>
  35. namespace ProjectExplorer { class Target; }
  36. namespace Tizen {
  37. namespace Internal {
  38. class TizenManager : public QObject
  39. {
  40. Q_OBJECT
  41. public:
  42. // enum BuildType
  43. // {
  44. // DebugBuild,
  45. // ReleaseBuildUnsigned,
  46. // ReleaseBuildSigned
  47. // };
  48. static bool supportsTizen(ProjectExplorer::Target *target);
  49. static QString packageName(ProjectExplorer::Target *target);
  50. // static bool setPackageName(ProjectExplorer::Target *target, const QString &name);
  51. static QString applicationName(ProjectExplorer::Target *target);
  52. // static bool setApplicationName(ProjectExplorer::Target *target, const QString &name);
  53. static QString packageId(ProjectExplorer::Target *target);
  54. static QString packageVersionString(ProjectExplorer::Target *target);
  55. // static QString intentName(ProjectExplorer::Target *target);
  56. // static QString activityName(ProjectExplorer::Target *target);
  57. // static QStringList availableTargetApplications(ProjectExplorer::Target *target);
  58. // static QString targetApplication(ProjectExplorer::Target *target);
  59. // static bool setTargetApplication(ProjectExplorer::Target *target, const QString &name);
  60. // static QString targetApplicationPath(ProjectExplorer::Target *target);
  61. // static bool updateDeploymentSettings(ProjectExplorer::Target *target);
  62. // static bool bundleQt(ProjectExplorer::Target *target);
  63. // static QString targetSDK(ProjectExplorer::Target *target);
  64. // static bool setTargetSDK(ProjectExplorer::Target *target, const QString &sdk);
  65. static QString targetArch(ProjectExplorer::Target *target);
  66. // static Utils::FileName dirPath(ProjectExplorer::Target *target);
  67. static Utils::FileName manifestPath(ProjectExplorer::Target *target);
  68. static Utils::FileName commandLineBuildPath(ProjectExplorer::Target *target);
  69. // static Utils::FileName libsPath(ProjectExplorer::Target *target);
  70. // static Utils::FileName stringsPath(ProjectExplorer::Target *target);
  71. // static Utils::FileName defaultPropertiesPath(ProjectExplorer::Target *target);
  72. // static Utils::FileName srcPath(ProjectExplorer::Target *target);
  73. // static Utils::FileName apkPath(ProjectExplorer::Target *target, BuildType buildType);
  74. // static bool createTizenTemplatesIfNecessary(ProjectExplorer::Target *target);
  75. // static void updateTarget(ProjectExplorer::Target *target, const QString &targetSDK,
  76. // const QString &name = QString());
  77. // static Utils::FileName localLibsRulesFilePath(ProjectExplorer::Target *target);
  78. // static QString loadLocalLibs(ProjectExplorer::Target *target, int apiLevel = -1);
  79. // static QString loadLocalJars(ProjectExplorer::Target *target, int apiLevel = -1);
  80. // static QString loadLocalBundledFiles(ProjectExplorer::Target *target, int apiLevel = -1);
  81. // static QString loadLocalJarsInitClasses(ProjectExplorer::Target *target, int apiLevel = -1);
  82. // class Library
  83. // {
  84. // public:
  85. // Library()
  86. // { level = -1; }
  87. // int level;
  88. // QStringList dependencies;
  89. // QString name;
  90. // };
  91. // typedef QMap<QString, Library> LibrariesMap;
  92. // static QVector<TizenManager::Library> availableQtLibsWithDependencies(ProjectExplorer::Target *target);
  93. // static QStringList availableQtLibs(ProjectExplorer::Target *target);
  94. // static QStringList qtLibs(ProjectExplorer::Target *target);
  95. // static bool setQtLibs(ProjectExplorer::Target *target, const QStringList &libs);
  96. // static bool setBundledInLib(ProjectExplorer::Target *target,
  97. // const QStringList &fileList);
  98. // static bool setBundledInAssets(ProjectExplorer::Target *target,
  99. // const QStringList &fileList);
  100. // static QStringList availablePrebundledLibs(ProjectExplorer::Target *target);
  101. // static QStringList prebundledLibs(ProjectExplorer::Target *target);
  102. // static bool setPrebundledLibs(ProjectExplorer::Target *target, const QStringList &libs);
  103. // static QString libGnuStl(const QString &arch, const QString &ndkToolChainVersion);
  104. // static QString libraryPrefix();
  105. private:
  106. static void raiseError(const QString &reason);
  107. static bool openXmlFile(QDomDocument &doc, const Utils::FileName &fileName);
  108. static bool saveXmlFile(ProjectExplorer::Target *target, QDomDocument &doc, const Utils::FileName &fileName);
  109. static bool openManifest(ProjectExplorer::Target *target, QDomDocument &doc);
  110. static bool saveManifest(ProjectExplorer::Target *target, QDomDocument &doc);
  111. // static bool openLibsXml(ProjectExplorer::Target *target, QDomDocument &doc);
  112. // static bool saveLibsXml(ProjectExplorer::Target *target, QDomDocument &doc);
  113. // static QStringList libsXml(ProjectExplorer::Target *target, const QString &tag);
  114. // static bool setLibsXml(ProjectExplorer::Target *target, const QStringList &libs, const QString &tag);
  115. // enum ItemType
  116. // {
  117. // Lib,
  118. // Jar,
  119. // BundledFile,
  120. // BundledJar
  121. // };
  122. // static QString loadLocal(ProjectExplorer::Target *target, int apiLevel, ItemType item, const QString &attribute=QLatin1String("file"));
  123. // static QStringList dependencies(const Utils::FileName &readelfPath, const QString &lib);
  124. // static int setLibraryLevel(const QString &library, LibrariesMap &mapLibs);
  125. // static bool qtLibrariesLessThan(const Library &a, const Library &b);
  126. };
  127. } // namespace Internal
  128. } // namespace Tizen
  129. #endif // TIZENMANAGER_H