[cheese] cheese-camera: using const char * when appropriate
- From: Luciana Fujii Pontello <lufujii src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cheese] cheese-camera: using const char * when appropriate
- Date: Sun, 30 Jan 2011 19:47:33 +0000 (UTC)
commit b0275d157eb91609b2c2edefbc82c8b706713b94
Author: Luciana Fujii Pontello <luciana fujii eti br>
Date: Fri Jan 28 20:36:15 2011 -0200
cheese-camera: using const char * when appropriate
Filenames and other string parameters used to set properties can be
const.
libcheese/cheese-camera.c | 14 +++++++-------
libcheese/cheese-camera.h | 12 ++++++------
2 files changed, 13 insertions(+), 13 deletions(-)
---
diff --git a/libcheese/cheese-camera.c b/libcheese/cheese-camera.c
index 4a0542e..66b31e2 100644
--- a/libcheese/cheese-camera.c
+++ b/libcheese/cheese-camera.c
@@ -884,7 +884,7 @@ cheese_camera_connect_effect_texture (CheeseCamera *camera, CheeseEffect *effect
}
void
-cheese_camera_start_video_recording (CheeseCamera *camera, char *filename)
+cheese_camera_start_video_recording (CheeseCamera *camera, const char *filename)
{
CheeseCameraPrivate *priv = CHEESE_CAMERA_GET_PRIVATE (camera);
@@ -936,7 +936,7 @@ cheese_camera_stop_video_recording (CheeseCamera *camera)
}
gboolean
-cheese_camera_take_photo (CheeseCamera *camera, char *filename)
+cheese_camera_take_photo (CheeseCamera *camera, const char *filename)
{
CheeseCameraPrivate *priv = CHEESE_CAMERA_GET_PRIVATE (camera);
@@ -1168,14 +1168,14 @@ cheese_camera_new (ClutterTexture *video_texture, char *camera_device_name,
void
-cheese_camera_set_device_by_dev_file (CheeseCamera *camera, gchar *file)
+cheese_camera_set_device_by_dev_file (CheeseCamera *camera, const gchar *file)
{
g_return_if_fail (CHEESE_IS_CAMERA (camera));
g_object_set (camera, "device_name", file, NULL);
}
static void
-cheese_camera_set_device_by_dev_udi (CheeseCamera *camera, gchar *udi)
+cheese_camera_set_device_by_dev_udi (CheeseCamera *camera, const gchar *udi)
{
CheeseCameraPrivate *priv = CHEESE_CAMERA_GET_PRIVATE (camera);
int i;
@@ -1196,7 +1196,7 @@ cheese_camera_set_device_by_dev_udi (CheeseCamera *camera, gchar *udi)
}
}
void
-cheese_camera_setup (CheeseCamera *camera, char *id, GError **error)
+cheese_camera_setup (CheeseCamera *camera, const char *id, GError **error)
{
CheeseCameraPrivate *priv = CHEESE_CAMERA_GET_PRIVATE (camera);
@@ -1320,7 +1320,7 @@ cheese_camera_get_current_video_format (CheeseCamera *camera)
gboolean
cheese_camera_get_balance_property_range (CheeseCamera *camera,
- gchar *property,
+ const gchar *property,
gdouble *min, gdouble *max, gdouble *def)
{
CheeseCameraPrivate *priv;
@@ -1349,7 +1349,7 @@ cheese_camera_get_balance_property_range (CheeseCamera *camera,
}
void
-cheese_camera_set_balance_property (CheeseCamera *camera, gchar *property, gdouble value)
+cheese_camera_set_balance_property (CheeseCamera *camera, const gchar *property, gdouble value)
{
CheeseCameraPrivate *priv;
diff --git a/libcheese/cheese-camera.h b/libcheese/cheese-camera.h
index 832fcd6..e37af8e 100644
--- a/libcheese/cheese-camera.h
+++ b/libcheese/cheese-camera.h
@@ -68,28 +68,28 @@ CheeseCamera *cheese_camera_new (ClutterTexture *video_texture,
int y_resolution);
const CheeseVideoFormat *cheese_camera_get_current_video_format (CheeseCamera *camera);
-void cheese_camera_setup (CheeseCamera *camera, char *udi, GError **error);
+void cheese_camera_setup (CheeseCamera *camera, const char *udi, GError **error);
void cheese_camera_play (CheeseCamera *camera);
void cheese_camera_stop (CheeseCamera *camera);
void cheese_camera_set_effect (CheeseCamera *camera, CheeseEffect *effect);
void cheese_camera_connect_effect_texture (CheeseCamera *camera,
CheeseEffect *effect,
ClutterTexture *texture);
-void cheese_camera_start_video_recording (CheeseCamera *camera, char *filename);
+void cheese_camera_start_video_recording (CheeseCamera *camera, const char *filename);
void cheese_camera_stop_video_recording (CheeseCamera *camera);
-gboolean cheese_camera_take_photo (CheeseCamera *camera, char *filename);
+gboolean cheese_camera_take_photo (CheeseCamera *camera, const char *filename);
gboolean cheese_camera_take_photo_pixbuf (CheeseCamera *camera);
CheeseCameraDevice *cheese_camera_get_selected_device (CheeseCamera *camera);
GPtrArray * cheese_camera_get_camera_devices (CheeseCamera *camera);
-void cheese_camera_set_device_by_dev_file (CheeseCamera *camera, char *file);
+void cheese_camera_set_device_by_dev_file (CheeseCamera *camera, const char *file);
void cheese_camera_switch_camera_device (CheeseCamera *camera);
GList * cheese_camera_get_video_formats (CheeseCamera *camera);
void cheese_camera_set_video_format (CheeseCamera *camera,
CheeseVideoFormat *format);
gboolean cheese_camera_get_balance_property_range (CheeseCamera *camera,
- gchar *property,
+ const gchar *property,
gdouble *min, gdouble *max, gdouble *def);
-void cheese_camera_set_balance_property (CheeseCamera *camera, gchar *property, gdouble value);
+void cheese_camera_set_balance_property (CheeseCamera *camera, const gchar *property, gdouble value);
void cheese_camera_toggle_effects_pipeline (CheeseCamera *camera, gboolean active);
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]