[maemo-commits] [maemo-commits] r10277 - in projects/haf/trunk/libosso: debian src

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Thu Mar 1 13:12:35 EET 2007
Author: kihamala
Date: 2007-03-01 13:12:15 +0200 (Thu, 01 Mar 2007)
New Revision: 10277

Removed:
   projects/haf/trunk/libosso/src/osso-application-exit.c
Modified:
   projects/haf/trunk/libosso/debian/changelog
   projects/haf/trunk/libosso/src/Makefile.am
   projects/haf/trunk/libosso/src/Makefile.in
   projects/haf/trunk/libosso/src/libosso.h
   projects/haf/trunk/libosso/src/osso-state.c
Log:
removed some deprecated API


Modified: projects/haf/trunk/libosso/debian/changelog
===================================================================
--- projects/haf/trunk/libosso/debian/changelog	2007-03-01 10:28:53 UTC (rev 10276)
+++ projects/haf/trunk/libosso/debian/changelog	2007-03-01 11:12:15 UTC (rev 10277)
@@ -1,3 +1,12 @@
+libosso (2.1-1) unstable; urgency=low
+
+  * UNRELEASED
+  * Removed deprecated API: osso_application_exit_cb type,
+    osso_application_set_exit_cb(), osso_state_open_write(),
+    osso_state_open_read(), osso_state_close().
+
+ -- Kimmo Hämäläinen <kimmo.hamalainen at nokia.com>  Thu, 01 Mar 2007 13:07:43 +0200
+
 libosso (2.0-1) unstable; urgency=low
 
   * Branched the code (1.x branch is the maintenance branch).

Modified: projects/haf/trunk/libosso/src/Makefile.am
===================================================================
--- projects/haf/trunk/libosso/src/Makefile.am	2007-03-01 10:28:53 UTC (rev 10276)
+++ projects/haf/trunk/libosso/src/Makefile.am	2007-03-01 11:12:15 UTC (rev 10277)
@@ -37,7 +37,6 @@
 	osso-time.c \
 	osso-time.h \
 	osso-application-init.c \
-	osso-application-exit.c \
 	osso-mem.h \
 	osso-mem.c \
 	muali.h

Modified: projects/haf/trunk/libosso/src/Makefile.in
===================================================================
--- projects/haf/trunk/libosso/src/Makefile.in	2007-03-01 10:28:53 UTC (rev 10276)
+++ projects/haf/trunk/libosso/src/Makefile.in	2007-03-01 11:12:15 UTC (rev 10277)
@@ -58,13 +58,12 @@
 	osso-application-top.lo osso-application-autosave.lo \
 	osso-hw.lo osso-mime.lo osso-system-note.lo osso-rpc.lo \
 	osso-statusbar.lo osso-cp-plugin.lo osso-log.lo osso-time.lo \
-	osso-application-init.lo osso-application-exit.lo osso-mem.lo
+	osso-application-init.lo osso-mem.lo
 libosso_la_OBJECTS = $(am_libosso_la_OBJECTS)
 DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
 depcomp = $(SHELL) $(top_srcdir)/depcomp
 am__depfiles_maybe = depfiles
 @AMDEP_TRUE at DEP_FILES = ./$(DEPDIR)/osso-application-autosave.Plo \
- at AMDEP_TRUE@	./$(DEPDIR)/osso-application-exit.Plo \
 @AMDEP_TRUE@	./$(DEPDIR)/osso-application-init.Plo \
 @AMDEP_TRUE@	./$(DEPDIR)/osso-application-top.Plo \
 @AMDEP_TRUE@	./$(DEPDIR)/osso-cp-plugin.Plo \
@@ -243,7 +242,6 @@
 	osso-time.c \
 	osso-time.h \
 	osso-application-init.c \
-	osso-application-exit.c \
 	osso-mem.h \
 	osso-mem.c \
 	muali.h
@@ -318,7 +316,6 @@
 	-rm -f *.tab.c
 
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/osso-application-autosave.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/osso-application-exit.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/osso-application-init.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/osso-application-top.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/osso-cp-plugin.Plo at am__quote@

