@@ -0,0 +1,2300 @@
+// vim: et sw=4 sts=4 tabstop=4%0Apackage com.issc.data;%0A%0Aimport com.issc.util.Log;%0Aimport com.issc.util.UuidMatcher;%0A%0Aimport java.util.ArrayList;%0Aimport java.util.Iterator;%0Aimport java.util.List;%0Aimport java.util.UUID;%0A%0Aimport android.content.Intent;%0A%0A/**%0A * This class helps us to know what a set of uuids can do.%0A */%0A%0Apublic class UuidsHandler %7B%0A%0A    private UuidMatcher mMatcher;%0A    private String mPkgName;%0A    private String mActName;%0A%0A    private CharSequence mTitle;%0A    private CharSequence mDesc;%0A%0A    public UuidsHandler(String pkg, String act) %7B%0A        mMatcher = new UuidMatcher();%0A        mPkgName = pkg;%0A        mActName = act;%0A    %7D%0A%0A    public void setInfo(CharSequence title, CharSequence desc) %7B%0A        mTitle = title;%0A        mDesc  = desc;%0A    %7D%0A%0A    public Intent createIntent() %7B%0A        Intent i = new Intent();%0A        i.setClassName(mPkgName, mActName);%0A        return i;%0A    %7D%0A%0A    public void addRule(UUID uuid) %7B%0A        mMatcher.addRule(uuid);%0A    %7D%0A%0A    public void addStrRule(String uuid) %7B%0A        mMatcher.addRule(uuid);%0A    %7D%0A%0A    public void addShortRule(String uuid) %7B%0A        mMatcher.addShortRule(uuid);%0A    %7D%0A%0A    public void addRules(List%3CUUID%3E uuids) %7B%0A        Iterator%3CUUID%3E it = uuids.iterator();%0A        while(it.hasNext()) %7B%0A            mMatcher.addRule(it.next());%0A        %7D%0A    %7D%0A%0A    public void addRules(UUID%5B%5D uuids) %7B%0A        for (int i = 0; i %3C uuids.length; i++) %7B%0A            mMatcher.addRule(uuids%5Bi%5D);%0A        %7D%0A    %7D%0A%0A    public void addStrRules(List%3CString%3E uuids) %7B%0A        Iterator%3CString%3E it = uuids.iterator();%0A        while(it.hasNext()) %7B%0A            mMatcher.addRule(it.next());%0A        %7D%0A    %7D%0A%0A    public void addStrRules(String%5B%5D uuids) %7B%0A        for (int i = 0; i %3C uuids.length; i++) %7B%0A            mMatcher.addRule(uuids%5Bi%5D);%0A        %7D%0A    %7D%0A%0A    public void addShortRules(List%3CString%3E uuids) %7B%0A        Iterator%3CString%3E it = uuids.iterator();%0A        while(it.hasNext()) %7B%0A            mMatcher.addShortRule(it.next());%0A        %7D%0A    %7D%0A%0A    public void addShortRules(String%5B%5D uuids) %7B%0A        for (int i = 0; i %3C uuids.length; i++) %7B%0A            mMatcher.addShortRule(uuids%5Bi%5D);%0A        %7D%0A    %7D%0A%0A    public CharSequence getTitle() %7B%0A        return mTitle;%0A    %7D%0A%0A    public CharSequence getDesc() %7B%0A        return mDesc;%0A    %7D%0A%7D%0A

Add UuidsHandler