Hello,
Firstly, in the code you pasted, I believe you are expected to write those callback functions. Secondly, you're posting links to two different computer languages: Python and C/C++. I think that may be part of your confusion.
I'd recommend you stick with Python unless you're familiar with C. There is a link on the pythonhosted page to my security camera project. (Just search for my name.) You can look at it to see how I've further developed some of the callbacks to handle more functionality. If you compare my project to the example posted on the pythonhosted site, I think it may help you.
(Finally, don't worry about your English--you did better than many people I know in the middle of the USA! :) Seriously!)
Hope this does help,
Leland...