// Path: RetroWatch_Android/RetroWatchLE/src/com/hardcopy/retrowatchle/contents/objects/ContentObject.java
// public class ContentObject {
// 	
// 	public static final int CONTENT_TYPE_NOTIFICATION = 1;
// 	public static final int CONTENT_TYPE_MESSAGING = 2;
// 	public static final int CONTENT_TYPE_EMERGENCY = 3;
// 	public static final int CONTENT_TYPE_FEED = 4;
// 	
// 	public static final int MESSAGING_ID_GMAIL = 1;
// 	public static final int MESSAGING_ID_SMS = 2;
// 	
// 	public static final int EMERGENCY_ID_WIFI = 1;
// 	public static final int EMERGENCY_ID_CALL_STATE = 2;
// 	public static final int EMERGENCY_ID_BATT_STATE = 3;
// 	public static final int EMERGENCY_ID_RF_STATE = 4;
// 	
// 	public static final int ICON_TYPE_NORMAL_MESSAGE = 0;
// 	public static final int ICON_TYPE_EMAIL = 28;
// 	public static final int ICON_TYPE_CALL = 10;
// 	public static final int ICON_TYPE_EMERGENCY = 60;
// 	public static final int ICON_TYPE_BATT_FULL = 4;
// 	public static final int ICON_TYPE_BATT_MEDIUM = 5;
// 	public static final int ICON_TYPE_BATT_LOW = 6;
// 	public static final int ICON_TYPE_RF_STATE = 64;
// 	public static final int ICON_TYPE_RSS = 46;
// 	
// 	public static final String SMS_PACKAGE_NAME = "android.telephony.sms";
// 	public static final String GMAIL_PACKAGE_NAME = "com.google.android.gm";
// 	public static final String TELEPHONY_CALL_PACKAGE_NAME = "android.telephony.call";
// 	public static final String TELEPHONY_RF_PACKAGE_NAME = "android.telephony.rfstatus";
// 	public static final String FEED_PACKAGE_NAME = "com.hardcopy.feed";
// 	public static final String WIFI_PACKAGE_NAME = "android.net.wifi";
// 	public static final String BATT_PACKAGE_NAME = "android.os.battery";
// 	
// 	public int mContentType;			// Content type
// 	public int mIconType;				// Icon type
// 	public int mId;						// ID
// 	public boolean mIsEnabled = false;	// Watch shows enabled items only
// 	public String mOriginalString;		// Original string
// 	public String mFilteredString;		// String to be shown on remote device
// 	public String mExtraData = null;	// Extra data defined by each content type
// 	public String mPackageName = null;
// 	
// 	
// 	public ContentObject(int type, int id, String strOrigin, String strFiltered) {
// 		mContentType = type;
// 		mIconType = -1;
// 		mId = id;
// 		mOriginalString = strOrigin;
// 		mFilteredString = strFiltered;
// 	}
// 	
// }
// 
// Path: RetroWatch_Android/RetroWatchLE/src/com/hardcopy/retrowatchle/utils/Logs.java
// public class Logs {
// 	
// 	private static final String TAG = "RetroWatch";
// 	public static boolean mIsEnabled = true;
// 	
// 	
// 	public static void v(String msg) {
// 		if(mIsEnabled) {
// 			Log.v(TAG, msg);
// 		}
// 	}
// 	
// 	public static void v(String tag, String msg) {
// 		if(mIsEnabled) {
// 			Log.v(tag, msg);
// 		}
// 	}
// 	
// 	public static void d(String msg) {
// 		if(mIsEnabled) {
// 			Log.d(TAG, msg);
// 		}
// 	}
// 	
// 	public static void d(String tag, String msg) {
// 		if(mIsEnabled) {
// 			Log.d(tag, msg);
// 		}
// 	}
// 	
// 	public static void e(String msg) {
// 		if(mIsEnabled) {
// 			Log.e(TAG, msg);
// 		}
// 	}
// 	
// 	public static void e(String tag, String msg) {
// 		if(mIsEnabled) {
// 			Log.e(tag, msg);
// 		}
// 	}
// 	
// 	public static void i(String msg) {
// 		if(mIsEnabled) {
// 			Log.e(TAG, msg);
// 		}
// 	}
// 	
// 	public static void i(String tag, String msg) {
// 		if(mIsEnabled) {
// 			Log.e(tag, msg);
// 		}
// 	}
// 	
// }


