SxeProgramInfo Class Reference
|
install root on dev host | run root on device |
---|---|
$HOME/build/qtopia42/image | /opt/Qtopia.rom |
The runRoot must be one of the elements which will be returned by the Qtopia::installPaths() method at runtime.
The installRoot is optional and will be empty in the case of a binary installed at run-time by the package manager.
Construct a new SxeProgramInfo
Destroy this SxeProgramInfo object
Return the QString of the absolute path to the binary for this SxeProgramInfo object.
This is simply the concatenation of installRoot, relPath and fileName. If the installRoot is null, the runRoot is used instead.
isValid() can be called to check that the returned path will point to a valid binary.
Return true if the SxeProgramInfo object represents a valid binary for SXE registration, and otherwise return false.
The binary is valid if all of the components of absolutePath() above are non-empty, and the resulting path is to a file which exists
Try to find this binary in the current file-system. First a check is made to see if isValid() returns true: if so this method simply returns true.
Otherwise an attempt to find the binary is made by traversing the entries in Qtopia::installPaths().
The fileName member should be set to non-empty before calling this method otherwise it simply returns false.
If the relPath member is set, then only that path is checked under each of the installPaths().
If the relPath member is empty, then the path searched is decided by checking if the filename refers to a shared library or not: if the fileName starts with "lib" and ends with ".so" then "application/plugins" are checked, otherwise only "bin" is checked.
If the binary is found, the relPath and runRoot entries are set to the the location, and the method returns true.
If the binary is not found, no entries are altered and the method returns false.
For example:
SxeProgramInfo calcBin; calcBin.fileName = "calculator"; if ( calcBin.locateBinary() ) qDebug() << "Calculator is a standalone app at" << calcBin.absolutePath(); else { calcBin.fileName = "libcalculator.so"; if ( calcBin.locateBinary() ) qDebug() << "Calculator is a quicklaunched app at" << calcBin.absolutePath(); else qDebug() << "Calculator is not available"; }
Make the current process assume the SXE identity of the executable represented by this SxeProgramInfo.
Internally this is done by writing to the /proc/lids/suid pseudo file.
This method only succeeds on a suitably patched SXE linux kernel.
security domains, a list of comma seperated values
the binaries file name, eg calculator, bomber
SXE program identity
for example $HOME/build/qtopia/42-phone/image this should only ever be set when running under sxe_installer
SXE shared secret key
for example bin, packages/bin, plugings/application
for example /opt/Qtopia.rom, /opt/Qtopia.user
Ensure the SXE key for this executable is valid, and then call the transport authorizer method to set it.
After this call all QWS calls by app will be authorized with this key.
A check is made that the binary has been keyed, and if not then the method will qFatal, with the message "SXE key has not been set".
(This function is stubbed out with an empty implementation if Qt Extended is configured without SXE.)
This is an overloaded member function, provided for convenience.
Sends the SxeProgramInfo progInfo to the debug stream.
This macro causes the key storage to be allocated and initialized. An application without this macro cannot be used on a SXE-enabled system. It is needed if you are not using the QTOPIA_MAIN macro.
QSXE_APP_KEY int main( int argc, char **argv ) { QSXE_SET_APP_KEY(argv[0]); ...
See also Applications and QTOPIA_APP_KEY.
This macro causes the key storage to be allocated and initialized. An application without this macro cannot be used on a SXE-enabled system. It is needed if you are not using the QTOPIA_MAIN macro.
Note that this macro only applies to quicklaunch plugins.
See also Applications and QTOPIA_APP_KEY.
This macro causes the SXE key to be copied into memory. It is needed if you are not using the QTOPIA_MAIN macro. It must be the first line of your main() function. The name value should be set to the binary's name.
QSXE_APP_KEY int main( int argc, char **argv ) { QSXE_SET_APP_KEY(argv[0]); ...
See also Applications and QTOPIA_SET_KEY().
This macro causes the SXE key to be copied into memory. It is needed if you are not using the QTOPIA_MAIN macro. It must be called before constructing QtopiaApplication. The name value should be set to the binary's name.
Note that this macro only applies to quicklaunch plugins.
See also Applications and QTOPIA_SET_KEY().
Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. | Qt qtextended4.4 | |
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD. | ||
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP ! |
Copyright © 2000-2012 - www.developpez.com