1. Gran Torino syndrom
In the video, the mirror reminds me my next meeting. This smart behavior is done connecting our software to google calendar thru API.
Frankly, I don’t understand why Google didn’t make C++ API to connect to Google Calendar. I’m feeling like Clint Eastwood in Gran Torino, with my old good gcc compiler, alone and abandoned by all.
2. Using Libgcal
Hopefully, there is Ligcal, a C library to handle google calendar and contacts. I don’t know if it’s officially supported.
sudo apt-get update
sudo apt-get install libgcal0
sudo apt-get install libgcal-dev
3. Testing Libgcal
This small source code (download here) connects to google calendar (thru login/pwd given as arguments or harcoded), gets all yours events/meetings and selects the next one.
gcc -lgcal testcal.cpp -o cal
Frankly, it doesn’t work each time. Curiously, this code works randomly. It get connected but sometimes, it doesn’t return list of events :-(. If you find why, please let me know.
Once tested, copy this exemple to your mirror source code, create a dedicated function and call it from the speakTo function.
At this stage, you should be able to have a smart mirror which reminds you your next meeting. Create a new event “do a backup” and let your mirror do its job…
GilDev said:
Wow, c’est super intéressent, je m’y attellerai bientôt. =)
J’ai 15 ans et c’est assez amusant de voir que ce tutoriel a été écrit par vous, alors que j’ai beaucoup joué avec vos applications pour Palm lorsque j’étais plus jeune (et je les ai réutilisées il y a quelques jours en ressortant mes vieux Palm).
Bonne continuation ! =D
nhu nguyen said:
Hi,
when I run the test code for libgcal, it showed up the error that can not find file “inc/gcalendar.h”. Can you show me how to fix it. Thank you very much.