View Full Version : Accessing system info on Maemo Nokia N900 device in Qt application
freely
2nd April 2011, 13:43
Hello,
Is it possible to get IMEI number of Maemo Nokia N900 device in Qt wrriten application?
I made search via google, yahoo, bing for get imei data in Maemo N900 in Qt application
but I did not found any suggestions what to code ( what libraries to use ) to get system info for Maemo N900
for Symbian devices there is GetIMEI project
Can somebody help how to get IMEI number running on Maemo N900 in Qt project ( what libraries to use )?
Thanks a lot,
Pavel
wysota
2nd April 2011, 13:58
http://talk.maemo.org/showpost.php?p=371496&postcount=45
In other words it's available using DBus.
freely
2nd April 2011, 14:40
Should I simply Qt+= dbus in .pro file
and use next libraries:
#include <stdlib.h>
#include <glib.h>
#include <glib/gprintf.h>
#include <dbus/dbus-glib.h>
should I inculde something in .pro file also or is it enought to include the headers in code ( .h files )?
thanks
wysota
2nd April 2011, 14:45
You just need Qt's dbus functionality.
freely
2nd April 2011, 15:27
ups!
it is not so easy:
from one side according to http://talk.maemo.org/showpost.php?p=371496&postcount=45
you shouldn't use any Qt wrrapers ( libraries )
but when using Qt:
http://wiki.forum.nokia.com/index.php/Qt_application_for_Maemo_with_DBus_support
http://doc.qt.nokia.com/4.6/qtdbus.html#details
http://doc.qt.nokia.com/4.6/intro-to-dbus.html
http://www.freedesktop.org/wiki/IntroductionToDBus#head-900e59c577277516e6d8d8a3afbb30beff4794bd
you should modify ( for Maemo ) .desctop file ; add service description ; add QtDbus module to CONFIG in .pro file ; #include <QtDBus> ; register the service;
use QDbusConnection class;
it is different modules in your link and in Qt !
look Witold:
Should be used when in Qt application for Maemo:
1) QDbusConnection class as DBusGConnection from your example ?
2) What to use for this in Qt:
g_type_init();
connection = dbus_g_bus_get(DBUS_BUS_SYSTEM, &error);
if (!connection)
3) What Qt Dbus class to use as proxy ?
4) There is any code at www getting IMEI using Qt Dbus classes only in C , right?
Pavel
Added after 24 minutes:
one moment...
I must not use Qt Dbus binding for dbus comunication on Maemo, right?
I can use only appropriated C libraries function as in the example in my code version for Maemo, right?
freely
2nd April 2011, 18:50
could it be done using QtMobility QSystemDeviceInfo ?
wysota
2nd April 2011, 22:10
Why can't you use QtDbus?
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.