import java.util.ArrayList;
import com.hardcopy.retrowatchle.contents.objects.ContentObject;
import com.hardcopy.retrowatchle.utils.Logs;
import android.content.Context;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ListView;
		mContext = c;
		mFragmentListener = l;
	}

	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
		Logs.d(TAG, "# MessageListFragment - onCreateView()");
		
		View rootView = inflater.inflate(R.layout.fragment_message_list, container, false);

		mListMessage = (ListView) rootView.findViewById(R.id.list_message);
		if(mMessageListAdapter == null)
			mMessageListAdapter = new MessageListAdapter(mContext, R.layout.list_message_list, null);
		mMessageListAdapter.setAdapterParams(this);
		mListMessage.setAdapter(mMessageListAdapter);
		
		return rootView;
	}
	
	@Override
	public void OnAdapterCallback(int msgType, int arg0, int arg1, String arg2, String arg3, Object arg4) {
		switch(msgType) {
		case IAdapterListener.CALLBACK_ADD_MESSAGE_FILTER:
		case IAdapterListener.CALLBACK_ADD_PACKAGE_FILTER:
			if(arg4 != null)
				mFragmentListener.OnFragmentCallback(IFragmentListener.CALLBACK_REQUEST_ADD_FILTER, 0, 0, null, null, arg4);
			break;
		}
	}
	
