Index: modules/services/services/simplenews_service/simplenews_service.module
===================================================================
RCS file: modules/services/services/simplenews_service/simplenews_service.module
diff -N modules/services/services/simplenews_service/simplenews_service.module
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ modules/services/services/simplenews_service/simplenews_service.module	1 Jan 1970 00:00:00 -0000
@@ -0,0 +1,88 @@
+<?php
+// $Id: simplenews_service.module,v 1.0.0.0 2007/01/21 18:18:00 g10 Exp $
+
+/**
+ * Implementation of hook_help().
+ */
+function simplenews_service_help($section) {
+  switch ($section) {
+    case 'admin/help#services_menu':
+      return t('<p>Provides simplenews methods to services applications. Requires services.module and simplenews.module.</p>');
+    case 'admin/modules#description':
+    	return t('Provides simplenews methods to services applications. Requires services.module and simplenews.module.');
+  }
+}
+
+/**
+ * Implementation of hook_service()
+ */
+function simplenews_service_service() {
+  return array(
+    
+    // simplenews.subscribe
+    array(
+      '#method'   => 'simplenews.subscribe',
+      '#callback' => 'simplenews_service_subscribe',
+      '#args'     => array(
+        array(
+          '#name'         => 'subscriber_mail',
+          '#type'         => 'string',
+          '#description'  => t('The e-mail address to subscribe to the newsletter.')),
+        array(
+          '#name'         => 'newsletter_id_to_subscribe',
+          '#type'         => 'int',
+          '#description'  => t('The term ID of the newsletter.')),
+        array(
+          '#name'         => 'confirmation_email',
+          '#type'         => 'boolean',
+          '#optional'	  => TRUE,
+          '#description'  => t('Whether we should send a confirmation e-mail and hold off adding this user to the newsletter until he or she clicks the confirm link in the e-mail.'))),
+      '#return'   => 'struct',
+      '#help'     => t('Subscribes an email to a given Simplenews newsletter.')),
+    // simplenews.unsubscribe
+    array(
+      '#method'   => 'simplenews.unsubscribe',
+      '#callback' => 'simplenews_service_unsubscribe',
+      '#args'     => array(
+        array(
+          '#name'         => 'subscriber_mail',
+          '#type'         => 'string',
+          '#description'  => t('The e-mail address to unsubscribe from the newsletter.')),
+        array(
+          '#name'         => 'newsletter_id_to_subscribe',
+          '#type'         => 'int',
+          '#description'  => t('The term ID of the newsletter.')),
+        array(
+          '#name'         => 'confirmation_email',
+          '#type'         => 'boolean',
+          '#optional'	  => TRUE,
+          '#description'  => t('Whether we should send a confirmation e-mail and hold off removing this user from the newsletter until he clicks the confirm link in the e-mail.'))),
+      '#return'   => 'struct',
+      '#help'     => t('Unsubscribes an email from a given Simplenews newsletter.')),
+      
+ 
+  );
+}
+
+/**
+ * Subscribes an email to a given Simplenews newsletter.
+ */
+function simplenews_service_subscribe($subscriber_mail, $newsletter_id_to_subscribe, $confirmation_email = TRUE) {
+	
+	
+  $result = simplenews_subscribe_user($subscriber_mail, $newsletter_id_to_subscribe, $confirmation_email);
+    
+  return $result;
+}
+
+/**
+ * Unsubscribes an email from a given Simplenews newsletter.
+ */
+function simplenews_service_unsubscribe($subscriber_mail, $newsletter_id_to_unsubscribe, $confirmation_email = TRUE) {
+	
+	
+  $result = simplenews_unsubscribe_user($subscriber_mail, $newsletter_id_to_unsubscribe, $confirmation_email);
+    
+  return $result;
+}
+
Index: modules/services/services/simplenews_service/simplenews_service.info
===================================================================
RCS file: modules/services/services/simplenews_service/simplenews_service.info
diff -N modules/services/services/simplenews_service/simplenews_service.info
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ modules/services/services/simplenews_service/simplenews_service.info	1 Jan 1970 00:00:00 -0000
@@ -0,0 +1,8 @@
+; $Id: simplenews_service.info,v 1.0.0.0 2007/01/21 18:17:00 g10 Exp $
+name = Simplenews Service
+description = Provides a service to interface with the simplenews module.
+package = Services - services
+dependencies = services simplenews
+version = "5.x-1.x-dev"
+project = "services"
+
