[PHP-CVS] cvs: php4 /ext/rpc/skeleton php_skeleton.h skeleton.c skeleton.h

2003-02-19 Thread Jon Parise
jon Wed Feb 19 16:36:00 2003 EDT

  Modified files:  
/php4/ext/rpc/skeleton  php_skeleton.h skeleton.c skeleton.h 
  Log:
  Add folding markers and editor directive blocks.
  
  
Index: php4/ext/rpc/skeleton/php_skeleton.h
diff -u php4/ext/rpc/skeleton/php_skeleton.h:1.1 
php4/ext/rpc/skeleton/php_skeleton.h:1.2
--- php4/ext/rpc/skeleton/php_skeleton.h:1.1Thu Jan 16 13:46:58 2003
+++ php4/ext/rpc/skeleton/php_skeleton.hWed Feb 19 16:35:59 2003
@@ -22,4 +22,12 @@
 extern zend_module_entry skeleton_module_entry;
 #define phpext_skeleton_ptr skeleton_module_entry
 
-#endif /* PHP_SKELETON_H */
\ No newline at end of file
+/*
+ * Local variables:
+ * c-basic-offset: 4
+ * tab-width: 4
+ * End:
+ * vim600: fdm=marker
+ * vim: sw=4 ts=4 noet
+ */
+#endif /* PHP_SKELETON_H */
Index: php4/ext/rpc/skeleton/skeleton.c
diff -u php4/ext/rpc/skeleton/skeleton.c:1.6 php4/ext/rpc/skeleton/skeleton.c:1.7
--- php4/ext/rpc/skeleton/skeleton.c:1.6Tue Feb 18 18:22:14 2003
+++ php4/ext/rpc/skeleton/skeleton.cWed Feb 19 16:35:59 2003
@@ -120,6 +120,9 @@
 #endif
 
 /* rpc handler functions */
