Browse Source

Clarified API

dvh-chacham15-master
Hoa V. DINH 9 years ago
parent
commit
02d9326d91
2 changed files with 9 additions and 14 deletions
  1. +2
    -6
      src/data-types/mailstream_low.c
  2. +7
    -8
      src/data-types/mailstream_types.h

+ 2
- 6
src/data-types/mailstream_low.c View File

@ -358,9 +358,6 @@ static inline void mailstream_logger_internal(mailstream_low * s, int is_stream_
case 4:
log_type = MAILSTREAM_LOG_TYPE_INFO_RECEIVED;
break;
default:
log_type = MAILSTREAM_LOG_TYPE_INFO_GENERIC;
break;
}
}
case 1: {
@ -387,12 +384,11 @@ static inline void mailstream_logger_internal(mailstream_low * s, int is_stream_
case 4|1:
log_type = MAILSTREAM_LOG_TYPE_ERROR_SENT;
break;
case 0:
case 4:
log_type = MAILSTREAM_LOG_TYPE_ERROR_RECEIVED;
break;
default:
log_type = MAILSTREAM_LOG_TYPE_ERROR_GENERIC;
case 0:
log_type = MAILSTREAM_LOG_TYPE_ERROR_PARSE;
break;
}
break;


+ 7
- 8
src/data-types/mailstream_types.h View File

@ -55,20 +55,19 @@ struct _mailstream_low;
typedef struct _mailstream_low mailstream_low;
enum {
// Buffer is a log text string.
MAILSTREAM_LOG_TYPE_INFO_GENERIC,
/* Buffer is a log text string. */
MAILSTREAM_LOG_TYPE_INFO_RECEIVED,
MAILSTREAM_LOG_TYPE_INFO_SENT,
// Buffer is data sent over the network.
MAILSTREAM_LOG_TYPE_ERROR_GENERIC,
MAILSTREAM_LOG_TYPE_ERROR_RECEIVED,
MAILSTREAM_LOG_TYPE_ERROR_SENT,
/* Buffer is data sent over the network. */
MAILSTREAM_LOG_TYPE_ERROR_PARSE,
MAILSTREAM_LOG_TYPE_ERROR_RECEIVED, /* no data */
MAILSTREAM_LOG_TYPE_ERROR_SENT, /* no data */
// Buffer is data sent over the network.
/* Buffer is data sent over the network. */
MAILSTREAM_LOG_TYPE_DATA_RECEIVED,
MAILSTREAM_LOG_TYPE_DATA_SENT,
MAILSTREAM_LOG_TYPE_DATA_SENT_PRIVATE,
MAILSTREAM_LOG_TYPE_DATA_SENT_PRIVATE, /* data is private, for example a password. */
};
struct _mailstream {


Loading…
Cancel
Save