ReactOS  0.4.14-dev-317-g96040ec
drop.c File Reference
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "winerror.h"
#include "wine/debug.h"
#include "msi.h"
#include "msiquery.h"
#include "objbase.h"
#include "objidl.h"
#include "msipriv.h"
#include "query.h"
Include dependency graph for drop.c:

Go to the source code of this file.

Classes

struct  tagMSIDROPVIEW
 

Typedefs

typedef struct tagMSIDROPVIEW MSIDROPVIEW
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (msidb)
 
static UINT DROP_execute (struct tagMSIVIEW *view, MSIRECORD *record)
 
static UINT DROP_close (struct tagMSIVIEW *view)
 
static UINT DROP_get_dimensions (struct tagMSIVIEW *view, UINT *rows, UINT *cols)
 
static UINT DROP_delete (struct tagMSIVIEW *view)
 
UINT DROP_CreateView (MSIDATABASE *db, MSIVIEW **view, LPCWSTR name)
 

Variables

static const MSIVIEWOPS drop_ops
 

Typedef Documentation

◆ MSIDROPVIEW

Function Documentation

◆ DROP_close()

static UINT DROP_close ( struct tagMSIVIEW view)
static

Definition at line 63 of file drop.c.

64 {
66 
67  TRACE("%p\n", dv);
68 
69  return ERROR_SUCCESS;
70 }
#define ERROR_SUCCESS
Definition: deptool.c:10
#define TRACE(s)
Definition: solgame.cpp:4

◆ DROP_CreateView()

UINT DROP_CreateView ( MSIDATABASE db,
MSIVIEW **  view,
LPCWSTR  name 
)

Definition at line 118 of file drop.c.

119 {
120  MSIDROPVIEW *dv;
121  UINT r;
122 
123  TRACE("%p %s\n", view, debugstr_w(name));
124 
125  dv = msi_alloc_zero(sizeof *dv);
126  if(!dv)
127  return ERROR_FUNCTION_FAILED;
128 
129  r = TABLE_CreateView(db, name, &dv->table);
130  if (r != ERROR_SUCCESS)
131  {
132  msi_free( dv );
133  return r;
134  }
135 
136  dv->view.ops = &drop_ops;
137  dv->db = db;
138 
139  *view = (MSIVIEW *)dv;
140 
141  return ERROR_SUCCESS;
142 }
#define ERROR_SUCCESS
Definition: deptool.c:10
UINT TABLE_CreateView(MSIDATABASE *db, LPCWSTR name, MSIVIEW **view) DECLSPEC_HIDDEN
Definition: table.c:2162
MSIVIEW view
Definition: drop.c:39
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
static const MSIVIEWOPS drop_ops
Definition: drop.c:95
static void * msi_alloc_zero(size_t len) __WINE_ALLOC_SIZE(1)
Definition: msipriv.h:1210
#define ERROR_FUNCTION_FAILED
Definition: winerror.h:985
#define debugstr_w
Definition: kernel32.h:32
#define TRACE(s)
Definition: solgame.cpp:4
const MSIVIEWOPS * ops
Definition: msipriv.h:348
MSIVIEW * table
Definition: drop.c:41
unsigned int UINT
Definition: ndis.h:50
static BOOL msi_free(void *mem)
Definition: msipriv.h:1227
Definition: name.c:36
MSIDATABASE * db
Definition: drop.c:40

Referenced by yyparse().

◆ DROP_delete()

static UINT DROP_delete ( struct tagMSIVIEW view)
static

Definition at line 81 of file drop.c.

82 {
84 
85  TRACE("%p\n", dv );
86 
87  if( dv->table )
88  dv->table->ops->delete( dv->table );
89 
90  msi_free( dv );
91 
92  return ERROR_SUCCESS;
93 }
#define ERROR_SUCCESS
Definition: deptool.c:10
#define TRACE(s)
Definition: solgame.cpp:4
const MSIVIEWOPS * ops
Definition: msipriv.h:348
UINT(* delete)(struct tagMSIVIEW *)
Definition: msipriv.h:299
MSIVIEW * table
Definition: drop.c:41
static BOOL msi_free(void *mem)
Definition: msipriv.h:1227

◆ DROP_execute()

static UINT DROP_execute ( struct tagMSIVIEW view,
MSIRECORD record 
)
static

Definition at line 46 of file drop.c.

47 {
49  UINT r;
50 
51  TRACE("%p %p\n", dv, record);
52 
53  if( !dv->table )
54  return ERROR_FUNCTION_FAILED;
55 
56  r = dv->table->ops->execute(dv->table, record);
57  if (r != ERROR_SUCCESS)
58  return r;
59 
60  return dv->table->ops->drop(dv->table);
61 }
#define ERROR_SUCCESS
Definition: deptool.c:10
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
UINT(* execute)(struct tagMSIVIEW *view, MSIRECORD *record)
Definition: msipriv.h:268
#define ERROR_FUNCTION_FAILED
Definition: winerror.h:985
#define TRACE(s)
Definition: solgame.cpp:4
const MSIVIEWOPS * ops
Definition: msipriv.h:348
MSIVIEW * table
Definition: drop.c:41
unsigned int UINT
Definition: ndis.h:50
UINT(* drop)(struct tagMSIVIEW *view)
Definition: msipriv.h:342

◆ DROP_get_dimensions()

static UINT DROP_get_dimensions ( struct tagMSIVIEW view,
UINT rows,
UINT cols 
)
static

Definition at line 72 of file drop.c.

73 {
75 
76  TRACE("%p %p %p\n", dv, rows, cols);
77 
78  return ERROR_FUNCTION_FAILED;
79 }
#define ERROR_FUNCTION_FAILED
Definition: winerror.h:985
#define TRACE(s)
Definition: solgame.cpp:4

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( msidb  )

Variable Documentation

◆ drop_ops

const MSIVIEWOPS drop_ops
static
Initial value:
=
{
}
static UINT DROP_close(struct tagMSIVIEW *view)
Definition: drop.c:63
static UINT DROP_get_dimensions(struct tagMSIVIEW *view, UINT *rows, UINT *cols)
Definition: drop.c:72
static UINT DROP_delete(struct tagMSIVIEW *view)
Definition: drop.c:81
static UINT DROP_execute(struct tagMSIVIEW *view, MSIRECORD *record)
Definition: drop.c:46
smooth NULL
Definition: ftsmooth.c:416

Definition at line 95 of file drop.c.

Referenced by DROP_CreateView().