Exemple #1
0
 public void triggerFetchStatuses(
     TwitterContentHandle contentHandle,
     TwitterPaging paging,
     TwitterFetchStatusesFinishedCallback callback,
     int priorityOffset) {
   mFetchStatuses.trigger(contentHandle, paging, callback, mConnectionStatus, priorityOffset);
 }
Exemple #2
0
  public void setOAuthTokenWithSecret(
      String oAuthToken, String oAuthSecret, boolean cancelPending) {

    if (oAuthToken == null && mCurrentOAuthToken == null) {
      return;
    } else if (oAuthToken != null
        && mCurrentOAuthToken != null
        && oAuthToken.equals(mCurrentOAuthToken) == true) {
      return;
    } else if (oAuthSecret != null
        && mCurrentOAuthSecret != null
        && oAuthSecret.equals(mCurrentOAuthSecret) == true) {
      return;
    }

    if (cancelPending == true) {
      mFetchBooleans.clearCallbacks();
      mFetchLists.clearCallbacks();
      mFetchDirectMessages.clearCallbacks();
      mFetchStatus.clearCallbacks();
      mFetchStatuses.clearCallbacks();
      mFetchUser.clearCallbacks();
      mFetchUsers.clearCallbacks();
      mModifyStatuses.clearCallbacks();
    }

    mCurrentOAuthToken = oAuthToken;
    mCurrentOAuthSecret = oAuthSecret;

    clearApiInstance();
    getAndConfigureApiInstance();
  }
Exemple #3
0
  private void initFetchStatuses() {

    mFetchStatuses = new TwitterFetchStatuses();

    FetchStatusesWorkerCallbacks callbacks =
        new FetchStatusesWorkerCallbacks() {

          public Twitter getTwitterInstance() {
            return SocialNetApi.this.getAndConfigureApiInstance();
          }

          @Override
          public void addUser(User user) {
            cacheUser(user);
          }

          @Override
          public void addUser(AdnUser user) {
            cacheUser(user);
          }

          @Override
          public AppdotnetApi getAppdotnetApi() {
            return SocialNetApi.this.getAppdotnetApi();
          }
        };

    mFetchStatuses.setWorkerCallbacks(callbacks);
  }
Exemple #4
0
 public void cancelFetchStatuses(TwitterFetchStatusesFinishedCallback callback) {
   mFetchStatuses.cancel(callback);
 }
Exemple #5
0
 public TwitterStatuses getContentFeed(TwitterContentHandle handle) {
   return mFetchStatuses.getStatuses(handle);
 }