defining color values
authorVolker Birk <vb@pep-project.org>
Wed, 15 Apr 2015 11:19:59 +0200
changeset 189dc89296e774b
parent 173 e3d5905cb419
child 190 b5cdb862fb16
defining color values
src/Makefile
src/message_api.h
     1.1 --- a/src/Makefile	Fri Apr 03 19:17:27 2015 +0200
     1.2 +++ b/src/Makefile	Wed Apr 15 11:19:59 2015 +0200
     1.3 @@ -84,7 +84,7 @@
     1.4  install: $(TARGET)
     1.5  	cp $< $(PREFIX)/lib/
     1.6  	mkdir -p $(PREFIX)/include/pEp
     1.7 -	cp pEpEngine.h keymanagement.h message_api.h $(PREFIX)/include/pEp/
     1.8 +	cp pEpEngine.h keymanagement.h message_api.h dynamic_api.h stringlist.h $(PREFIX)/include/pEp/
     1.9  
    1.10  uninstall:
    1.11  	rm -f $(PREFIX)/lib/$(TARGET)
     2.1 --- a/src/message_api.h	Fri Apr 03 19:17:27 2015 +0200
     2.2 +++ b/src/message_api.h	Wed Apr 15 11:19:59 2015 +0200
     2.3 @@ -62,6 +62,39 @@
     2.4          message **dst
     2.5      );
     2.6  
     2.7 +
     2.8 +typedef enum _pEp_color {
     2.9 +    pEp_undefined = 0,
    2.10 +    pEp_unencrypted,
    2.11 +    pEp_unreliable,
    2.12 +    pEp_reliable,
    2.13 +    pEp_yellow = pEp_reliable,
    2.14 +    pEp_trusted,
    2.15 +    pEp_green = pEp_trusted,
    2.16 +    pEp_trusted_and_anonymized,
    2.17 +    pEp_fully_anonymous,   
    2.18 +
    2.19 +    pEp_under_attack = -1,
    2.20 +    pEp_red = pEp_under_attack,
    2.21 +    pEp_b0rken = -2
    2.22 +} pEp_color;
    2.23 +
    2.24 +// get_color() - get color for a message
    2.25 +//
    2.26 +//  parameters:
    2.27 +//      session (in)        session handle
    2.28 +//      msg (in)            message to get the color for
    2.29 +//      color (out)         color for the message
    2.30 +//
    2.31 +//  return value:
    2.32 +//      error status or PEP_STATUS_OK on success
    2.33 +
    2.34 +DYNAMIC_API PEP_STATUS get_color(
    2.35 +        PEP_SESSION session,
    2.36 +        const message *msg,
    2.37 +        pEp_color *color
    2.38 +    );
    2.39 +
    2.40  #ifdef __cplusplus
    2.41  }
    2.42  #endif