Modified: projects/haf/trunk/libosso/src/libosso.h
===================================================================
--- projects/haf/trunk/libosso/src/libosso.h	2007-03-01 10:28:53 UTC (rev 10276)
+++ projects/haf/trunk/libosso/src/libosso.h	2007-03-01 11:12:15 UTC (rev 10277)
@@ -1296,66 +1296,6 @@
  */
 gpointer osso_get_sys_dbus_connection(osso_context_t *osso);
 
-
-
-/************************************************************************/
-/************************************************************************/
-/*******         OBSOLETE API BELOW -- DO NOT USE                     ***/
-/************************************************************************/
-/************************************************************************/
-
-/**
- * \defgroup outside Not included
- *
- * @note
- * This API is obsolete and should not be used by new code.
- *
- */
-/* @{*/
-
-/**
- * @deprecated Obsolete type -- do not use.
- */
-typedef void (osso_application_exit_cb)(gboolean die_now, gpointer data);
-
-/**
- * @deprecated This function is obsolete and does nothing. Do not use it.
- */
-osso_return_t osso_application_set_exit_cb(osso_context_t *osso,
-					   osso_application_exit_cb *cb,
-					   gpointer data);
-
-/**
- * This function opens a state file for writing. If the state file already
- * exists, it will be silently truncated.
- * @deprecated Use the more robust osso_state_write() function instead.
- * No new code should use this function.
- * @param osso The library context as returned by #osso_initialize.
- * @return the file descriptor of the opened file. On an error -1 is
- * returned.
- */
-int osso_state_open_write(osso_context_t *osso);
-
-/**
- * This function opens a state file for reading.
- * @deprecated Use the more robust osso_state_read() function instead.
- * No new code should use this function.
- * @param osso The library context as returned by #osso_initialize.
- * @return The file descriptor of the opened file. On an error -1 is
- * returned.
- */
-int osso_state_open_read(osso_context_t *osso);
-
-/**
- * This function closes the state file.
- * @deprecated Use the more robust osso_state_read() and 
- * osso_state_write() functions instead. No new code should use this
- * function.
- * @param osso The library context as returned by #osso_initialize.
- * @param fd The file descriptor to close.
- */
-void osso_state_close(osso_context_t *osso, gint fd);
-
 /*@}*/
 G_END_DECLS
 

Deleted: projects/haf/trunk/libosso/src/osso-application-exit.c
===================================================================
--- projects/haf/trunk/libosso/src/osso-application-exit.c	2007-03-01 10:28:53 UTC (rev 10276)
+++ projects/haf/trunk/libosso/src/osso-application-exit.c	2007-03-01 11:12:15 UTC (rev 10277)
@@ -1,39 +0,0 @@
-/**
- * @file osso-application-exit.c
- * This file implements functionality related the exit and exit_if_possible
- * signals.
- * 
- * This file is part of libosso
- *
- * Copyright (C) 2005-2006 Nokia Corporation. All rights reserved.
- *
- * Contact: Kimmo Hämäläinen <kimmo.hamalainen at nokia.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License
- * version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA
- */
-
-#include "libosso.h"
-#include "osso-log.h"
-#include <stdio.h>
-
-osso_return_t osso_application_set_exit_cb(osso_context_t *osso,
-					   osso_application_exit_cb *cb,
-					   gpointer data)
-{
-    fprintf(stderr, "WARNING: osso_application_set_exit_cb()"
-                    " is obsolete and a no-op.\n");
-    ULOG_WARN_F("This function is obsolete");
-    return OSSO_OK;
-}

Modified: projects/haf/trunk/libosso/src/osso-state.c
===================================================================
--- projects/haf/trunk/libosso/src/osso-state.c	2007-03-01 10:28:53 UTC (rev 10276)
+++ projects/haf/trunk/libosso/src/osso-state.c	2007-03-01 11:12:15 UTC (rev 10277)
@@ -136,122 +136,6 @@
     return ret;
 }
 
