Commit d475ab31 authored by 's avatar
Browse files

Added const keyword to mapi functions. (Bug #379)



git-svn-id: file:///home/svn/mapi/trunk@386 8d5bb341-7cf1-0310-8cf6-ba355fef3186
parent c6f6f6f6
......@@ -389,7 +389,7 @@ void delete_remote_flow(remote_flowdescr_t* rflow)
}
#endif
int mapi_create_flow(char *dev)
int mapi_create_flow(const char *dev)
//Create new flow
//dev=device that should be used
{
......@@ -569,7 +569,7 @@ int mapi_create_flow(char *dev)
}
}
int mapi_create_offline_flow(char *dev, int format)
int mapi_create_offline_flow(const char *dev, int format)
//Create new flow
//dev=device that should be used
{
......@@ -641,7 +641,7 @@ int mapi_create_offline_flow(char *dev, int format)
}
char* mapi_create_offline_device(char *path, int format)
char* mapi_create_offline_device(const char *path, int format)
//Create new flow
//dev=device that should be used
{
......@@ -699,7 +699,7 @@ char* mapi_create_offline_device(char *path, int format)
}
}
int mapi_start_offline_device(char *dev)
int mapi_start_offline_device(const char *dev)
//Create new flow
//dev=device that should be used
{
......@@ -738,7 +738,7 @@ int mapi_start_offline_device(char *dev)
}
}
int mapi_delete_offline_device(char *dev)
int mapi_delete_offline_device(const char *dev)
//Create new flow
//dev=device that should be used
{
......@@ -920,7 +920,7 @@ int send_fd(int *fds, int num) {
return 1;
}
int mapi_apply_function(int fd, char* funct, ...)
int mapi_apply_function(int fd, const char* funct, ...)
//Apply function to a mapi flow
//fd: flow descriptor
//funct: function to be added
......@@ -1898,7 +1898,7 @@ int mapi_get_next_flow_info(int fd, mapi_flow_info_t *info)
}
int
mapi_load_library(char* library)
mapi_load_library(const char* library)
{
struct mapiipcbuf qbuf;
......
......@@ -154,22 +154,22 @@ typedef struct mapidflib_function_def_mini {
typedef void (*mapi_handler)(const struct mapipkt*);
//Create new mapi flow
int mapi_create_flow(char *dev);
int mapi_create_flow(const char *dev);
//Create new mapi flow based on a trace file
int mapi_create_offline_flow(char *path,int format);
int mapi_create_offline_flow(const char *path,int format);
//Create new mapi flow based on a trace file
char* mapi_create_offline_device(char *path,int format);
char* mapi_create_offline_device(const char *path,int format);
//Create new mapi flow based on a trace file
int mapi_start_offline_device(char *dev);
int mapi_start_offline_device(const char *dev);
//Create new mapi flow based on a trace file
int mapi_delete_offline_device(char *dev);
int mapi_delete_offline_device(const char *dev);
//Apply function to a flow
int mapi_apply_function(int fd, char* funct, ...);
int mapi_apply_function(int fd, const char* funct, ...);
//Connect to a mapi flow
int mapi_connect(int fd);
......@@ -195,7 +195,7 @@ int mapi_read_error(int fd, int* err_no, char* errorstr);
int mapi_set_authdata(int fd,const char *pub,const char *priv,const char *creds);
//Load new library
int mapi_load_library(char* library);
int mapi_load_library(const char* library);
//Unload library
//int mapi_unload_library(char* library);
......@@ -226,10 +226,3 @@ int mapi_get_function_info(int fd, int fid, mapi_function_info_t *info);
int mapi_get_next_function_info(int fd, int fid, mapi_function_info_t *info);
#endif
......@@ -49,7 +49,7 @@ void addlib(void* libhandle)
}
}
int mapilh_load_library(char *libpath,char* library)
int mapilh_load_library(char *libpath,const char* library)
{
void* handle=NULL;
char buf[2048];
......@@ -120,7 +120,7 @@ mapidflib_function_def_t* get_function(char* name, char* devtype, mapidflib_func
/*
* The function name can be of the format
*/
mapidflib_function_def_t* mapilh_get_function_def(char* name, char* devtype)
mapidflib_function_def_t* mapilh_get_function_def(const char* name, char* devtype)
{
mapidflib_function_def_t* f=NULL;
char* (*lib_get_name)();
......
......@@ -3,8 +3,8 @@
#include "mapidflib.h"
mapidflib_function_def_t* mapilh_get_function_def(char* name, char* devtype);
int mapilh_load_library(char *libpath,char* library);
mapidflib_function_def_t* mapilh_get_function_def(const char* name, char* devtype);
int mapilh_load_library(char *libpath,const char* library);
void mapilh_free_libraries();
#endif
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment