No function.
You can build Mozilla from source code, and whenever the url changes update it into a txt file. Then you can create a program that checks that txt file in real time if it changes.
What is this for? If you're creating a plugin then there's a whole library for interfacing with the browser that you can use, but if you're creating a completely separate application then interfacing with the browser will be trickier and rather hackish.
@ OP: The user history will be in "%AppData%\mozilla\Firefox\Profiles\*.default\places.sqlite" . If you couldn't tell, this is an SQLite document so check this out: http://www.sqlite.org/index.html . That to me would be the most direct route to accomplish what you are describing in C++. Don't get me wrong XPCOM and XPIDL look interesting, and they are on my list of things to bang my head on a wall over, but IPC really isn't a beginner topic. XPCOM: https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XPCOM/Language_Bindings
. Other then that, development for Mozilla projects tend to favor JavaScripts.