+
+/* {{{ skeleton_hash
+ */
 static int skeleton_hash(rpc_string name, rpc_string *hash, void *data, int num_args, 
char *arg_types, int type)
 {
/* TODO: implement your hash function here. if you have specified any of the 
HASH_AS_INT constants, simply set
@@ -133,13 +136,19 @@
 
return SUCCESS;
 }
+/* }}} */
 
+/* {{{ skeleton_name
+ */
 static int skeleton_name(rpc_string hash, rpc_string *name, void *data, int type)
 {
/* TODO: do the opposite of what you did above */
return FAILURE;
 }
+/* }}} */
 
+/* {{{ skeleton_ctor
+ */
 static int skeleton_ctor(rpc_string class_name, void **data, int num_args, zval 
**args[])
 {
/* TODO: use *data as a pointer to your internal data. if you want to enable 
your instances for
@@ -154,13 +163,19 @@
 */
return SUCCESS;
 }
+/* }}} */
 
+/* {{{ skeleton_dtor
+ */
 static int skeleton_dtor(void *data)
 {
/* TODO: free everything you alloc'ed above */
return SUCCESS;
 }
+/* }}} */
 
+/* {{{ skeleton_describe
+ */
 static int skeleton_describe(rpc_string method_name, void *data, char **arg_types, 
unsigned char **ref_types)
 {
/* TODO: return a zend_parse_parameters() like string in arg_types to describe 
the
@@ -170,7 +185,10 @@
 */
return SUCCESS;
 }
+/* }}} */
 
+/* {{{ skeleton_call
+ */
 static int skeleton_call(rpc_string method_name, void **data, zval *return_value, int 
num_args, zval **args[])
 {
/* TODO: implement call handler. if you passed back an arg_types string in the 
describe function the arguments
@@ -179,45 +197,73 @@
 */
return SUCCESS;
 }
+/* }}} */
 
+/* {{{ skeleton_get
+ */
 static int skeleton_get(rpc_string property_name, zval *return_value, void **data)
 {
/* TODO: implement get handler */
return SUCCESS;
 }
+/* }}} */
 
+/* {{{ skeleton_set
+ */
 static int skeleton_set(rpc_string property_name, zval *value, void **data)
 {
/* TODO: implement set handler */
return SUCCESS;
 }
+/* }}} */
 
+/* {{{ skeleton_compare
+ */
 static int skeleton_compare(void **data1, void **data2)
 {
/* TODO: implement compare handler */
return SUCCESS;
 }
+/* }}} */
 
+/* {{{ skeleton_has_property
+ */
 static int skeleton_has_property(rpc_string property_name, void **data)
 {
/* TODO: implement has property handler */
return SUCCESS;
 }
+/* }}} */
 
+/* {{{ skeleton_unset_property
+ */
 static int skeleton_unset_property(rpc_string property_name, void **data)
 {
/* TODO: implement unset property handler */
return SUCCESS;
 }
+/* }}} */
 
+/* {{{ skeleton_get_properties
+ */
 static int skeleton_get_properties(HashTable **properties, void **data)
 {
/* TODO: implement get properties handler */
return SUCCESS;
 }
+/* }}} */
 
 
 /* custom functions */
 ZEND_FUNCTION(skeleton_function)
 {
 }
+
+/*
+ * Local variables:
+ * c-basic-offset: 4
+ * tab-width: 4
+ * End:
+ * vim600: fdm=marker
+ * vim: sw=4 ts=4 noet
+ */
Index: php4/ext/rpc/skeleton/skeleton.h
diff -u php4/ext/rpc/skeleton/skeleton.h:1.4 php4/ext/rpc/skeleton/skeleton.h:1.5
--- php4/ext/rpc/skeleton/skeleton.h:1.4Thu Jan 16 13:46:58 2003
+++ php4/ext/rpc/skeleton/skeleton.hWed Feb 19 16:35:59 2003
@@ -32,4 +32,12 @@
 ZEND_FUNCTION(skeleton_function);
 /**/
 
-#endif /* SKELETON_H */
\ No newline at end of file
+/*
+ * Local variables:
+ * c-basic-offset: 4
+ * tab-width: 4
+ * End:
+ * vim600: fdm=marker
+ * vim: sw=4 ts=4 noet
+ */
+#endif /* SKELETON_H */



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-CVS] cvs: php4 /ext/rpc/skeleton php_skeleton.h skeleton.c skeleton.h

2003-01-16 Thread Harald Radi
phanto  Thu Jan 16 13:46:58 2003 EDT

  Added files: 
/php4/ext/rpc/skeleton  php_skeleton.h 

  Modified files:  
/php4/ext/rpc/skeleton  skeleton.c skeleton.h 
  Log:
  update skeleton
  
Index: php4/ext/rpc/skeleton/skeleton.c
diff -u php4/ext/rpc/skeleton/skeleton.c:1.3 php4/ext/rpc/skeleton/skeleton.c:1.4
--- php4/ext/rpc/skeleton/skeleton.c:1.3Thu Jan 16 12:49:21 2003
+++ php4/ext/rpc/skeleton/skeleton.cThu Jan 16 13:46:58 2003
@@ -56,40 +56,68 @@
 skeleton_get,  /* property get handler */
 skeleton_set,  /* property set handler */
 skeleton_compare,  /* compare handler, can be NULL */
-skeleton_has_property, /* reflection functions,
-skeleton_unset_property,*  can be NULL
-skeleton_get_properties */
+skeleton_has_property, /* reflection functions */
+skeleton_unset_property,   /* can be NULL */
+skeleton_get_properties
 RPC_REGISTER_HANDLERS_END()
 
 /* register ini settings */
-RPC_INI_START(skeleton)
+PHP_INI_BEGIN()
/* TODO: palce your ini entries here */
-RPC_INI_END()
+PHP_INI_END()
 
 /* register userspace functions */
