View | Details | Raw Unified | Return to bug 118281
Collapse All | Expand All

(-)./ChangeLog (+12 lines)
Lines 1-3 Link Here
1
2005-09-21  Aaron Bockover  <aaron@aaronbock.net>
2
	
3
	* configure.ac: Version 0.3.3
4
5
2005-09-08  Aaron Bockover  <aaron@aaronbock.net>
6
7
	* src/ipod-device.c: Added iPod Nano model information to detection table
8
	and new GObject property for getting a string version of the model type
9
	name (i.e. MODEL_TYPE_NANO_WHITE -> "Nano (White)")
10
	* src/ipod-device.h: Added MODEL_TYPE_NANO_WHITE and MODEL_TYPE_NANO_BLACK,
11
	also PROP_DEVICE_MODEL_STRING
12
1
2005-09-07  Aaron Bockover  <aaron@aaronbock.net>
13
2005-09-07  Aaron Bockover  <aaron@aaronbock.net>
2
14
3
	* configure.ac: Version 0.3.2
15
	* configure.ac: Version 0.3.2
(-)./configure (-1 / +1 lines)
Lines 1825-1831 Link Here
1825
1825
1826
# Define the identity of the package.
1826
# Define the identity of the package.
1827
 PACKAGE=libipoddevice
1827
 PACKAGE=libipoddevice
1828
 VERSION=0.3.2
1828
 VERSION=0.3.3
1829
1829
1830
1830
1831
cat >>confdefs.h <<_ACEOF
1831
cat >>confdefs.h <<_ACEOF
(-)./configure.ac (-1 / +1 lines)
Lines 3-9 Link Here
3
AC_INIT(src/ipod-device.c)
3
AC_INIT(src/ipod-device.c)
4
AM_CONFIG_HEADER(config.h)
4
AM_CONFIG_HEADER(config.h)
5
AC_CONFIG_SRCDIR(src)
5
AC_CONFIG_SRCDIR(src)
6
AM_INIT_AUTOMAKE(libipoddevice, 0.3.2)
6
AM_INIT_AUTOMAKE(libipoddevice, 0.3.3)
7
7
8
AM_MAINTAINER_MODE
8
AM_MAINTAINER_MODE
9
AC_PROG_CC
9
AC_PROG_CC
(-)./src/ipod-device.c (-18 / +41 lines)
Lines 110-121 Link Here
110
	{"9724", GB / 2, MODEL_TYPE_SHUFFLE,     FOURTH_GENERATION},
110
	{"9724", GB / 2, MODEL_TYPE_SHUFFLE,     FOURTH_GENERATION},
111
	{"9725", GB,     MODEL_TYPE_SHUFFLE,     FOURTH_GENERATION},
111
	{"9725", GB,     MODEL_TYPE_SHUFFLE,     FOURTH_GENERATION},
112
	
112
	
113
	/* Nano / Fourth Generation */
114
	{"A004", GB * 2, MODEL_TYPE_NANO_WHITE,  FOURTH_GENERATION},
115
	{"A099", GB * 2, MODEL_TYPE_NANO_BLACK,  FOURTH_GENERATION},
116
	{"A005", GB * 4, MODEL_TYPE_NANO_WHITE,  FOURTH_GENERATION},
117
	{"A107", GB * 4, MODEL_TYPE_NANO_BLACK,  FOURTH_GENERATION},
118
	
113
	/* HP iPods, need contributions for this table */
119
	/* HP iPods, need contributions for this table */
114
	{"E436", 40 * GB, MODEL_TYPE_REGULAR, FOURTH_GENERATION},
120
	{"E436", 40 * GB, MODEL_TYPE_REGULAR, FOURTH_GENERATION},
115
	
121
	
116
	{NULL, 0, 0, 0}
122
	{NULL, 0, 0, 0}
