FileDocCategorySizeDatePackage
SubscribedFeeds.javaAPI DocAndroid 1.5 API7418Wed May 06 22:41:56 BST 2009android.provider

SubscribedFeeds

public class SubscribedFeeds extends Object
The SubscribedFeeds provider stores all information about subscribed feeds.
hide

Fields Summary
Constructors Summary
private SubscribedFeeds()

Methods Summary
public static android.net.UriaddFeed(android.content.ContentResolver resolver, java.lang.String feed, java.lang.String account, java.lang.String authority, java.lang.String service)
A convenience method to add a feed to the SubscribedFeeds content provider. The user specifies the values of the FEED, _SYNC_ACCOUNT, AUTHORITY. SERVICE, and ROUTING_INFO.

param
resolver used to access the underlying content provider
param
feed corresponds to the FEED column
param
account corresponds to the _SYNC_ACCOUNT column
param
authority corresponds to the AUTHORITY column
param
service corresponds to the SERVICE column
return
the Uri of the feed that was added

    

                                                                                                                                   
        
               
                
        ContentValues values = new ContentValues();
        values.put(SubscribedFeeds.Feeds.FEED, feed);
        values.put(SubscribedFeeds.Feeds._SYNC_ACCOUNT, account);
        values.put(SubscribedFeeds.Feeds.AUTHORITY, authority);
        values.put(SubscribedFeeds.Feeds.SERVICE, service);
        return resolver.insert(SubscribedFeeds.Feeds.CONTENT_URI, values);
    
public static intdeleteFeed(android.content.ContentResolver resolver, java.lang.String feed, java.lang.String account, java.lang.String authority)

        StringBuilder where = new StringBuilder();
        where.append(SubscribedFeeds.Feeds._SYNC_ACCOUNT + "=?");
        where.append(" AND " + SubscribedFeeds.Feeds.FEED + "=?");
        where.append(" AND " + SubscribedFeeds.Feeds.AUTHORITY + "=?");
        return resolver.delete(SubscribedFeeds.Feeds.CONTENT_URI,
                where.toString(), new String[] {account, feed, authority});
    
public static intdeleteFeeds(android.content.ContentResolver resolver, java.lang.String account, java.lang.String authority)

        StringBuilder where = new StringBuilder();
        where.append(SubscribedFeeds.Feeds._SYNC_ACCOUNT + "=?");
        where.append(" AND " + SubscribedFeeds.Feeds.AUTHORITY + "=?");
        return resolver.delete(SubscribedFeeds.Feeds.CONTENT_URI,
                where.toString(), new String[] {account, authority});
    
public static java.lang.StringgtalkServiceRoutingInfoFromAccountAndResource(java.lang.String account, java.lang.String res)

        return Uri.parse("gtalk://" + account + "/" + res).toString();