-RPC_FUNCTION_ENTRY_START(skeleton)
+RPC_FUNCTION_ENTRY_BEGIN(skeleton)
/* TODO: add your userspace functions here */
ZEND_FE(skeleton_function, NULL)
 RPC_FUNCTION_ENTRY_END()
 
 /* register class methods */
-RPC_METHOD_ENTRY_START(skeleton)
+RPC_METHOD_ENTRY_BEGIN(skeleton)
/* TODO: add your class methods here */
ZEND_FALIAS(method, skeleton_function, NULL)
 RPC_METHOD_ENTRY_END()
 
-/* init function that is called before the class is registered
- * so you can do any tricky stuff in here
- */
-RPC_INIT_FUNCTION(skeleton)
+zend_module_entry skeleton_module_entry = {
+   ZE2_STANDARD_MODULE_HEADER,
+   skeleton,
+   RPC_FUNCTION_ENTRY(skeleton),
+   ZEND_MINIT(skeleton),
+   ZEND_MSHUTDOWN(skeleton),
+   NULL,
+   NULL,
+   ZEND_MINFO(skeleton),
+   0.1a,
+   STANDARD_MODULE_PROPERTIES
+};
+
+ZEND_MINIT_FUNCTION(skeleton)
 {
/* TODO: place your init stuff here */
+
+   RPC_REGISTER_LAYER(skeleton);
+   REGISTER_INI_ENTRIES();
+
+   return SUCCESS;
 }
 
-RPC_SHUTDOWN_FUNCTION(skeleton)
+ZEND_MSHUTDOWN_FUNCTION(skeleton)
 {
/* TODO: place your shutdown stuff here */
+
+   UNREGISTER_INI_ENTRIES();
+
+   return SUCCESS;
 }
+
+ZEND_MINFO_FUNCTION(skeleton)
+{
+   DISPLAY_INI_ENTRIES();
+}
+
+#ifdef COMPILE_DL_COM
+ZEND_GET_MODULE(skeleton);
+#endif
 
 /* rpc handler functions */
 static int skeleton_hash(rpc_string name, rpc_string *hash, void *data, int num_args, 
char *arg_types, int type)
Index: php4/ext/rpc/skeleton/skeleton.h
diff -u php4/ext/rpc/skeleton/skeleton.h:1.3 php4/ext/rpc/skeleton/skeleton.h:1.4
--- php4/ext/rpc/skeleton/skeleton.h:1.3Thu Jan 16 12:49:21 2003
+++ php4/ext/rpc/skeleton/skeleton.hThu Jan 16 13:46:58 2003
@@ -24,6 +24,10 @@
 
 RPC_DECLARE_HANDLER(skeleton);
 
+ZEND_MINIT_FUNCTION(skeleton);
+ZEND_MSHUTDOWN_FUNCTION(skeleton);
+ZEND_MINFO_FUNCTION(skeleton);
+
 /* TODO: define your functions here */
 ZEND_FUNCTION(skeleton_function);
 /**/

Index: php4/ext/rpc/skeleton/php_skeleton.h
+++ php4/ext/rpc/skeleton/php_skeleton.h
/*
   +--+
   | PHP Version 4|
   +--+
   | Copyright (c) 1997-2003 The PHP Group|
   +--+
   | This source file is subject to version 2.02 of the PHP license,  |
   | that is bundled with this package in the file LICENSE, and is|
   | available at through the world-wide-web at   |
   | http://www.php.net/license/2_02.txt. |
   | If you did not receive a copy of the PHP license and are unable to   |
   | obtain it through the world-wide-web, please send a note to  |
   | [EMAIL PROTECTED] so we can mail you a copy immediately.   |
   +--+
   | Author: Harald Radi [EMAIL PROTECTED]  |
   +--+
 */

#ifndef PHP_SKELETON_H
#define PHP_SKELETON_H

extern zend_module_entry skeleton_module_entry;
#define phpext_skeleton_ptr skeleton_module_entry

#endif  /* PHP_SKELETON_H */


-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php