obex_util.h

Go to the documentation of this file.
00001 /*
00002  Copyright (c) 2007, Forkbeard team
00003 
00004  All rights reserved.
00005 
00006  Licensed under BSD license. See License.txt
00007 */
00008 
00009 #ifndef __OBEX_UTIL_H__
00010 #define __OBEX_UTIL_H__
00011 
00012 /* This header contains some functions to help transferring files using obex.
00013  */
00014 
00015 
00016 #include "obex.h"
00017 
00018 #ifdef __cplusplus
00019 extern "C" {
00020 #endif
00021 
00023 #define OBEX_SETPATH_REVERSE    1
00024 #define OBEX_SETPATH_NO_CREATE  2 
00025 
00027 #define OBEX_OBJECT_FOLDER_LISTING      "x-obex/folder-listing"
00028 
00030 #define OBEX_OBJECT_BUSINESS_CARD       "text/x-vCard"
00031 
00033 #define OBEX_OBJECT_CAPABILITY          "x-obex/capability"
00034 
00036 #define OBEX_OBJECT_PROFILE             "x-obex/object-profile"
00037 
00039 typedef struct _ObexDataBuffer ObexDataBuffer;
00040 
00053 int obexDataBufferCreate( ObexDataBuffer** dataBuffer, dword initialsize, void* initialData );
00054 
00062 int obexDataBufferDestroy( ObexDataBuffer* dataBuffer );
00063 
00070 void* obexDataBufferGetData( ObexDataBuffer* dataBuffer );
00071 
00078 dword obexDataBufferGetSize( ObexDataBuffer* dataBuffer );
00079 
00099 int obexUtilSetPath( ObexSession* session, const wchar_t* path , dword flags ); 
00100 
00101 /* Push functions */
00102 
00120 int obexUtilPushFromFile( ObexSession* session, const wchar_t* localFilename, const wchar_t* remoteFilename, const char* contentType );
00121 
00136 int obexUtilPushFromMemory( ObexSession* session, ObexDataBuffer* dataBuffer, const wchar_t* remoteFilename, const char* contentType);
00137 
00138 
00139 /* Pull functions*/
00140 
00157 int obexUtilPullToFile( ObexSession* session, const wchar_t* localFilename, const wchar_t* remoteFilename, const char* contentType );
00158 
00174 int obexUtilPullToMemory( ObexSession* session, ObexDataBuffer** dataBuffer, const wchar_t* remoteFilename, const char* contentType );
00175 
00176 
00177 #ifdef __cplusplus
00178 "}"
00179 #endif
00180 
00181 #endif /* __OBEX_UTIL_H__  */
00182 
00183 // End of file  
00184 
footer
 SourceForge.net Logo