src/pEpEngine.h
branchENGINE-109
changeset 1293 4f598c491fdf
parent 1235 cfc9214a60a5
child 1300 976804e13602
     1.1 --- a/src/pEpEngine.h	Mon Oct 17 22:38:01 2016 +0200
     1.2 +++ b/src/pEpEngine.h	Tue Oct 18 00:32:01 2016 +0200
     1.3 @@ -530,6 +530,44 @@
     1.4          PEP_SESSION session, const pEp_identity *identity
     1.5      );
     1.6  
     1.7 +// trustwords_for_id_pair() - get full trustwords string for a *pair* of identities
     1.8 +//
     1.9 +//    parameters:
    1.10 +//        session (in)        session handle
    1.11 +//        id1 (in)            identity of first party in communication - fpr can't be NULL  
    1.12 +//        id2 (in)            identity of second party in communication - fpr can't be NULL
    1.13 +//        lang (in)           C string with ISO 639-1 language code
    1.14 +//        words (out)         pointer to C string with all trustwords UTF-8 encoded,
    1.15 +//                            separated by a blank each
    1.16 +//                            NULL if language is not supported or trustword
    1.17 +//                            wordlist is damaged or unavailable
    1.18 +//        wsize (out)         length of full trustwords string
    1.19 +//        max_words_per_id (in) generate at most max_words_per_id *per input identity* (output
    1.20 +//                              string can have 2 times this value)
    1.21 +//                              if max_words_per_id == 0 there is no such limit
    1.22 +//
    1.23 +//    return value:
    1.24 +//        PEP_STATUS_OK            trustwords retrieved
    1.25 +//        PEP_OUT_OF_MEMORY        out of memory
    1.26 +//        PEP_TRUSTWORD_NOT_FOUND  at least one trustword not found
    1.27 +//
    1.28 +//    caveat:
    1.29 +//        the word pointer goes to the ownership of the caller
    1.30 +//        the caller is responsible to free() it (on Windoze use pEp_free())
    1.31 +//
    1.32 +//  Warning from trustwords(), as this function uses trustwords() as an underlying function:
    1.33 +//  DON'T USE THIS FUNCTION FROM HIGH LEVEL LANGUAGES!
    1.34 +//
    1.35 +//  Better implement a simple one in the adapter yourself using trustword(), and
    1.36 +//  return a list of trustwords.
    1.37 +//  This function is provided for being used by C and C++ programs only.
    1.38 +
    1.39 +DYNAMIC_API PEP_STATUS trustwords_for_id_pair(
    1.40 +    PEP_SESSION session, pEp_identity* id1, pEp_identity* id2,
    1.41 +    const char* lang, char **words, size_t *wsize, int max_words_per_id
    1.42 +);
    1.43 +
    1.44 +
    1.45  // set_device_group() - update own person's device group
    1.46  //
    1.47  //    parameters: