tools/runonphone/trk/launcher.h
branchRCL_3
changeset 5 d3bac044e0f0
parent 4 3b1da2848fc7
equal deleted inserted replaced
4:3b1da2848fc7 5:d3bac044e0f0
    93     void setTrkServerName(const QString &name);
    93     void setTrkServerName(const QString &name);
    94     QString trkServerName() const;
    94     QString trkServerName() const;
    95     void setFileName(const QString &name);
    95     void setFileName(const QString &name);
    96     void setCopyFileName(const QString &srcName, const QString &dstName);
    96     void setCopyFileName(const QString &srcName, const QString &dstName);
    97     void setInstallFileName(const QString &name);
    97     void setInstallFileName(const QString &name);
    98     void setCommandLineArgs(const QString &args);
    98     void setCommandLineArgs(const QStringList &args);
    99     bool startServer(QString *errorMessage);
    99     bool startServer(QString *errorMessage);
   100     void setVerbose(int v);    
   100     void setVerbose(int v);    
   101     void setSerialFrame(bool b);
   101     void setSerialFrame(bool b);
   102     bool serialFrame() const;
   102     bool serialFrame() const;
   103     // Close device or leave it open
   103     // Close device or leave it open
   106 
   106 
   107     TrkDevicePtr trkDevice() const;
   107     TrkDevicePtr trkDevice() const;
   108 
   108 
   109     // becomes valid after successful execution of ActionPingOnly
   109     // becomes valid after successful execution of ActionPingOnly
   110     QString deviceDescription(unsigned verbose = 0u) const;
   110     QString deviceDescription(unsigned verbose = 0u) const;
       
   111 
       
   112     static QByteArray startProcessMessage(const QString &executable,
       
   113                                           const QStringList &arguments);
       
   114     // Parse a TrkNotifyStopped message
       
   115     static bool parseNotifyStopped(const QByteArray &a,
       
   116                                    uint *pid, uint *tid, uint *address,
       
   117                                    QString *why = 0);
       
   118     // Helper message
       
   119     static QString msgStopped(uint pid, uint tid, uint address, const QString &why);
   111 
   120 
   112 signals:
   121 signals:
   113     void copyingStarted();
   122     void copyingStarted();
   114     void canNotConnect(const QString &errorMessage);
   123     void canNotConnect(const QString &errorMessage);
   115     void canNotCreateFile(const QString &filename, const QString &errorMessage);
   124     void canNotCreateFile(const QString &filename, const QString &errorMessage);
   123     void canNotRun(const QString &errorMessage);
   132     void canNotRun(const QString &errorMessage);
   124     void finished();
   133     void finished();
   125     void applicationOutputReceived(const QString &output);
   134     void applicationOutputReceived(const QString &output);
   126     void copyProgress(int percent);
   135     void copyProgress(int percent);
   127     void stateChanged(int);
   136     void stateChanged(int);
   128     void stopped(uint pc, uint pid, uint tid, const QString& reason);
   137     void processStopped(uint pc, uint pid, uint tid, const QString& reason);
   129 
   138 
   130 public slots:
   139 public slots:
   131     void terminate();
   140     void terminate();
   132     void resume(uint pid, uint tid);
   141     void resumeProcess(uint pid, uint tid);
   133 
   142 
   134 private slots:
   143 private slots:
   135     void handleResult(const trk::TrkResult &data);
   144     void handleResult(const trk::TrkResult &data);
   136     void slotWaitingForTrk();
   145     void slotWaitingForTrk();
   137 
   146