+ public void addResourceRequest(String[] resourceRequest) {
+ // Add the resource request to the list.
+ resourceRequests.add(resourceRequest);
+ }
+
+ public ArrayList<String[]> getResourceRequests() {
+ // Return the list of resource requests.
+ return resourceRequests;
+ }
+
+ public void clearResourceRequests() {
+ // Clear the resource requests.
+ resourceRequests.clear();
+ }
+
+ public void resetRequestsCount(int list) {
+ // Run the command on the indicated list.
+ switch (list) {
+ case BLOCKED_REQUESTS:
+ // Reset the blocked requests count.
+ blockedRequests = 0;
+ break;
+
+ case EASY_LIST_BLOCKED_REQUESTS:
+ // Reset the EasyList blocked requests count.
+ easyListBlockedRequests = 0;
+ break;
+
+ case EASY_PRIVACY_BLOCKED_REQUESTS:
+ // Reset the EasyPrivacy blocked requests count.
+ easyPrivacyBlockedRequests = 0;
+ break;
+
+ case FANBOYS_ANNOYANCE_LIST_BLOCKED_REQUESTS:
+ // Reset the Fanboy's Annoyance List blocked requests count.
+ fanboysAnnoyanceListBlockedRequests = 0;
+ break;
+
+ case FANBOYS_SOCIAL_BLOCKING_LIST_BLOCKED_REQUESTS:
+ // Reset the Fanboy's Social Blocking List blocked requests count.
+ fanboysSocialBlockingListBlockedRequests = 0;
+ break;
+
+ case ULTRA_PRIVACY_BLOCKED_REQUESTS:
+ // Reset the UltraPrivacy blocked requests count.
+ ultraPrivacyBlockedRequests = 0;
+ break;
+
+ case THIRD_PARTY_BLOCKED_REQUESTS:
+ // Reset the Third Party blocked requests count.
+ thirdPartyBlockedRequests = 0;
+ break;
+ }
+ }
+
+ public void incrementRequestsCount(int list) {
+ // Run the command on the indicated list.
+ switch (list) {
+ case BLOCKED_REQUESTS:
+ // Increment the blocked requests count.
+ blockedRequests++;
+ break;
+
+ case EASY_LIST_BLOCKED_REQUESTS:
+ // Increment the EasyList blocked requests count.
+ easyListBlockedRequests++;
+ break;
+
+ case EASY_PRIVACY_BLOCKED_REQUESTS:
+ // Increment the EasyPrivacy blocked requests count.
+ easyPrivacyBlockedRequests++;
+ break;
+
+ case FANBOYS_ANNOYANCE_LIST_BLOCKED_REQUESTS:
+ // Increment the Fanboy's Annoyance List blocked requests count.
+ fanboysAnnoyanceListBlockedRequests++;
+ break;
+
+ case FANBOYS_SOCIAL_BLOCKING_LIST_BLOCKED_REQUESTS:
+ // Increment the Fanboy's Social Blocking List blocked requests count.
+ fanboysSocialBlockingListBlockedRequests++;
+ break;
+
+ case ULTRA_PRIVACY_BLOCKED_REQUESTS:
+ // Increment the UltraPrivacy blocked requests count.
+ ultraPrivacyBlockedRequests++;
+ break;
+
+ case THIRD_PARTY_BLOCKED_REQUESTS:
+ // Increment the Third Party blocked requests count.
+ thirdPartyBlockedRequests++;
+ break;
+ }
+ }
+
+ public int getRequestsCount(int list) {
+ // Run the command on the indicated list.
+ switch (list) {
+ case BLOCKED_REQUESTS:
+ // Return the blocked requests count.
+ return blockedRequests;
+
+ case EASY_LIST_BLOCKED_REQUESTS:
+ // Return the EasyList blocked requests count.
+ return easyListBlockedRequests;
+
+ case EASY_PRIVACY_BLOCKED_REQUESTS:
+ // Return the EasyPrivacy blocked requests count.
+ return easyPrivacyBlockedRequests;
+
+ case FANBOYS_ANNOYANCE_LIST_BLOCKED_REQUESTS:
+ // Return the Fanboy's Annoyance List blocked requests count.
+ return fanboysAnnoyanceListBlockedRequests;
+
+ case FANBOYS_SOCIAL_BLOCKING_LIST_BLOCKED_REQUESTS:
+ // Return the Fanboy's Social Blocking List blocked requests count.
+ return fanboysSocialBlockingListBlockedRequests;
+
+ case ULTRA_PRIVACY_BLOCKED_REQUESTS:
+ // Return the UltraPrivacy blocked requests count.
+ return ultraPrivacyBlockedRequests;
+
+ case THIRD_PARTY_BLOCKED_REQUESTS:
+ // Return the Third Party blocked requests count.
+ return thirdPartyBlockedRequests;
+
+ default:
+ // Return 0. This should never end up being called.
+ return 0;
+ }
+ }
+