Adium

Changeset 20585

Show
Ignore:
Timestamp:
08/13/2007 10:59:20 PM (1 year ago)
Author:
boredzo
Message:

The first generation of appcasts has ended.

The second generation of appcasts has begun.

The difference is that generation 1 appcasts cannot have the minimumSystemVersion element, whereas generation 2 appcasts should (and must have the generation=2 key in their URL query).

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/adium-1.0/Source/AIAdium.m

    r20177 r20585  
    11541154#endif 
    11551155 
     1156//The first generation ended with 1.0.5 and 1.1. Our Sparkle Plus up to that point had a bug that left it unable to properly handle the sparkle:minimumSystemVersion element. 
     1157//The second generation began with 1.0.6 and 1.1.1, with a Sparkle Plus that can handle that element. 
     1158#define UPDATE_GENERATION_DICT [NSDictionary dictionaryWithObjectsAndKeys:@"generation", @"key", @"Appcast generation number", @"visibleKey", @"2", @"value", @"2", @"visibleValue", nil] 
     1159 
    11561160/* This method gives the delegate the opportunity to customize the information that will 
    11571161 * be included with update checks.  Add or remove items from the dictionary as desired. 
     
    11671171         
    11681172        //If we're not sending profile information, return just the type of update we're looking for 
    1169         if (![[defaults objectForKey:SUSendProfileInfoKey] boolValue]) 
    1170                 return [NSMutableArray arrayWithObject:UPDATE_TYPE_DICT];  
    1171          
    1172         int now = [[NSCalendarDate date] dayOfCommonEra]; 
    1173  
    1174         if (abs([defaults integerForKey:@"AILastSubmittedProfileDate2"] - now) >= 7) { 
    1175                 [defaults setInteger:now forKey:@"AILastSubmittedProfileDate2"]; 
    1176                  
    1177                 NSString *value = ([defaults boolForKey:@"AIHasSentSparkleProfileInfo"]) ? @"no" : @"yes"; 
    1178  
    1179                 NSDictionary *entry = [NSDictionary dictionaryWithObjectsAndKeys: 
    1180                         @"FirstSubmission", @"key",  
    1181                         @"First Time Submitting Profile Information", @"visibleKey", 
    1182                         value, @"value", 
    1183                         value, @"visibleValue", 
    1184                         nil]; 
    1185                  
    1186                 [profileInfo addObject:entry]; 
    1187                  
    1188                 [profileInfo addObject:UPDATE_TYPE_DICT]; 
    1189                  
    1190                 [defaults setBool:YES forKey:@"AIHasSentSparkleProfileInfo"]; 
    1191                  
    1192                 /*************** Include info about what IM services are used ************/ 
    1193                 NSMutableString *accountInfo = [NSMutableString string]; 
    1194                 NSCountedSet *condensedAccountInfo = [NSCountedSet set]; 
    1195                 NSEnumerator *accountEnu = [[[self accountController] accounts] objectEnumerator]; 
    1196                 AIAccount *account = nil; 
    1197                 while ((account = [accountEnu nextObject])) { 
    1198                         NSString *serviceID = [account serviceID]; 
    1199                         [accountInfo appendFormat:@"%@, ", serviceID]; 
    1200                         if([serviceID isEqualToString:@"Yahoo! Japan"]) serviceID = @"YJ"; 
    1201                         [condensedAccountInfo addObject:[NSString stringWithFormat:@"%@", [serviceID substringToIndex:2]]];  
    1202                 } 
    1203                  
    1204                 NSMutableString *accountInfoString = [NSMutableString string]; 
    1205                 NSEnumerator *infoEnu = [[[condensedAccountInfo allObjects] sortedArrayUsingSelector:@selector(compare:)] objectEnumerator]; 
    1206                 while ((value = [infoEnu nextObject])) 
    1207                         [accountInfoString appendFormat:@"%@%d", value, [condensedAccountInfo countForObject:value]]; 
    1208                  
    1209                 entry = [NSDictionary dictionaryWithObjectsAndKeys: 
    1210                                                                         @"IMServices", @"key",  
    1211                                                                         @"IM Services Used", @"visibleKey", 
    1212                                                                         accountInfoString, @"value", 
    1213                                                                         accountInfo, @"visibleValue", 
    1214                                                                         nil]; 
    1215                 [profileInfo addObject:entry]; 
    1216                 return profileInfo; 
    1217  
    1218         } else { 
    1219                 return [NSMutableArray arrayWithObject:UPDATE_TYPE_DICT]; 
    1220         } 
     1173        if ([[defaults objectForKey:SUSendProfileInfoKey] boolValue]) { 
     1174                int now = [[NSCalendarDate date] dayOfCommonEra]; 
     1175  
     1176                if (abs([defaults integerForKey:@"AILastSubmittedProfileDate2"] - now) >= 7) { 
     1177                        [defaults setInteger:now forKey:@"AILastSubmittedProfileDate2"]; 
     1178                         
     1179                        NSString *value = ([defaults boolForKey:@"AIHasSentSparkleProfileInfo"]) ? @"no" : @"yes"; 
     1180                         
     1181                        NSDictionary *entry = [NSDictionary dictionaryWithObjectsAndKeys: 
     1182                                @"FirstSubmission", @"key",  
     1183                                @"First Time Submitting Profile Information", @"visibleKey", 
     1184                                value, @"value", 
     1185                                value, @"visibleValue", 
     1186                                nil]; 
     1187                         
     1188                        [profileInfo addObject:entry]; 
     1189                         
     1190                        [defaults setBool:YES forKey:@"AIHasSentSparkleProfileInfo"]; 
     1191                         
     1192                        /*************** Include info about what IM services are used ************/ 
     1193                        NSMutableString *accountInfo = [NSMutableString string]; 
     1194                        NSCountedSet *condensedAccountInfo = [NSCountedSet set]; 
     1195                        NSEnumerator *accountEnu = [[[self accountController] accounts] objectEnumerator]; 
     1196                        AIAccount *account = nil; 
     1197                        while ((account = [accountEnu nextObject])) { 
     1198                                NSString *serviceID = [account serviceID]; 
     1199                                [accountInfo appendFormat:@"%@, ", serviceID]; 
     1200                                if([serviceID isEqualToString:@"Yahoo! Japan"]) serviceID = @"YJ"; 
     1201                                [condensedAccountInfo addObject:[NSString stringWithFormat:@"%@", [serviceID substringToIndex:2]]];  
     1202                        } 
     1203                         
     1204                        NSMutableString *accountInfoString = [NSMutableString string]; 
     1205                        NSEnumerator *infoEnu = [[[condensedAccountInfo allObjects] sortedArrayUsingSelector:@selector(compare:)] objectEnumerator]; 
     1206                        while ((value = [infoEnu nextObject])) 
     1207                                [accountInfoString appendFormat:@"%@%d", value, [condensedAccountInfo countForObject:value]]; 
     1208                         
     1209                        entry = [NSDictionary dictionaryWithObjectsAndKeys: 
     1210                                @"IMServices", @"key",  
     1211                                @"IM Services Used", @"visibleKey", 
     1212                                accountInfoString, @"value", 
     1213                                accountInfo, @"visibleValue", 
     1214                                nil]; 
     1215                        [profileInfo addObject:entry]; 
     1216                } 
     1217        } 
     1218  
     1219        [profileInfo addObject:UPDATE_GENERATION_DICT]; 
     1220        [profileInfo addObject:UPDATE_TYPE_DICT]; 
     1221        return profileInfo; 
    12211222} 
    12221223 
  • branches/adium-1.1/Source/AIAdium.m

    r20287 r20585  
    11881188#endif 
    11891189 
     1190//The first generation ended with 1.0.5 and 1.1. Our Sparkle Plus up to that point had a bug that left it unable to properly handle the sparkle:minimumSystemVersion element. 
     1191//The second generation began with 1.0.6 and 1.1.1, with a Sparkle Plus that can handle that element. 
     1192#define UPDATE_GENERATION_DICT [NSDictionary dictionaryWithObjectsAndKeys:@"generation", @"key", @"Appcast generation number", @"visibleKey", @"2", @"value", @"2", @"visibleValue", nil] 
     1193 
    11901194/* This method gives the delegate the opportunity to customize the information that will 
    11911195* be included with update checks.  Add or remove items from the dictionary as desired. 
     
    12011205         
    12021206        //If we're not sending profile information, return just the type of update we're looking for 
    1203         if (![[defaults objectForKey:SUSendProfileInfoKey] boolValue]) 
    1204                 return [NSMutableArray arrayWithObject:UPDATE_TYPE_DICT];  
    1205          
    1206         int now = [[NSCalendarDate date] dayOfCommonEra]; 
    1207          
    1208         if (abs([defaults integerForKey:@"AILastSubmittedProfileDate2"] - now) >= 7) { 
    1209                 [defaults setInteger:now forKey:@"AILastSubmittedProfileDate2"]; 
    1210                  
    1211                 NSString *value = ([defaults boolForKey:@"AIHasSentSparkleProfileInfo"]) ? @"no" : @"yes"; 
    1212                  
    1213                 NSDictionary *entry = [NSDictionary dictionaryWithObjectsAndKeys: 
    1214                         @"FirstSubmission", @"key",  
    1215                         @"First Time Submitting Profile Information", @"visibleKey", 
    1216                         value, @"value", 
    1217                         value, @"visibleValue", 
    1218                         nil]; 
    1219                  
    1220                 [profileInfo addObject:entry]; 
    1221                  
    1222                 [profileInfo addObject:UPDATE_TYPE_DICT]; 
    1223                  
    1224                 [defaults setBool:YES forKey:@"AIHasSentSparkleProfileInfo"]; 
    1225                  
    1226                 /*************** Include info about what IM services are used ************/ 
    1227                 NSMutableString *accountInfo = [NSMutableString string]; 
    1228                 NSCountedSet *condensedAccountInfo = [NSCountedSet set]; 
    1229                 NSEnumerator *accountEnu = [[[self accountController] accounts] objectEnumerator]; 
    1230                 AIAccount *account = nil; 
    1231                 while ((account = [accountEnu nextObject])) { 
    1232                         NSString *serviceID = [account serviceID]; 
    1233                         [accountInfo appendFormat:@"%@, ", serviceID]; 
    1234                         if([serviceID isEqualToString:@"Yahoo! Japan"]) serviceID = @"YJ"; 
    1235                         [condensedAccountInfo addObject:[NSString stringWithFormat:@"%@", [serviceID substringToIndex:2]]];  
    1236                 } 
    1237                  
    1238                 NSMutableString *accountInfoString = [NSMutableString string]; 
    1239                 NSEnumerator *infoEnu = [[[condensedAccountInfo allObjects] sortedArrayUsingSelector:@selector(compare:)] objectEnumerator]; 
    1240                 while ((value = [infoEnu nextObject])) 
    1241                         [accountInfoString appendFormat:@"%@%d", value, [condensedAccountInfo countForObject:value]]; 
    1242                  
    1243                 entry = [NSDictionary dictionaryWithObjectsAndKeys: 
    1244                         @"IMServices", @"key",  
    1245                         @"IM Services Used", @"visibleKey", 
    1246                         accountInfoString, @"value", 
    1247                         accountInfo, @"visibleValue", 
    1248                         nil]; 
    1249                 [profileInfo addObject:entry]; 
    1250                 return profileInfo; 
    1251  
    1252         } else { 
    1253                 return [NSMutableArray arrayWithObject:UPDATE_TYPE_DICT]; 
    1254         } 
     1207        if ([[defaults objectForKey:SUSendProfileInfoKey] boolValue]) { 
     1208                int now = [[NSCalendarDate date] dayOfCommonEra]; 
     1209 
     1210                if (abs([defaults integerForKey:@"AILastSubmittedProfileDate2"] - now) >= 7) { 
     1211                        [defaults setInteger:now forKey:@"AILastSubmittedProfileDate2"]; 
     1212                         
     1213                        NSString *value = ([defaults boolForKey:@"AIHasSentSparkleProfileInfo"]) ? @"no" : @"yes"; 
     1214                         
     1215                        NSDictionary *entry = [NSDictionary dictionaryWithObjectsAndKeys: 
     1216                                @"FirstSubmission", @"key",  
     1217                                @"First Time Submitting Profile Information", @"visibleKey", 
     1218                                value, @"value", 
     1219                                value, @"visibleValue", 
     1220                                nil]; 
     1221                         
     1222                        [profileInfo addObject:entry]; 
     1223                         
     1224                        [defaults setBool:YES forKey:@"AIHasSentSparkleProfileInfo"]; 
     1225                         
     1226                        /*************** Include info about what IM services are used ************/ 
     1227                        NSMutableString *accountInfo = [NSMutableString string]; 
     1228                        NSCountedSet *condensedAccountInfo = [NSCountedSet set]; 
     1229                        NSEnumerator *accountEnu = [[[self accountController] accounts] objectEnumerator]; 
     1230                        AIAccount *account = nil; 
     1231                        while ((account = [accountEnu nextObject])) { 
     1232                                NSString *serviceID = [account serviceID]; 
     1233                                [accountInfo appendFormat:@"%@, ", serviceID]; 
     1234                                if([serviceID isEqualToString:@"Yahoo! Japan"]) serviceID = @"YJ"; 
     1235                                [condensedAccountInfo addObject:[NSString stringWithFormat:@"%@", [serviceID substringToIndex:2]]];  
     1236                        } 
     1237                         
     1238                        NSMutableString *accountInfoString = [NSMutableString string]; 
     1239                        NSEnumerator *infoEnu = [[[condensedAccountInfo allObjects] sortedArrayUsingSelector:@selector(compare:)] objectEnumerator]; 
     1240                        while ((value = [infoEnu nextObject])) 
     1241                                [accountInfoString appendFormat:@"%@%d", value, [condensedAccountInfo countForObject:value]]; 
     1242                         
     1243                        entry = [NSDictionary dictionaryWithObjectsAndKeys: 
     1244                                @"IMServices", @"key",  
     1245                                @"IM Services Used", @"visibleKey", 
     1246                                accountInfoString, @"value", 
     1247                                accountInfo, @"visibleValue", 
     1248                                nil]; 
     1249                        [profileInfo addObject:entry]; 
     1250                } 
     1251        } 
     1252 
     1253        [profileInfo addObject:UPDATE_GENERATION_DICT]; 
     1254        [profileInfo addObject:UPDATE_TYPE_DICT]; 
     1255        return profileInfo; 
    12551256} 
    12561257 
  • trunk/Source/AIAdium.m

    r20484 r20585  
    12261226#endif 
    12271227 
     1228//The first generation ended with 1.0.5 and 1.1. Our Sparkle Plus up to that point had a bug that left it unable to properly handle the sparkle:minimumSystemVersion element. 
     1229//The second generation began with 1.0.6 and 1.1.1, with a Sparkle Plus that can handle that element. 
     1230#define UPDATE_GENERATION_DICT [NSDictionary dictionaryWithObjectsAndKeys:@"generation", @"key", @"Appcast generation number", @"visibleKey", @"2", @"value", @"2", @"visibleValue", nil] 
     1231 
    12281232/* This method gives the delegate the opportunity to customize the information that will 
    12291233* be included with update checks.  Add or remove items from the dictionary as desired. 
     
    12391243         
    12401244        //If we're not sending profile information, return just the type of update we're looking for 
    1241         if (![[defaults objectForKey:SUSendProfileInfoKey] boolValue]) 
    1242                 return [NSMutableArray arrayWithObject:UPDATE_TYPE_DICT];  
    1243          
    1244         int now = [[NSCalendarDate date] dayOfCommonEra]; 
    1245          
    1246         if (abs([defaults integerForKey:@"AILastSubmittedProfileDate2"] - now) >= 7) { 
    1247                 [defaults setInteger:now forKey:@"AILastSubmittedProfileDate2"]; 
    1248                  
    1249                 NSString *value = ([defaults boolForKey:@"AIHasSentSparkleProfileInfo"]) ? @"no" : @"yes"; 
    1250                  
    1251                 NSDictionary *entry = [NSDictionary dictionaryWithObjectsAndKeys: 
    1252                         @"FirstSubmission", @"key",  
    1253                         @"First Time Submitting Profile Information", @"visibleKey", 
    1254                         value, @"value", 
    1255                         value, @"visibleValue", 
    1256                         nil]; 
    1257                  
    1258                 [profileInfo addObject:entry]; 
    1259                  
    1260                 [profileInfo addObject:UPDATE_TYPE_DICT]; 
    1261                  
    1262                 [defaults setBool:YES forKey:@"AIHasSentSparkleProfileInfo"]; 
    1263                  
    1264                 /*************** Include info about what IM services are used ************/ 
    1265                 NSMutableString *accountInfo = [NSMutableString string]; 
    1266                 NSCountedSet *condensedAccountInfo = [NSCountedSet set]; 
    1267                 NSEnumerator *accountEnu = [[[self accountController] accounts] objectEnumerator]; 
    1268                 AIAccount *account = nil; 
    1269                 while ((account = [accountEnu nextObject])) { 
    1270                         NSString *serviceID = [account serviceID]; 
    1271                         [accountInfo appendFormat:@"%@, ", serviceID]; 
    1272                         if([serviceID isEqualToString:@"Yahoo! Japan"]) serviceID = @"YJ"; 
    1273                         [condensedAccountInfo addObject:[NSString stringWithFormat:@"%@", [serviceID substringToIndex:2]]];  
    1274                 } 
    1275                  
    1276                 NSMutableString *accountInfoString = [NSMutableString string]; 
    1277                 NSEnumerator *infoEnu = [[[condensedAccountInfo allObjects] sortedArrayUsingSelector:@selector(compare:)] objectEnumerator]; 
    1278                 while ((value = [infoEnu nextObject])) 
    1279                         [accountInfoString appendFormat:@"%@%d", value, [condensedAccountInfo countForObject:value]]; 
    1280                  
    1281                 entry = [NSDictionary dictionaryWithObjectsAndKeys: 
    1282                         @"IMServices", @"key",  
    1283                         @"IM Services Used", @"visibleKey", 
    1284                         accountInfoString, @"value", 
    1285                         accountInfo, @"visibleValue", 
    1286                         nil]; 
    1287                 [profileInfo addObject:entry]; 
    1288                 return profileInfo; 
    1289  
    1290         } else { 
    1291                 return [NSMutableArray arrayWithObject:UPDATE_TYPE_DICT]; 
    1292         } 
     1245        if ([[defaults objectForKey:SUSendProfileInfoKey] boolValue]) { 
     1246                int now = [[NSCalendarDate date] dayOfCommonEra]; 
     1247 
     1248                if (abs([defaults integerForKey:@"AILastSubmittedProfileDate2"] - now) >= 7) { 
     1249                        [defaults setInteger:now forKey:@"AILastSubmittedProfileDate2"]; 
     1250                         
     1251                        NSString *value = ([defaults boolForKey:@"AIHasSentSparkleProfileInfo"]) ? @"no" : @"yes"; 
     1252                         
     1253                        NSDictionary *entry = [NSDictionary dictionaryWithObjectsAndKeys: 
     1254                                @"FirstSubmission", @"key",  
     1255                                @"First Time Submitting Profile Information", @"visibleKey", 
     1256                                value, @"value", 
     1257                                value, @"visibleValue", 
     1258                                nil]; 
     1259                         
     1260                        [profileInfo addObject:entry]; 
     1261                         
     1262                        [defaults setBool:YES forKey:@"AIHasSentSparkleProfileInfo"]; 
     1263                         
     1264                        /*************** Include info about what IM services are used ************/ 
     1265                        NSMutableString *accountInfo = [NSMutableString string]; 
     1266                        NSCountedSet *condensedAccountInfo = [NSCountedSet set]; 
     1267                        NSEnumerator *accountEnu = [[[self accountController] accounts] objectEnumerator]; 
     1268                        AIAccount *account = nil; 
     1269                        while ((account = [accountEnu nextObject])) { 
     1270                                NSString *serviceID = [account serviceID]; 
     1271                                [accountInfo appendFormat:@"%@, ", serviceID]; 
     1272                                if([serviceID isEqualToString:@"Yahoo! Japan"]) serviceID = @"YJ"; 
     1273                                [condensedAccountInfo addObject:[NSString stringWithFormat:@"%@", [serviceID substringToIndex:2]]];  
     1274                        } 
     1275                         
     1276                        NSMutableString *accountInfoString = [NSMutableString string]; 
     1277                        NSEnumerator *infoEnu = [[[condensedAccountInfo allObjects] sortedArrayUsingSelector:@selector(compare:)] objectEnumerator]; 
     1278                        while ((value = [infoEnu nextObject])) 
     1279                                [accountInfoString appendFormat:@"%@%d", value, [condensedAccountInfo countForObject:value]]; 
     1280                         
     1281                        entry = [NSDictionary dictionaryWithObjectsAndKeys: 
     1282                                @"IMServices", @"key",  
     1283                                @"IM Services Used", @"visibleKey", 
     1284                                accountInfoString, @"value", 
     1285                                accountInfo, @"visibleValue", 
     1286                                nil]; 
     1287                        [profileInfo addObject:entry]; 
     1288                } 
     1289        } 
     1290 
     1291        [profileInfo addObject:UPDATE_GENERATION_DICT]; 
     1292        [profileInfo addObject:UPDATE_TYPE_DICT]; 
     1293        return profileInfo; 
    12931294} 
    12941295