1
0

MultimediaService.h 4.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. #ifndef MULTIMEDIASERVICE_H
  2. #define MULTIMEDIASERVICE_H
  3. #include "MultimediaServiceProxy.h"
  4. #include "MultimediaPersistent.h"
  5. #include <QObject>
  6. #include <QScopedPointer>
  7. #define MultimediaApplication QString("-multimedia")
  8. #define ArkMicroMultimediaService QString("com.arkmicro.multimedia")
  9. #define ArkMicroMultimediaPath QString("/com/arkmicro/multimedia")
  10. #define ArkMicroMultimediaInterface QString("Local.DbusServer.Multimedia")
  11. class MultimediaServicePrivate;
  12. class MultimediaService : public QObject
  13. {
  14. Q_OBJECT
  15. Q_DISABLE_COPY(MultimediaService)
  16. Q_CLASSINFO("D-Bus Interface", "Local.DbusServer.Multimedia")
  17. #ifdef g_MultimediaService
  18. #undef g_MultimediaService
  19. #endif
  20. #define g_MultimediaService (MultimediaService::instance())
  21. public:
  22. explicit MultimediaService(QObject* parent = NULL);
  23. ~MultimediaService();
  24. public slots:
  25. void synchronize();
  26. void reset();
  27. void musicPlayerRequestFileNames();
  28. void deviceWatcherCheckStatus(const int type);
  29. void musicPlayerSetPlayModeToggle();
  30. void musicPlayerSetPlayMode(const int mode);
  31. void musicPlayerSetPlayStatusToggle();
  32. void musicPlayerSetPlayStatus(const int status);
  33. void musicPlayerPlayListViewIndex(const int type, const int index, const int millesimal);
  34. void musicPlayerPlayPreviousListViewIndex();
  35. void musicPlayerPlayNextListViewIndex();
  36. void musicPlayerSeekToMillesimal(const int millesimal);
  37. void musicPlayerExit();
  38. void imagePlayerRequestFileNames(const int type);
  39. void imagePlayerPlayListViewIndex(const int type, const int index);
  40. void imagePlayerPlayPreviousListViewIndex();
  41. void imagePlayerPlayNextListViewIndex();
  42. void imagePlayerRotateImage();
  43. void imagePlayerZoomInImage();
  44. void imagePlayerZoomOutImage();
  45. void videoPlayerRequestFileNames(const int type);
  46. void videoPlayerSetPlayModeToggle();
  47. void videoPlayerSetPlayStatusToggle();
  48. void videoPlayerSetPlayStatus(const int status);
  49. void videoPlayerPlayListViewIndex(const int type, const int index, const int x, const int y, const int width, const int height, const int millesimal);
  50. void videoPlayerPlayPreviousListViewIndex();
  51. void videoPlayerPlayNextListViewIndex();
  52. void videoPlayerSeekToMillesimal(const int millesimal);
  53. void videoPlayerExit();
  54. void videoPlayerVisible(const bool flag);
  55. void videoPlayerSetGeometry(int x,int y,int width,int height);
  56. signals:
  57. void onDeviceWatcherStatus(const int type, const int status);
  58. void onMusicPlayerPlayMode(const int mode);
  59. void onMusicPlayerPlayStatus(const int type, const int status);
  60. void onMusicPlayerElapsedInformation(const int elapsedTime,
  61. const int elapsedMillesimal);
  62. void onMusicPlayerID3TagChange(const int type,
  63. const int index,
  64. const QString &fileName,
  65. const QString& title,
  66. const QString& artist,
  67. const QString& album,
  68. const int endTime);
  69. // void onMusicPlayerFilePath(const int type, const QString& path);
  70. void onMusicPlayerFileNames(const int type, const QString &xml);
  71. void onImagePlayerFileNames(const int type, const QString &xml);
  72. void onImagePlayerChange(const int type, const QString &filePath, const int index, const int percent, const int rotate);
  73. void onVideoPlayerPlayMode(const int mode);
  74. void onVideoPlayerShowStatus(const int status);
  75. void onVideoPlayerPlayStatus(const int type, const int status);
  76. void onVideoPlayerFileNames(const int type, const QString& xml);
  77. void onVideoPlayerInformation(const int type, const int index, const QString &fileName, const int endTime);
  78. void onVideoPlayerElapsedInformation(const int elapsedTime, const int elapsedMillesimal);
  79. void onVideoPlayerVisible(const bool flag);
  80. void onSliderTouchEnable(const bool flag); // dll add 20190805
  81. void onMusicPlayerFileArtist(const int type,QStringList artistList);
  82. void onMusicPlayerExit();
  83. void onVideoPlayerExit();
  84. private:
  85. friend class MultimediaServicePrivate;
  86. QScopedPointer<MultimediaServicePrivate> m_Private;
  87. };
  88. #endif // MULTIMEDIASERVICE_H