rnpgp / rnp

RNP: high performance C++ OpenPGP library used by Mozilla Thunderbird
https://www.rnpgp.org
Other
194 stars 55 forks source link

No installed header containing RNP_SUCCESS #897

Closed kaie closed 4 years ago

kaie commented 5 years ago

Using "make install", only the rnp.h header is installed.

That header mentions (in comments) the symbol RNP_SUCCESS, so you're encouraging applications to use that.

However, the exported header doesn't define it.

Is that intentional? Do you consider rnp_def.h a public head, and if yes, should it be installed by the "make install" target, too?

dewyatt commented 5 years ago

rnp.h should be the only header installed currently.

I'm thinking maybe we should:

  1. Standardize on using RNP_SUCCESS in the docs. Currently some functions use 0 on success and others use RNP_SUCCESS. API clients probably want more information than "success or failure", so we probably need to be exposing our error codes.
  2. Extract the error codes enum from rnp_def.h into a new error.h or similar and install that additional header.
joke325 commented 4 years ago

@dewyatt Could you please review the PR #968. There is a codecov check failure.