Mozilla Relay is experiencing issues with call and text delivery. We’re working on a fix. Check Mozilla Status for updates.

Funkcionalnosć tutoho sydła so přez wothladowanske dźěła wobmjezuje, kotrež maja waše dožiwjenje polěpšić. Jeli nastawk waš problem njerozrisuje a chceće prašenje stajić, wobroćće so na naše zhromodźenstwo pomocy, kotrež na to čaka, wam na @FirefoxSupport na Twitter a /r/firefox na Reddit pomhać.

Pomoc přepytać

Hladajće so wobšudstwa pomocy. Njenamołwimy was ženje, telefonowe čisło zawołać, SMS pósłać abo wosobinske informacije přeradźić. Prošu zdźělće podhladnu aktiwitu z pomocu nastajenja „Znjewužiwanje zdźělić“.

Dalše informacije

Accessing the address book programmatically?

  • 7 wotmołwy
  • 0 ma tutón problem
  • Poslednja wotmołwa wot James

more options

Hi,

I would like to integrate the user's address book (or more specifically the contact details of the current user) into my own (c++) desktop (Windows/MacOS/Linux) application for the user's convenience.

Is this possible at all? If so, where can I start reading to find out how to do this?

(If it's not possible through an API, is the address book file format documented somewhere, so I can read it directly?)

I don't need write access. I just need to be able to read the user's contacts.

Cheers, James

Hi, I would like to integrate the user's address book (or more specifically the contact details of the current user) into my own (c++) desktop (Windows/MacOS/Linux) application for the user's convenience. Is this possible at all? If so, where can I start reading to find out how to do this? (If it's not possible through an API, is the address book file format documented somewhere, so I can read it directly?) I don't need write access. I just need to be able to read the user's contacts. Cheers, James

Wubrane rozrisanje

The file is abook.sqlite and is in the profile. You can locate profile by this: - click help>troubleshootinginformation - scroll down to 'profile folder' an click 'open folder'

Tutu wotmołwu w konteksće čitać 👍 0

Wšě wotmołwy (7)

more options

"(or more specifically the contact details of the current user)"

Sorry, that didn't make much sense. I meant the contact details of the current user's contacts as well as the email address(es) of the current user.

Wužitny?

more options

It is as SQL database, so I would expect there are ways to do that. Here is an example: https://www.sqlite.org/quickstart.html

Wužitny?

more options

Oh, if that's the case then that will be easy enough. Thanks.

Is the DB schema documented at all? And how do I locate it on disk?

Cheers, James

Wužitny?

more options

Wubrane rozrisanje

The file is abook.sqlite and is in the profile. You can locate profile by this: - click help>troubleshootinginformation - scroll down to 'profile folder' an click 'open folder'

Wužitny?

more options

Ok, I have something working for me.

Is there anyway to determine the address book location for the currently logged in user without the UI? I.e., is it always in known, specific locations on Windows, Linux, and MacOS?

For example, will the location on Windows always be: <RoamingAppData>\Thunderbird\Profiles\<ProfileIdent>\abook.sqlite?

Are there similar fixed locations on the other platforms?

Cheers, James

Wužitny?

more options

This is not really the platform for detailed programing information. You might do better using the relevant topicbox lists.

https://thunderbird.topicbox.com/latest Or consulting the developer documentation. https://developer.thunderbird.net/

Things to note The Windows store version of Thunderbird is in some Microsoft defined sandbox. The profile will not be anywhere you might assume is about all I can say. Last I heard Thunderbird could not find it using the button in troubleshooting. But then apparently neither can Firefox and I would expect it to get a fix for that first. (bigger programing team)

Recent adoption of snap packages in Ubuntu and subordinate distributions again introduces a sandbox and some weird restrictions. Apparently if the profile existed before the snap was installed the location is different from if it was created post the switch to SNAP. All in all I have avoided even trying to understand this recent fetish with sandboxing of application that essentially need access to the entire file system and most of the operating system for notifications.

Wužitny?

more options

Ah, ok.

That's fair enough. I did actually skim through the documentation before asking here, but I couldn't find what I was looking for. (And most of what I did read seemed woefully out of date and full of dead links.)

I have what I need for now though, so I guess I can just read more later if and when I need to.

Cheers, James

Wužitny?

Stajće prašenje

Dyrbiće so pola swojeho konta přizjewić, zo byšće na přinoški wotmołwił. Prošu stajće nowe prašenje, jeli hišće wužiwarske konto nimaće.