Home | History | Annotate | Download | only in exchange
      1 /**
      2  * Copyright (c) 2011, Google Inc.
      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 package com.android.mail.providers.protos.exchange;
     17 
     18 import android.os.Parcel;
     19 
     20 import com.android.mail.providers.Attachment;
     21 
     22 public class ExchangeAttachment extends Attachment {
     23     public String contentId;
     24     public long messageKey;
     25     public String location;
     26     public String encoding;
     27     public String content; // Not currently used
     28     public int flags;
     29     public long accountKey;
     30 
     31     public ExchangeAttachment(Parcel in) {
     32         super(in);
     33         contentId = in.readString();
     34         messageKey = in.readLong();
     35         location = in.readString();
     36         encoding = in.readString();
     37         content = in.readString();
     38         flags = in.readInt();
     39         accountKey = in.readLong();
     40     }
     41 
     42     @Override
     43     public int describeContents() {
     44         return 0;
     45     }
     46 
     47     @Override
     48     public void writeToParcel(Parcel dest, int flags) {
     49         super.writeToParcel(dest, flags);
     50         dest.writeString(contentId);
     51         dest.writeLong(messageKey);
     52         dest.writeString(location);
     53         dest.writeString(encoding);
     54         dest.writeString(content);
     55         dest.writeInt(flags);
     56         dest.writeLong(accountKey);
     57     }
     58 
     59     public static final Creator<ExchangeAttachment> CREATOR = new Creator<ExchangeAttachment>() {
     60         @Override
     61         public ExchangeAttachment createFromParcel(Parcel source) {
     62             return new ExchangeAttachment(source);
     63         }
     64 
     65         @Override
     66         public ExchangeAttachment[] newArray(int size) {
     67             return new ExchangeAttachment[size];
     68         }
     69     };
     70 }
     71