// Path: RetroWatch_Android/RetroWatchLE/src/com/hardcopy/retrowatchle/contents/objects/ContentObject.java
// public class ContentObject {
// 	
// 	public static final int CONTENT_TYPE_NOTIFICATION = 1;
// 	public static final int CONTENT_TYPE_MESSAGING = 2;
// 	public static final int CONTENT_TYPE_EMERGENCY = 3;
// 	public static final int CONTENT_TYPE_FEED = 4;
// 	
// 	public static final int MESSAGING_ID_GMAIL = 1;
// 	public static final int MESSAGING_ID_SMS = 2;
// 	
// 	public static final int EMERGENCY_ID_WIFI = 1;
// 	public static final int EMERGENCY_ID_CALL_STATE = 2;
// 	public static final int EMERGENCY_ID_BATT_STATE = 3;
// 	public static final int EMERGENCY_ID_RF_STATE = 4;
// 	
// 	public static final int ICON_TYPE_NORMAL_MESSAGE = 0;
// 	public static final int ICON_TYPE_EMAIL = 28;
// 	public static final int ICON_TYPE_CALL = 10;
// 	public static final int ICON_TYPE_EMERGENCY = 60;
// 	public static final int ICON_TYPE_BATT_FULL = 4;
// 	public static final int ICON_TYPE_BATT_MEDIUM = 5;
// 	public static final int ICON_TYPE_BATT_LOW = 6;
// 	public static final int ICON_TYPE_RF_STATE = 64;
// 	public static final int ICON_TYPE_RSS = 46;
// 	
// 	public static final String SMS_PACKAGE_NAME = "android.telephony.sms";
// 	public static final String GMAIL_PACKAGE_NAME = "com.google.android.gm";
// 	public static final String TELEPHONY_CALL_PACKAGE_NAME = "android.telephony.call";
// 	public static final String TELEPHONY_RF_PACKAGE_NAME = "android.telephony.rfstatus";
// 	public static final String FEED_PACKAGE_NAME = "com.hardcopy.feed";
// 	public static final String WIFI_PACKAGE_NAME = "android.net.wifi";
// 	public static final String BATT_PACKAGE_NAME = "android.os.battery";
// 	
// 	public int mContentType;			// Content type
// 	public int mIconType;				// Icon type
// 	public int mId;						// ID
// 	public boolean mIsEnabled = false;	// Watch shows enabled items only
// 	public String mOriginalString;		// Original string
// 	public String mFilteredString;		// String to be shown on remote device
// 	public String mExtraData = null;	// Extra data defined by each content type
// 	public String mPackageName = null;
// 	
// 	
// 	public ContentObject(int type, int id, String strOrigin, String strFiltered) {
// 		mContentType = type;
// 		mIconType = -1;
// 		mId = id;
// 		mOriginalString = strOrigin;
// 		mFilteredString = strFiltered;
// 	}
// 	
// }
// 
// Path: RetroWatch_Android/RetroWatchLE/src/com/hardcopy/retrowatchle/utils/Logs.java
// public class Logs {
// 	
// 	private static final String TAG = "RetroWatch";
// 	public static boolean mIsEnabled = true;
// 	
// 	
// 	public static void v(String msg) {
// 		if(mIsEnabled) {
// 			Log.v(TAG, msg);
// 		}
// 	}
// 	
// 	public static void v(String tag, String msg) {
// 		if(mIsEnabled) {
// 			Log.v(tag, msg);
// 		}
// 	}
// 	
// 	public static void d(String msg) {
// 		if(mIsEnabled) {
// 			Log.d(TAG, msg);
// 		}
// 	}
// 	
// 	public static void d(String tag, String msg) {
// 		if(mIsEnabled) {
// 			Log.d(tag, msg);
// 		}
// 	}
// 	
// 	public static void e(String msg) {
// 		if(mIsEnabled) {
// 			Log.e(TAG, msg);
// 		}
// 	}
// 	
// 	public static void e(String tag, String msg) {
// 		if(mIsEnabled) {
// 			Log.e(tag, msg);
// 		}
// 	}
// 	
// 	public static void i(String msg) {
// 		if(mIsEnabled) {
// 			Log.e(TAG, msg);
// 		}
// 	}
// 	
// 	public static void i(String tag, String msg) {
// 		if(mIsEnabled) {
// 			Log.e(tag, msg);
// 		}
// 	}
// 	
// }


// Path: RetroWatch_Android/RetroWatchLE/src/com/hardcopy/retrowatchle/MessageListFragment.java
import java.util.ArrayList;
import com.hardcopy.retrowatchle.contents.objects.ContentObject;
import com.hardcopy.retrowatchle.utils.Logs;
import android.content.Context;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ListView;

		mContext = c;
		mFragmentListener = l;
	}

	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
		Logs.d(TAG, "# MessageListFragment - onCreateView()");
		
		View rootView = inflater.inflate(R.layout.fragment_message_list, container, false);

		mListMessage = (ListView) rootView.findViewById(R.id.list_message);
		if(mMessageListAdapter == null)
			mMessageListAdapter = new MessageListAdapter(mContext, R.layout.list_message_list, null);
		mMessageListAdapter.setAdapterParams(this);
		mListMessage.setAdapter(mMessageListAdapter);
		
		return rootView;
	}
	
	@Override
	public void OnAdapterCallback(int msgType, int arg0, int arg1, String arg2, String arg3, Object arg4) {
		switch(msgType) {
		case IAdapterListener.CALLBACK_ADD_MESSAGE_FILTER:
		case IAdapterListener.CALLBACK_ADD_PACKAGE_FILTER:
			if(arg4 != null)
				mFragmentListener.OnFragmentCallback(IFragmentListener.CALLBACK_REQUEST_ADD_FILTER, 0, 0, null, null, arg4);
			break;
		}
	}
	
	public void addMessage(ContentObject object) {