117
};
123
};
118
124
125
static const gchar *ipod_model_name_table [] = {
126
	"Invalid",
127
	"Unknown",
128
	"Color",
129
	"Color U2",
130
	"Grayscale",
131
	"Grayscale U2",
132
	"Mini (Silver)",
133
	"Mini (Blue)",
134
	"Mini (Pink)",
135
	"Mini (Green)",
136
	"Mini (Gold)",
137
	"Shuffle",
138
	"Nano (White)",
139
	"Nano (Black)",
140
	NULL
141
};
142
119
#define g_free_if_not_null(o) \
143
#define g_free_if_not_null(o) \
120
    if(o != NULL) {           \
144
    if(o != NULL) {           \
121
        g_free(o);            \
145
        g_free(o);            \
Lines 254-259 Link Here
254
			g_value_set_uint(value, 
278
			g_value_set_uint(value, 
255
				ipod_model_table[device->priv->model_index].model_type);
279
				ipod_model_table[device->priv->model_index].model_type);
256
			break;
280
			break;
281
		case PROP_DEVICE_MODEL_STRING:
282
			g_value_set_string(value,
283
				ipod_model_name_table[ipod_model_table[
284
					device->priv->model_index].model_type]);
285
			break;
257
		case PROP_DEVICE_GENERATION:
286
		case PROP_DEVICE_GENERATION:
258
			g_value_set_uint(value, 
287
			g_value_set_uint(value, 
259
				ipod_model_table[device->priv->model_index].generation);
288
				ipod_model_table[device->priv->model_index].generation);
Lines 377-382 Link Here
377
	GParamSpec *device_path_param;
406
	GParamSpec *device_path_param;
378
	GParamSpec *control_path_param;
407
	GParamSpec *control_path_param;
379
	GParamSpec *device_model_param;
408
	GParamSpec *device_model_param;
409
	GParamSpec *device_model_string_param;
380
	GParamSpec *device_name_param;
410
	GParamSpec *device_name_param;
381
	GParamSpec *user_name_param;
411
	GParamSpec *user_name_param;
382
	GParamSpec *host_name_param;
412
	GParamSpec *host_name_param;
Lines 421-426 Link Here
421
	device_model_param = g_param_spec_uint("device-model", "Device Model",
451
	device_model_param = g_param_spec_uint("device-model", "Device Model",
422
		"Type of iPod (Regular, Photo, Shuffle)", 0, 2, 0, G_PARAM_READABLE);
452
		"Type of iPod (Regular, Photo, Shuffle)", 0, 2, 0, G_PARAM_READABLE);
423
	
453
	
454
	device_model_string_param = g_param_spec_string("device-model-string",
455
		"Device Model String", "String type of iPod (Regular, Shuffle)",
456
		NULL, G_PARAM_READABLE);
457
	
424
	device_name_param = g_param_spec_string("device-name", "Device Name",
458
	device_name_param = g_param_spec_string("device-name", "Device Name",
425
		"The user-assigned name of their iPod", NULL, G_PARAM_READWRITE);
459
		"The user-assigned name of their iPod", NULL, G_PARAM_READWRITE);
426
		 
460
		 
Lines 504-509 Link Here
504
	g_object_class_install_property(class, PROP_DEVICE_MODEL, 
538
	g_object_class_install_property(class, PROP_DEVICE_MODEL, 
505
		device_model_param);
539
		device_model_param);
506
		
540
		
541
	g_object_class_install_property(class, PROP_DEVICE_MODEL_STRING,
542
		device_model_string_param);
543
		
507
	g_object_class_install_property(class, PROP_DEVICE_NAME, 
544
	g_object_class_install_property(class, PROP_DEVICE_NAME, 
508
		device_name_param);
545
		device_name_param);
509
		
546
		
Lines 1496-1517 Link Here
1496
1533
1497
void
1534
void
1498
ipod_device_debug(IpodDevice *device)
1535
ipod_device_debug(IpodDevice *device)
1499
{
1536
{	
1500
	static const gchar *model_type_names [] = {
1501
		"Invalid",
1502
		"Unknown",
1503
		"Color",
1504
		"Color U2",
1505
		"Grayscale/Regular",
1506
		"Grayscale/Regular U2",
1507
		"Mini (Silver)",
1508
		"Mini (Blue)",
1509
		"Mini (Pink)",
1510
		"Mini (Green)",
1511
		"Mini (Gold)",
1512
		"Shuffle"
1513
	};
1514
	
1515
	static const gchar *generation_names [] = {
1537
	static const gchar *generation_names [] = {
1516
		"Unknown",
1538
		"Unknown",
1517
		"First",
1539
		"First",
Lines 1521-1527 Link Here
1521
	};
1543
	};
1522
	
1544
	
1523
	gchar *device_path, *mount_point, *control_path, *hal_id;
1545
	gchar *device_path, *mount_point, *control_path, *hal_id;
1524
	gchar *model_number, *adv_capacity;
1546
	gchar *model_number, *adv_capacity, *model_string;
1525
	guint model, generation;
1547
	guint model, generation;
1526
	gboolean is_new, can_write;
1548
	gboolean is_new, can_write;
1527
	gchar *serial_number, *firmware_version;
1549
	gchar *serial_number, *firmware_version;
Lines 1538-1543 Link Here
1538
		"hal-volume-id", &hal_id,
1560
		"hal-volume-id", &hal_id,
1539
		"model-number", &model_number,
1561
		"model-number", &model_number,
1540
		"device-model", &model,
1562
		"device-model", &model,
1563
		"device-model-string", &model_string,
1541
		"device-generation", &generation,
1564
		"device-generation", &generation,
1542
		"advertised-capacity", &adv_capacity,
1565
		"advertised-capacity", &adv_capacity,
1543
		"is-new", &is_new,
1566
		"is-new", &is_new,
Lines 1562-1568 Link Here
1562
	
1585
	
1563
	g_printf("Device Info\n");
1586
	g_printf("Device Info\n");
1564
	g_printf("   Model Number:     %s\n", model_number);
1587
	g_printf("   Model Number:     %s\n", model_number);
1565
	g_printf("   Device Model:     %s\n", model_type_names[model]);
1588
	g_printf("   Device Model:     %s\n", model_string);
1566
	g_printf("   iPod Generation:  %s\n", generation_names[generation]);
1589
	g_printf("   iPod Generation:  %s\n", generation_names[generation]);
1567
	g_printf("   Adv. Capacity:    %s\n", adv_capacity);
1590
	g_printf("   Adv. Capacity:    %s\n", adv_capacity);
1568
	g_printf("   Is New:           %s\n", is_new ? "YES" : "NO");
1591
	g_printf("   Is New:           %s\n", is_new ? "YES" : "NO");
(-)./src/ipod-device.h (-1 / +4 lines)
Lines 71-77 Link Here
71
	MODEL_TYPE_MINI_PINK,
71
	MODEL_TYPE_MINI_PINK,
72
	MODEL_TYPE_MINI_GREEN,
72
	MODEL_TYPE_MINI_GREEN,
73
	MODEL_TYPE_MINI_GOLD,
73
	MODEL_TYPE_MINI_GOLD,
74
	MODEL_TYPE_SHUFFLE
74
	MODEL_TYPE_SHUFFLE,
75
	MODEL_TYPE_NANO_WHITE,
76
	MODEL_TYPE_NANO_BLACK
75
};
77
};
76
78
77
enum {
79
enum {
Lines 88-93 Link Here
88
	PROP_DEVICE_PATH,
90
	PROP_DEVICE_PATH,
89
	PROP_CONTROL_PATH,
91
	PROP_CONTROL_PATH,
90
	PROP_DEVICE_MODEL,
92
	PROP_DEVICE_MODEL,
93
	PROP_DEVICE_MODEL_STRING,
91
	PROP_DEVICE_GENERATION,
94
	PROP_DEVICE_GENERATION,
92
	PROP_ADVERTISED_CAPACITY,
95
	PROP_ADVERTISED_CAPACITY,
93
	PROP_DEVICE_NAME,
96
	PROP_DEVICE_NAME,

Return to bug 118281