Qt4 Google Authentication
May 1, 2009 Matteo Bertozzi | Filed Under Qt4 | 1 CommentToday, I’m looking at Google services, Contacts, Maps, Search… to use all this service in your app you need to get The Authentication Token (see the Google Auth For Installed Apps page). So, I’ve implemented a simple class to do this.
QEventLoop q;
THGoogleAuth gAuth("MYNAME@gmail.com");
QObject::connect(&gAuth, SIGNAL(authenticated()), &q, SLOT(quit()));
gAuth.login(THGoogleAuth::Contacts, "MYPASSWORD");
q.exec();
if (gAuth.error() == THGoogleAuth::NoError) {
qDebug() << "SID" << gAuth.sid();
qDebug() << "LSID" << gAuth.lsid();
qDebug() << "AUTH" << gAuth.auth();
} else {
qDebug() << gAuth.errorString();
}
The Source Code is Available Here: Qt4 Google Auth Source Code.
[...] month I’ve made a simple wrapper for Google Authentication, Today I’ve written other 4 classes to wrap the Google’s Translator, Language Detector, [...]
Pingback by Qt4 Google Services: Translator, Spell Checker and more… | Th30z - Coding on the Fly — June 6, 2009 #