Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Z
zmap
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ensembl-gh-mirror
zmap
Commits
4e10681d
Commit
4e10681d
authored
20 years ago
by
edgrif
Browse files
Options
Downloads
Patches
Plain Diff
header defining how server requests are passed to a slave thread.
parent
f5606127
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/include/ZMap/zmapServerProtocol.h
+163
-0
163 additions, 0 deletions
src/include/ZMap/zmapServerProtocol.h
with
163 additions
and
0 deletions
src/include/ZMap/zmapServerProtocol.h
0 → 100755
+
163
−
0
View file @
4e10681d
/* File: zmapServerProtocol.h
* Author: Ed Griffiths (edgrif@sanger.ac.uk)
* Copyright (c) Sanger Institute, 2005
*-------------------------------------------------------------------
* ZMap is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* or see the on-line version at http://www.gnu.org/copyleft/gpl.txt
*-------------------------------------------------------------------
* This file is part of the ZMap genome database package
* originated by
* Ed Griffiths (Sanger Institute, UK) edgrif@sanger.ac.uk,
* Roy Storey (Sanger Institute, UK) rds@sanger.ac.uk,
* Rob Clack (Sanger Institute, UK) rnc@sanger.ac.uk
*
* Description: Interface for passing server requests from the master
* thread to slave threads. Requests are via structs that
* give all the information/fields for the request/reply.
*
* HISTORY:
* Last edited: Feb 2 11:56 2005 (edgrif)
* Created: Wed Feb 2 11:47:16 2005 (edgrif)
* CVS info: $Id: zmapServerProtocol.h,v 1.1 2005-02-02 14:54:41 edgrif Exp $
*-------------------------------------------------------------------
*/
#ifndef ZMAP_PROTOCOL_H
#define ZMAP_PROTOCOL_H
#include
<glib.h>
#include
<ZMap/zmapFeature.h>
#include
<ZMap/zmapThreads.h>
/* Requests can be of different types with different input parameters and returning
* different types of results. */
typedef
enum
{
ZMAP_SERVERREQ_INVALID
=
0
,
ZMAP_SERVERREQ_OPEN
,
ZMAP_SERVERREQ_OPENLOAD
,
ZMAP_SERVERREQ_TYPES
,
/* Get the feature types. */
ZMAP_SERVERREQ_FEATURES
,
/* Get the features. */
ZMAP_SERVERREQ_SEQUENCE
,
/* Get the sequence. */
ZMAP_SERVERREQ_FEATURE_SEQUENCE
,
/* Get the features + sequence. */
#ifdef ED_G_NEVER_INCLUDE_THIS_CODE
/* these are things I would like to do but have not implemented yet.... */
ZMAP_SERVERREQ_NEWCONTEXT
,
/* Set a new sequence name/start/end. */
#endif
/* ED_G_NEVER_INCLUDE_THIS_CODE */
ZMAP_SERVERREQ_TERMINATE
/* Close and destroy the connection. */
}
ZMapServerReqType
;
/* ALL request/response structs must include the fields from ZMapServerReqType
* as their first field in the struct so that code can look in all such structs to decode them. */
/* The canonical request, use the "type" field to detect the contents of the struct. */
typedef
struct
{
ZMapServerReqType
type
;
}
ZMapServerReqAnyStruct
,
*
ZMapServerReqAny
;
/* Open a connection to a server. */
typedef
struct
{
ZMapServerReqType
type
;
char
*
machine
;
int
port
;
char
*
protocol
;
int
timeout
;
char
*
version
;
}
ZMapServerReqOpenStruct
,
*
ZMapServerReqOpen
;
/* Set a context/region in a server. */
typedef
struct
{
ZMapServerReqType
type
;
char
*
sequence
;
int
start
,
end
;
GData
*
types
;
}
ZMapServerReqNewContextStruct
,
*
ZMapServerReqNewContext
;
/* Find out what types are on a server. */
typedef
struct
{
ZMapServerReqType
type
;
GData
*
types_out
;
/* Returned list of available feature types. */
}
ZMapServerReqGetTypesStruct
,
*
ZMapServerReqGetTypes
;
/* Get features from a server. */
typedef
struct
{
ZMapServerReqType
type
;
ZMapFeatureContext
feature_context_out
;
/* Returned feature sets. */
}
ZMapServerReqGetFeaturesStruct
,
*
ZMapServerReqGetFeatures
;
/* Open a connection, set up the context and get the features all in one go. */
typedef
struct
{
ZMapServerReqType
type
;
ZMapServerReqOpenStruct
open
;
ZMapServerReqNewContextStruct
context
;
ZMapServerReqGetFeaturesStruct
features
;
}
ZMapServerReqOpenLoadStruct
,
*
ZMapServerReqOpenLoad
;
/* Can be used to address any struct, do we need this ? not sure..... */
typedef
union
{
ZMapServerReqAny
any
;
ZMapServerReqOpen
open
;
ZMapServerReqOpenLoad
open_load
;
ZMapServerReqGetTypes
get_types
;
ZMapServerReqGetFeatures
get_features
;
ZMapServerReqNewContext
new_context
;
}
ZMapServerReq
;
/* Handler routine which decodes the request into server calls in the thread. */
ZMapThreadReturnCode
zMapServerRequestHandler
(
void
**
slave_data
,
void
*
request_in
,
void
**
reply_out
,
char
**
err_msg_out
)
;
#endif
/* !ZMAP_PROTOCOL_H */
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment