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 android.content.Context;
20 
21 import com.android.emailcommon.service.SearchParams;
22 
23 
24 public class MockFolder extends Folder {
25 
26     @Override
appendMessage(Context context, Message message, boolean noTimeout)27     public void appendMessage(Context context, Message message, boolean noTimeout) {
28     }
29 
30     @Override
close(boolean expunge)31     public void close(boolean expunge) {
32     }
33 
34     @Override
copyMessages(Message[] msgs, Folder folder, MessageUpdateCallbacks callbacks)35     public void copyMessages(Message[] msgs, Folder folder,
36             MessageUpdateCallbacks callbacks) {
37     }
38 
39     @Override
canCreate(FolderType type)40     public boolean canCreate(FolderType type) {
41         return false;
42     }
43 
44     @Override
create(FolderType type)45     public boolean create(FolderType type) {
46         return false;
47     }
48 
49     @Override
delete(boolean recurse)50     public void delete(boolean recurse) {
51     }
52 
53     @Override
exists()54     public boolean exists() {
55         return false;
56     }
57 
58     @Override
expunge()59     public Message[] expunge() {
60         return null;
61     }
62 
63     @Override
fetch(Message[] messages, FetchProfile fp, MessageRetrievalListener listener)64     public void fetch(Message[] messages, FetchProfile fp, MessageRetrievalListener listener) {
65     }
66 
67     @Override
getMessage(String uid)68     public Message getMessage(String uid) {
69         return null;
70     }
71 
72     @Override
getMessageCount()73     public int getMessageCount() {
74         return 0;
75     }
76 
77     @Override
getMessages(int start, int end, MessageRetrievalListener listener)78     public Message[] getMessages(int start, int end, MessageRetrievalListener listener) {
79         return null;
80     }
81 
82     @Override
getMessages(String[] uids, MessageRetrievalListener listener)83     public Message[] getMessages(String[] uids, MessageRetrievalListener listener) {
84         return null;
85     }
86 
87     @Override
getMode()88     public OpenMode getMode() {
89         return null;
90     }
91 
92     @Override
getName()93     public String getName() {
94         return null;
95     }
96 
97     @Override
getPermanentFlags()98     public Flag[] getPermanentFlags() {
99         return null;
100     }
101 
102     @Override
getUnreadMessageCount()103     public int getUnreadMessageCount() {
104         return 0;
105     }
106 
107     @Override
isOpen()108     public boolean isOpen() {
109         return false;
110     }
111 
112     @Override
open(OpenMode mode)113     public void open(OpenMode mode) {
114     }
115 
116     @Override
setFlags(Message[] messages, Flag[] flags, boolean value)117     public void setFlags(Message[] messages, Flag[] flags, boolean value) {
118     }
119 
120     @Override
createMessage(String uid)121     public Message createMessage(String uid) {
122         return null;
123     }
124 
125     @Override
getMessages(SearchParams params, MessageRetrievalListener listener)126     public Message[] getMessages(SearchParams params, MessageRetrievalListener listener)
127             throws MessagingException {
128         return null;
129     }
130 
131     /* (non-Javadoc)
132      * @see com.android.emailcommon.mail.Folder#getMessages(long, long,
133      * com.android.emailcommon.mail.Folder.MessageRetrievalListener)
134      */
135     @Override
getMessages(long startDate, long endDate, MessageRetrievalListener listener)136     public Message[] getMessages(long startDate, long endDate, MessageRetrievalListener listener)
137             throws MessagingException {
138         return null;
139     }
140 
141 }
142