// Path: src/com/nloko/android/Log.java
// public final class Log {
// 
// 	public static boolean debug = false;
// 	
// 	public static void d(String tag, String message)
// 	{
// 		if (debug) {
// 			android.util.Log.d(tag, message);
// 		}
// 	}
// 	
// 	public static void w(String tag, String message)
// 	{
// 		android.util.Log.w(tag, message);
// 	}
// 	
// 	public static void e(String tag, String message)
// 	{
// 		android.util.Log.e(tag, message);
// 	}
// 	
// 	public static void v(String tag, String message)
// 	{
// 		android.util.Log.v(tag, message);
// 	}
// 	
// 	public static void i(String tag, String message)
// 	{
// 		android.util.Log.i(tag, message);
// 	}
// }
// 
// Path: src/com/nloko/android/syncmypix/SyncMyPix.java
// public static final class Contacts implements BaseColumns {
// 	public static final Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY + "/contacts");
//        public static final String CONTENT_TYPE = "vnd.android.cursor.dir/vnd.nloko.contact";
//        public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/vnd.nloko.contact";
// 		
// 	public static final String DEFAULT_SORT_ORDER = "_id ASC";
// 	public static final String LOOKUP_KEY = "lookup_key";
// 	public static final String PIC_URL = "pic_url";
// 	public static final String PHOTO_HASH = "photo_hash";
// 	public static final String NETWORK_PHOTO_HASH = "network_photo_hash";
// 	public static final String FRIEND_ID = "friend_id";
// 	public static final String SOURCE = "source";
// }
// 
// Path: src/com/nloko/android/syncmypix/SyncMyPix.java
// public static final class Results implements BaseColumns {
//        public static final Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY + "/results");
//        public static final String CONTENT_TYPE = "vnd.android.cursor.dir/vnd.nloko.result";
//        public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/vnd.nloko.result";
// 
//        public static final String DEFAULT_SORT_ORDER = "name ASC";
//        public static final String NAME = "name";
//        public static final String PIC_URL = "pic_url";
//        public static final String DESCRIPTION = "description";
//        public static final String FRIEND_ID = "friend_id";
//        public static final String CONTACT_ID = "contact_id";
//        public static final String LOOKUP_KEY = "lookup_key";
//        public static final String SYNC_ID = "sync_id";
//    }
// 
// Path: src/com/nloko/android/syncmypix/SyncMyPix.java
// public static final class Sync implements BaseColumns {
// 	public static final Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY + "/sync");
//        public static final String CONTENT_TYPE = "vnd.android.cursor.dir/vnd.nloko.sync";
//        public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/vnd.nloko.sync";
// 		
//        public static final String DEFAULT_SORT_ORDER = "source ASC";
// 	public static final String DATE_STARTED = "date_started";
// 	public static final String DATE_COMPLETED = "date_completed";
// 	public static final String UPDATED = "updated";
// 	public static final String SKIPPED = "skipped";
// 	public static final String NOT_FOUND = "not_found";
// 	public static final String SOURCE = "source";
// }


