1/*
2 * Copyright (C) 2010 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
17package com.android.layoutlib.bridge.android;
18
19import android.content.ContentProviderOperation;
20import android.content.ContentProviderResult;
21import android.content.ContentValues;
22import android.content.IContentProvider;
23import android.content.OperationApplicationException;
24import android.content.res.AssetFileDescriptor;
25import android.database.Cursor;
26import android.net.Uri;
27import android.os.Bundle;
28import android.os.IBinder;
29import android.os.ICancellationSignal;
30import android.os.ParcelFileDescriptor;
31import android.os.RemoteException;
32
33import java.io.FileNotFoundException;
34import java.util.ArrayList;
35
36/**
37 * Mock implementation of {@link IContentProvider}.
38 *
39 * TODO: never return null when the method is not supposed to. Return fake data instead.
40 */
41public final class BridgeContentProvider implements IContentProvider {
42    @Override
43    public ContentProviderResult[] applyBatch(String callingPackage,
44            ArrayList<ContentProviderOperation> arg0)
45            throws RemoteException, OperationApplicationException {
46        // TODO Auto-generated method stub
47        return null;
48    }
49
50    @Override
51    public int bulkInsert(String callingPackage, Uri arg0, ContentValues[] arg1)
52            throws RemoteException {
53        // TODO Auto-generated method stub
54        return 0;
55    }
56
57    @Override
58    public Bundle call(String callingPackage, String arg0, String arg1, Bundle arg2)
59            throws RemoteException {
60        // TODO Auto-generated method stub
61        return null;
62    }
63
64    @Override
65    public int delete(String callingPackage, Uri arg0, String arg1, String[] arg2)
66            throws RemoteException {
67        // TODO Auto-generated method stub
68        return 0;
69    }
70
71    @Override
72    public String getType(Uri arg0) throws RemoteException {
73        // TODO Auto-generated method stub
74        return null;
75    }
76
77    @Override
78    public Uri insert(String callingPackage, Uri arg0, ContentValues arg1) throws RemoteException {
79        // TODO Auto-generated method stub
80        return null;
81    }
82
83    @Override
84    public AssetFileDescriptor openAssetFile(
85            String callingPackage, Uri arg0, String arg1, ICancellationSignal signal)
86            throws RemoteException, FileNotFoundException {
87        // TODO Auto-generated method stub
88        return null;
89    }
90
91    @Override
92    public ParcelFileDescriptor openFile(
93            String callingPackage, Uri arg0, String arg1, ICancellationSignal signal, IBinder token)
94            throws RemoteException, FileNotFoundException {
95        // TODO Auto-generated method stub
96        return null;
97    }
98
99    @Override
100    public Cursor query(String callingPackage, Uri arg0, String[] arg1, String arg2, String[] arg3,
101            String arg4, ICancellationSignal arg5) throws RemoteException {
102        // TODO Auto-generated method stub
103        return null;
104    }
105
106    @Override
107    public int update(String callingPackage, Uri arg0, ContentValues arg1, String arg2,
108            String[] arg3) throws RemoteException {
109        // TODO Auto-generated method stub
110        return 0;
111    }
112
113    @Override
114    public IBinder asBinder() {
115        // TODO Auto-generated method stub
116        return null;
117    }
118
119    @Override
120    public String[] getStreamTypes(Uri arg0, String arg1) throws RemoteException {
121        // TODO Auto-generated method stub
122        return null;
123    }
124
125    @Override
126    public AssetFileDescriptor openTypedAssetFile(String callingPackage, Uri arg0, String arg1,
127            Bundle arg2, ICancellationSignal signal) throws RemoteException, FileNotFoundException {
128        // TODO Auto-generated method stub
129        return null;
130    }
131
132    @Override
133    public ICancellationSignal createCancellationSignal() throws RemoteException {
134        // TODO Auto-generated method stub
135        return null;
136    }
137
138
139    @Override
140    public Uri canonicalize(String callingPkg, Uri uri) throws RemoteException {
141        return null;
142    }
143
144    @Override
145    public Uri uncanonicalize(String callingPkg, Uri uri) throws RemoteException {
146        return null;
147    }
148}
149