/* * The contents of this file are subject to the Netscape Public * License Version 1.1 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.mozilla.org/NPL/ * * Software distributed under the License is distributed on an "AS * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or * implied. See the License for the specific language governing * rights and limitations under the License. * * The Original Code is the Netscape Messaging Access SDK Version 3.5 code, * released on or about June 15, 1998. * * The Initial Developer of the Original Code is Netscape Communications * Corporation. Portions created by Netscape are * Copyright (C) 1998 Netscape Communications Corporation. All * Rights Reserved. * * Contributor(s): ______________________________________. */ /* * Copyright (c) 1997 and 1998 Netscape Communications Corporation * (http://home.netscape.com/misc/trademarks.html) */ #include "datasink.h" void taggedLine(imap4SinkPtr_t in_pimap4Sink, char* in_tag, const char* in_status, const char* in_reason) { printf("taggedLine tag: %s\n", in_tag); printf("taggedLine status: %s\n", in_status); printf("taggedLine reason: %s\n", in_reason); } void error(imap4SinkPtr_t in_pimap4Sink, const char* in_tag, const char* in_status, const char* in_reason) { printf("ERROR: %s %s %s\n", in_tag, in_status, in_reason); } void ok(imap4SinkPtr_t in_pimap4Sink, const char* in_responseCode, const char* in_information) { if(in_responseCode != NULL) { printf("OK code: %s\n", in_responseCode); } printf("OK info: %s\n", in_information ); } void no(imap4SinkPtr_t in_pimap4Sink, const char* in_responseCode, const char* in_information) { if(in_responseCode != NULL) { printf("NO code: %s\n", in_responseCode); } printf("NO info: %s\n", in_information ); } void bad(imap4SinkPtr_t in_pimap4Sink, const char* in_responseCode, const char* in_information) { if(in_responseCode != NULL) { printf("BAD code: %s\n", in_responseCode); } printf("BAD info: %s\n", in_information ); } void rawResponse(imap4SinkPtr_t in_pimap4Sink, const char* in_data) { printf("RAWRESPONSE: %s\n", in_data); } /*Fetch Response*/ void fetchStart(imap4SinkPtr_t in_pimap4Sink, int in_msg) { printf("FetchStart: %d\n", in_msg); } void fetchEnd(imap4SinkPtr_t in_pimap4Sink) { printf("fetchEnd\n"); } void fetchSize(imap4SinkPtr_t in_pimap4Sink, int in_size) { printf("fetchSize: %d\n", in_size); } void fetchData(imap4SinkPtr_t in_pimap4Sink, const char* in_data, int in_bytesRead, int in_totalBytes) { /* printf("fetchData: %s\n BytesRead: %d TotalBytes: %d\n", in_data, in_bytesRead, in_totalBytes); */ } void fetchFlags(imap4SinkPtr_t in_pimap4Sink, const char* in_flags) { printf("fetchFlags: %s\n", in_flags); } void fetchBodyStructure(imap4SinkPtr_t in_pimap4Sink, const char* in_bodyStructure) { printf("fetchBodyStructure: %s\n", in_bodyStructure); } void fetchEnvelope(imap4SinkPtr_t in_pimap4Sink, const char** in_value, int in_valueLength) { int i=0; for(i=0; i