import android.content.ContentUris;
import android.content.ContentValues;
import android.content.Context;
import android.content.UriMatcher;
import android.database.Cursor;
import android.database.SQLException;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.database.sqlite.SQLiteQueryBuilder;
import android.net.Uri;
import android.text.TextUtils;
import java.util.HashMap;
import com.nloko.android.Log;
import com.nloko.android.syncmypix.SyncMyPix.Contacts;
import com.nloko.android.syncmypix.SyncMyPix.Results;
import com.nloko.android.syncmypix.SyncMyPix.Sync;
import android.content.ContentProvider;

    private static final int CONTACTS = 1;
    private static final int CONTACTS_ID = 2;
    private static final int RESULTS = 3;
    private static final int RESULTS_ID = 4;
    private static final int SYNC = 5;
    private static final int SYNC_ID = 6;

    private static final UriMatcher uriMatcher;

    static {
        uriMatcher = new UriMatcher(UriMatcher.NO_MATCH);
        uriMatcher.addURI(SyncMyPix.AUTHORITY, "contacts", CONTACTS);
        uriMatcher.addURI(SyncMyPix.AUTHORITY, "contacts/#", CONTACTS_ID);
        uriMatcher.addURI(SyncMyPix.AUTHORITY, "results", RESULTS);
        uriMatcher.addURI(SyncMyPix.AUTHORITY, "results/#", RESULTS_ID);
        uriMatcher.addURI(SyncMyPix.AUTHORITY, "sync", SYNC);
        uriMatcher.addURI(SyncMyPix.AUTHORITY, "sync/#", SYNC_ID);

        // Map columns to resolve ambiguity
        contactsProjection = new HashMap<String, String>();
        contactsProjection.put(Contacts._ID, Contacts._ID);
        contactsProjection.put(Contacts.LOOKUP_KEY, Contacts.LOOKUP_KEY);
        contactsProjection.put(Contacts.PIC_URL, Contacts.PIC_URL);
        contactsProjection.put(Contacts.PHOTO_HASH, Contacts.PHOTO_HASH);
        contactsProjection.put(Contacts.NETWORK_PHOTO_HASH, Contacts.NETWORK_PHOTO_HASH);
        contactsProjection.put(Contacts.FRIEND_ID, Contacts.FRIEND_ID);
        contactsProjection.put(Contacts.SOURCE, Contacts.SOURCE);

        syncProjection = new HashMap<String, String>();
// Path: src/com/nloko/android/Log.java
// public final class Log {
// 
// 	public static boolean debug = false;
// 	
// 	public static void d(String tag, String message)
// 	{
// 		if (debug) {
// 			android.util.Log.d(tag, message);
// 		}
// 	}
// 	
// 	public static void w(String tag, String message)
// 	{
// 		android.util.Log.w(tag, message);
// 	}
// 	
// 	public static void e(String tag, String message)
// 	{
// 		android.util.Log.e(tag, message);
// 	}
// 	
// 	public static void v(String tag, String message)
// 	{
// 		android.util.Log.v(tag, message);
// 	}
// 	
// 	public static void i(String tag, String message)
// 	{
// 		android.util.Log.i(tag, message);
// 	}
// }
// 
// Path: src/com/nloko/android/syncmypix/SyncMyPix.java
// public static final class Contacts implements BaseColumns {
// 	public static final Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY + "/contacts");
//        public static final String CONTENT_TYPE = "vnd.android.cursor.dir/vnd.nloko.contact";
//        public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/vnd.nloko.contact";
// 		
// 	public static final String DEFAULT_SORT_ORDER = "_id ASC";
// 	public static final String LOOKUP_KEY = "lookup_key";
// 	public static final String PIC_URL = "pic_url";
// 	public static final String PHOTO_HASH = "photo_hash";
// 	public static final String NETWORK_PHOTO_HASH = "network_photo_hash";
// 	public static final String FRIEND_ID = "friend_id";
// 	public static final String SOURCE = "source";
// }
// 
// Path: src/com/nloko/android/syncmypix/SyncMyPix.java
// public static final class Results implements BaseColumns {
//        public static final Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY + "/results");
//        public static final String CONTENT_TYPE = "vnd.android.cursor.dir/vnd.nloko.result";
//        public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/vnd.nloko.result";
// 
//        public static final String DEFAULT_SORT_ORDER = "name ASC";
//        public static final String NAME = "name";
//        public static final String PIC_URL = "pic_url";
//        public static final String DESCRIPTION = "description";
//        public static final String FRIEND_ID = "friend_id";
//        public static final String CONTACT_ID = "contact_id";
//        public static final String LOOKUP_KEY = "lookup_key";
//        public static final String SYNC_ID = "sync_id";
//    }
// 
// Path: src/com/nloko/android/syncmypix/SyncMyPix.java
// public static final class Sync implements BaseColumns {
// 	public static final Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY + "/sync");
//        public static final String CONTENT_TYPE = "vnd.android.cursor.dir/vnd.nloko.sync";
//        public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/vnd.nloko.sync";
// 		
//        public static final String DEFAULT_SORT_ORDER = "source ASC";
// 	public static final String DATE_STARTED = "date_started";
// 	public static final String DATE_COMPLETED = "date_completed";
// 	public static final String UPDATED = "updated";
// 	public static final String SKIPPED = "skipped";
// 	public static final String NOT_FOUND = "not_found";
// 	public static final String SOURCE = "source";
// }


// Path: src/com/nloko/android/syncmypix/SyncMyPixProvider.java
import android.content.ContentUris;
import android.content.ContentValues;
import android.content.Context;
import android.content.UriMatcher;
import android.database.Cursor;
import android.database.SQLException;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.database.sqlite.SQLiteQueryBuilder;
import android.net.Uri;
import android.text.TextUtils;
import java.util.HashMap;
import com.nloko.android.Log;
import com.nloko.android.syncmypix.SyncMyPix.Contacts;
import com.nloko.android.syncmypix.SyncMyPix.Results;
import com.nloko.android.syncmypix.SyncMyPix.Sync;
import android.content.ContentProvider;


    private static final int CONTACTS = 1;
    private static final int CONTACTS_ID = 2;
    private static final int RESULTS = 3;
    private static final int RESULTS_ID = 4;
    private static final int SYNC = 5;
    private static final int SYNC_ID = 6;

    private static final UriMatcher uriMatcher;

    static {
        uriMatcher = new UriMatcher(UriMatcher.NO_MATCH);
        uriMatcher.addURI(SyncMyPix.AUTHORITY, "contacts", CONTACTS);
        uriMatcher.addURI(SyncMyPix.AUTHORITY, "contacts/#", CONTACTS_ID);
        uriMatcher.addURI(SyncMyPix.AUTHORITY, "results", RESULTS);
        uriMatcher.addURI(SyncMyPix.AUTHORITY, "results/#", RESULTS_ID);
        uriMatcher.addURI(SyncMyPix.AUTHORITY, "sync", SYNC);
        uriMatcher.addURI(SyncMyPix.AUTHORITY, "sync/#", SYNC_ID);

        // Map columns to resolve ambiguity
        contactsProjection = new HashMap<String, String>();
        contactsProjection.put(Contacts._ID, Contacts._ID);
        contactsProjection.put(Contacts.LOOKUP_KEY, Contacts.LOOKUP_KEY);
        contactsProjection.put(Contacts.PIC_URL, Contacts.PIC_URL);
        contactsProjection.put(Contacts.PHOTO_HASH, Contacts.PHOTO_HASH);
        contactsProjection.put(Contacts.NETWORK_PHOTO_HASH, Contacts.NETWORK_PHOTO_HASH);
        contactsProjection.put(Contacts.FRIEND_ID, Contacts.FRIEND_ID);
        contactsProjection.put(Contacts.SOURCE, Contacts.SOURCE);

        syncProjection = new HashMap<String, String>();
        syncProjection.put(Sync._ID, SYNC_TABLE_NAME + "." + Sync._ID);