Skip to content
Browse files

Remove deprecated bloglines ID support.

  • Loading branch information...
1 parent fc230c7 commit a0632114f5aa51d9e9f350b5e231e839c2a15245 stevewpalmer committed Jan 16, 2010
Showing with 1 addition and 56 deletions.
  1. +0 −1 Database.h
  2. +1 −28 Database.m
  3. +0 −6 Folder.h
  4. +0 −18 Folder.m
  5. +0 −3 Import.m
View
1 Database.h
@@ -88,7 +88,6 @@
-(BOOL)setParent:(int)newParentID forFolder:(int)folderId;
-(BOOL)setFirstChild:(int)childId forFolder:(int)folderId;
-(BOOL)setNextSibling:(int)nextSiblingId forFolder:(int)folderId;
--(BOOL)setBloglinesId:(int)folderId newBloglinesId:(long)bloglinesId;
-(void)handleAutoSortFoldersTreeChange:(NSNotification *)notification;
// RSS folder functions
View
29 Database.m
@@ -761,7 +761,7 @@ -(int)addRSSFolder:(NSString *)feedName underParent:(int)parentId afterChild:(in
"values (%d, '', '', '', '', '%@', %d)",
folderId,
preparedURL,
- MA_NonBloglines_Folder];
+ 0];
if (!results)
return -1;
@@ -1122,31 +1122,6 @@ -(BOOL)setFolderHomePage:(int)folderId newHomePage:(NSString *)newHomePage
return YES;
}
-/* setBloglinesId
- * Changes the Bloglines ID associated with this folder.
- */
--(BOOL)setBloglinesId:(int)folderId newBloglinesId:(long)bloglinesId
-{
- // Exit now if we're read-only
- if (readOnly)
- return NO;
-
- // Find our folder element.
- Folder * folder = [self folderFromID:folderId];
- if (!folder)
- return NO;
-
- // Do nothing if the ID hasn't changed
- if ([folder bloglinesId] == bloglinesId)
- return NO;
-
- [folder setBloglinesId:bloglinesId];
-
- // Update the ID in the database
- [self executeSQLWithFormat:@"update rss_folders set bloglines_id=%d where folder_id=%d", bloglinesId, folderId];
- return YES;
-}
-
/* setFolderUsername
* Sets the folder's user name in both in the internal structure and in the folder_description table.
*/
@@ -1785,7 +1760,6 @@ -(void)initFolderArray
for (SQLRow * row in[results rowEnumerator])
{
int folderId = [[row stringForColumn:@"folder_id"] intValue];
- long bloglinesId = [[row stringForColumn:@"bloglines_id"] intValue];
NSString * descriptiontext = [row stringForColumn:@"description"];
NSString * url = [row stringForColumn:@"feed_url"];
NSString * linktext = [row stringForColumn:@"home_page"];
@@ -1798,7 +1772,6 @@ -(void)initFolderArray
[folder setFeedURL:url];
[folder setLastUpdateString:lastUpdateString];
[folder setUsername:username];
- [folder setBloglinesId:bloglinesId];
}
}
[results release];
View
6 Folder.h
@@ -36,9 +36,6 @@
#define MA_Trash_Folder 5
#define MA_Search_Folder 6
-// Bloglines flags
-#define MA_NonBloglines_Folder 0x0L
-
// Macros to simplify getting folder types
#define FolderType(f) ([(f) type])
#define IsSmartFolder(f) (([(f) type]) == MA_Smart_Folder)
@@ -47,7 +44,6 @@
#define IsTrashFolder(f) (([(f) type]) == MA_Trash_Folder)
#define IsSearchFolder(f) (([(f) type]) == MA_Search_Folder)
#define IsSameFolderType(f,g) (([(f) type]) == ([(g) type]))
-#define IsBloglinesFolder(f) ([(f) bloglinesId] != MA_NonBloglines_Folder)
// Folder flags
// (These must be bitmask values!)
@@ -101,7 +97,6 @@
-(int)countOfCachedArticles;
-(int)unreadCount;
-(int)type;
--(long)bloglinesId;
-(unsigned int)nonPersistedFlags;
-(unsigned int)flags;
-(NSImage *)image;
@@ -129,7 +124,6 @@
-(void)setFeedURL:(NSString *)feedURL;
-(void)setUsername:(NSString *)newUsername;
-(void)setPassword:(NSString *)newPassword;
--(void)setBloglinesId:(long)newBloglinesId;
-(void)setLastUpdate:(NSDate *)newLastUpdate;
-(void)setLastUpdateString:(NSString *)newLastUpdateString;
-(unsigned)indexOfArticle:(Article *)article;
View
18 Folder.m
@@ -225,7 +225,6 @@ -(id)initWithId:(int)newId parentId:(int)newIdParent name:(NSString *)newName ty
[self setLastUpdate:[NSDate distantPast]];
[self setLastUpdateString:@""];
[self setUsername:@""];
- [self setBloglinesId:MA_NonBloglines_Folder];
}
return self;
}
@@ -531,23 +530,6 @@ -(void)setName:(NSString *)newName
[attributes setValue:newName forKey:@"Name"];
}
-/* bloglinesId
- * Returns the Bloglines ID associated with this folder.
- */
--(long)bloglinesId
-{
- return [[attributes valueForKey:@"BloglinesID"] longValue];
-}
-
-/* setBloglinesId
- * Sets the Bloglines ID associated with this folder. The special constant MA_NonBloglines_Folder
- * can be used to de-associate it with Bloglines.
- */
--(void)setBloglinesId:(long)newBloglinesId
-{
- [attributes setValue:[NSNumber numberWithLong:newBloglinesId] forKey:@"BloglinesID"];
-}
-
/* setType
* Changes the folder type
*/
View
3 Import.m
@@ -69,8 +69,6 @@ -(int)importSubscriptionGroup:(XMLParser *)tree underParent:(int)parentId
NSString * feedDescription = [[entry objectForKey:@"description"] stringByUnescapingExtendedCharacters];
NSString * feedURL = [[entry objectForKey:@"xmlurl"] stringByUnescapingExtendedCharacters];
NSString * feedHomePage = [[entry objectForKey:@"htmlurl"] stringByUnescapingExtendedCharacters];
- NSString * bloglinesSubId = [entry objectForKey:@"bloglinessubid"];
- int bloglinesId = bloglinesSubId ? [bloglinesSubId intValue] : MA_NonBloglines_Folder;
// Some OPML exports use 'text' instead of 'title'.
if (feedTitle == nil || [feedTitle length] == 0u)
@@ -108,7 +106,6 @@ -(int)importSubscriptionGroup:(XMLParser *)tree underParent:(int)parentId
folderId = [db addRSSFolder:feedTitle underParent:parentId afterChild:-1 subscriptionURL:feedURL];
++countImported;
}
- [db setBloglinesId:folderId newBloglinesId:bloglinesId];
if (feedDescription != nil)
[db setFolderDescription:folderId newDescription:feedDescription];
if (feedHomePage != nil)

0 comments on commit a063211

Please sign in to comment.
Something went wrong with that request. Please try again.