00001 /******************************************************************** 00002 00003 Copyright 2006, ACCESS Systems Americas, Inc. All rights reserved. 00004 00005 The contents of this file are subject to the Mozilla Public License Version 00006 1.1 (the "License"); you may not use this file except in compliance with 00007 the License. You may obtain a copy of the License at 00008 http://www.mozilla.org/MPL/ 00009 00010 Software distributed under the License is distributed on an "AS IS" basis, 00011 WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License 00012 for the specific language governing rights and limitations under the 00013 License. 00014 00015 The Original Code is the entire contents of this file. 00016 00017 The Initial Developer of the Original Code is ACCESS Systems Americas, Inc. 00018 00019 Portions created by ACCESS Systems Americas, Inc. are Copyright © 2006. All 00020 Rights Reserved. 00021 00022 Contributor(s): none. 00023 00024 ********************************************************************/ 00030 #ifndef PRVEXGMGR_H_ 00031 #define PRVEXGMGR_H_ 00032 00033 #include <sys/types.h> 00034 #include <hiker/types.h> 00035 #include <hiker/bundlemgr.h> 00036 00037 #define ALP_EXGMGR_PARAMETER_TYPE_STRING 'S' 00038 #define ALP_EXGMGR_PARAMETER_TYPE_INT 'I' 00039 #define ALP_EXGMGR_PARAMETER_TYPE_BLOB 'B' 00040 00041 #define ALP_EXGMGR_VERB_TAG "ALP_EXG_VERB" 00042 #define ALP_EXGMGR_URL_TAG "ALP_EXG_URL" 00043 #define ALP_EXGMGR_MIME_TAG "ALP_EXG_MIME" 00044 #define ALP_EXGMGR_TRANSPORT_TAG "ALP_EXG_XPORT" 00045 #define ALP_EXGMGR_GENERIC_TAG "ALP_EXG_GENERIC" 00046 00047 typedef struct _AlpExgMgrTransportInfoType AlpExgMgrTransportInfoType; 00048 struct _AlpExgMgrTransportInfoType { 00049 AlpBundleRef itsBundleRef; 00050 gchar *itsNameId; // internal name, non localizable, as used in the transport params 00051 gchar *itsLibPath; // full path to the lib plugin. 00052 void *itsLibRef; 00053 alp_exg_transport_execute_request_func itsTransportExecuteRequestFunc; 00054 }; 00055 00056 #define ALP_EXGMGR_ITSINFO_GROW_SIZE 512 00057 typedef struct _AlpExgRequestType AlpExgRequestType; 00058 struct _AlpExgRequestType { 00059 int itsExgVersion; // Exchange manager version 00060 char *itsInfo; // string representation of all the parameters, verb, description, url... 00061 size_t itsInfoLen; // used size of the Info buffer 00062 size_t itsInfoSize; // maximum size of the Info buffer 00063 int itsDataFd; // > 0 if a data source was specified 00064 int itsDaemonFd; // > 0 when the handler is currently executing and connected to the daemon 00065 char *itsRcvInfo; // received parameters (used for received request only) 00066 size_t itsRcvInfoLen; // size of RcvInfo buffer (used for received request only) 00067 int itsRcvDataFd; // received data Fd. (used for received request only) 00068 }; 00069 00070 #endif /*PRVEXGMGR_H_*/