-/************************************************************************/
-int osso_state_open_write(osso_context_t *osso)
-{
-    gint fd = -1;
-    gchar *tmpdir_path  = NULL;
-    gchar *path = NULL, *app_path = NULL;
-    struct stat statbuf;
-
-    if (!validate_osso_context(osso)) {
-      ULOG_ERR_F("appname/version invalid or osso context NULL");
-      return -1;
-    }
-    
-    tmpdir_path = getenv(LOCATION_VAR);
-    
-    if (tmpdir_path != NULL)
-      {
-	path = g_strconcat(tmpdir_path, "/",
-			   osso->application, "/",
-			   osso->version, NULL);
-      }
-    else
-      {
-	path = g_strconcat(FALLBACK_PREFIX "/",
-			   osso->application, "/",
-			   osso->version, NULL);
-      }
-
-    if (path == NULL) {
-      ULOG_ERR_F("Allocation of application/version string failed");
-      return -1;
-    }
-    
-    /* Check for the existence of application directory. */
-
-    if (tmpdir_path == NULL)
-      {
-	app_path = g_strconcat(FALLBACK_PREFIX "/",
-			       osso->application,
-			       NULL);
-      }
-    else {
-      app_path = g_strconcat(tmpdir_path, "/", osso->application, NULL);
-      
-    }
-    if (app_path == NULL) {
-      ULOG_ERR_F("Allocation of application string failed");
-      g_free(path);
-      return -1;
-    }
-    if (stat(app_path, &statbuf) != -1) {
-      if (!S_ISDIR(statbuf.st_mode)) {
-	ULOG_ERR_F("Other type of file instead of app directory");
-	g_free(app_path);
-	g_free(path);
-	return -1;
-      }
-    } else {
-
-      /* It's the responsibility of the startup scripts to create
-	 the directory path contained in the STATESAVEDIR env var */
-
-      if (mkdir(app_path, S_IRUSR | S_IWUSR | S_IXUSR) != 0) {
-	ULOG_ERR_F("Could not create application state directory");
-	g_free(app_path);
-	g_free(path);
-	return -1;
-      }
-    }
-    
-    g_free(app_path);
-    if ((fd = open(path, O_WRONLY | O_CREAT | O_TRUNC,
-		   S_IRUSR | S_IWUSR)) == -1) {
-      ULOG_ERR_F("Opening of state file failed");
-    }
-    g_free(path);
-    return fd;
-}
-
-
-/************************************************************************/
-int osso_state_open_read(osso_context_t *osso)
-{
-    gint fd = -1;
-    gchar *tmpdir_path  = NULL;
-    gchar *path = NULL;
-
-    if (!validate_osso_context(osso)) {
-      ULOG_ERR_F("appname/version invalid or osso context NULL");
-      return -1;
-    }
-
-    /* Create the filename path from application name and version. */
-    tmpdir_path = getenv(LOCATION_VAR);
-    if (tmpdir_path == NULL)
-      {
-	path = g_strconcat(FALLBACK_PREFIX "/",
-			   osso->application, "/",
-			   osso->version, NULL);
-      }
-    else {
-      path = g_strconcat(tmpdir_path, "/",
-			 osso->application, "/",
-			 osso->version, NULL);
-      }
-    if (path == NULL) {
-      ULOG_ERR_F("Allocation of application/version string failed");
-      return -1;
-    }
-    if ((fd = open(path, O_RDONLY)) == -1) {
-      ULOG_ERR_F("Opening of state file failed");
-    }
-    g_free(path);
-    return fd;
-}
-
 static gboolean reliable_close(int fd)
 {
     do {
@@ -265,12 +149,6 @@
 }
 
 /************************************************************************/
-void osso_state_close(osso_context_t * osso, gint fd)
-{
-    reliable_close(fd);
-}
-
-/************************************************************************/
 static osso_return_t _read_state(const gchar *statefile, osso_state_t *state)
 {
     osso_return_t ret=OSSO_OK;


More information about the maemo-commits mailing list