1 /* 2 * Copyright (C) 2009 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package com.android.emailcommon.mail; 18 19 import com.android.emailcommon.service.SearchParams; 20 21 22 public class MockFolder extends Folder { 23 24 @Override 25 public void appendMessages(Message[] messages) { 26 } 27 28 @Override 29 public void close(boolean expunge) { 30 } 31 32 @Override 33 public void copyMessages(Message[] msgs, Folder folder, 34 MessageUpdateCallbacks callbacks) { 35 } 36 37 @Override 38 public boolean canCreate(FolderType type) { 39 return false; 40 } 41 42 @Override 43 public boolean create(FolderType type) { 44 return false; 45 } 46 47 @Override 48 public void delete(boolean recurse) { 49 } 50 51 @Override 52 public boolean exists() { 53 return false; 54 } 55 56 @Override 57 public Message[] expunge() { 58 return null; 59 } 60 61 @Override 62 public void fetch(Message[] messages, FetchProfile fp, MessageRetrievalListener listener) { 63 } 64 65 @Override 66 public Message getMessage(String uid) { 67 return null; 68 } 69 70 @Override 71 public int getMessageCount() { 72 return 0; 73 } 74 75 @Override 76 public Message[] getMessages(int start, int end, MessageRetrievalListener listener) { 77 return null; 78 } 79 80 @Override 81 public Message[] getMessages(String[] uids, MessageRetrievalListener listener) { 82 return null; 83 } 84 85 @Override 86 public OpenMode getMode() { 87 return null; 88 } 89 90 @Override 91 public String getName() { 92 return null; 93 } 94 95 @Override 96 public Flag[] getPermanentFlags() { 97 return null; 98 } 99 100 @Override 101 public int getUnreadMessageCount() { 102 return 0; 103 } 104 105 @Override 106 public boolean isOpen() { 107 return false; 108 } 109 110 @Override 111 public void open(OpenMode mode) { 112 } 113 114 @Override 115 public void setFlags(Message[] messages, Flag[] flags, boolean value) { 116 } 117 118 @Override 119 public Message createMessage(String uid) { 120 return null; 121 } 122 123 @Override 124 public Message[] getMessages(SearchParams params, MessageRetrievalListener listener) 125 throws MessagingException { 126 return null; 127 } 128 129 /* (non-Javadoc) 130 * @see com.android.emailcommon.mail.Folder#getMessages(long, long, 131 * com.android.emailcommon.mail.Folder.MessageRetrievalListener) 132 */ 133 @Override 134 public Message[] getMessages(long startDate, long endDate, MessageRetrievalListener listener) 135 throws MessagingException { 136 return null; 137 } 138 139 } 140